Stage 3 · Teens · Advanced Topics

Safety, Alignment & Prompt Injection

Refusals, defense in depth, and why retrieved text can hijack a prompt.

Alignment is the project of making a model's behavior match human intentions and values — typically helpful, honest, and harmless. RLHF (reinforcement learning from human feedback) and related preference methods are one way: humans (or a reward model trained on human ratings) score outputs, and training updates the weights so highly rated continuations become more likely. That is still next-token prediction, with a different objective on top of pretraining.

Safety is not only that training. It exists in layers: the model's learned refusals, system prompts and guardrails in the harness, and application policy (rate limits, content filters, human review for sensitive actions).

Defense in Depth
Layer 1: Model training▼
Layer 2: Harness guardrails▼
Layer 3: Application policy▼
Click a layer to see a concrete example of what it catches. A request has to slip past all three to cause harm.

Click each layer to see a concrete example of what it catches.

All lessons in Stage 3: Agents and safety