Security
Jailbreaks
Tricks that get a model to produce content its safety training should refuse.
What it is and why it exists
Role-play framings, hypotheticals, many-shot examples, encoding (base64, leetspeak), translation into low-resource languages, and multi-turn escalation (crescendo). Jailbreaks target the model’s safety behaviour; injections target your application’s instructions — related but different.
Quick prototype
Use the provider’s default safety behaviour.
In production, at scale
Layer provider safety with input/output moderation for your policy, block-list categories relevant to your domain, conversation-level monitoring for escalation, and red-team prompts in the eval suite.
Vendors and tools
| Llama Guard / ShieldGemma | Open safety classifiers |
|---|---|
| OpenAI Moderation API | Content classification |
| garak / PyRIT / promptfoo red teaming | Automated jailbreak testing |
On AWS: Bedrock Guardrails content filters (hate, violence, sexual, misconduct, prompt attacks) on input and output.
How it fails
- Filters that only check single messages, not the conversation
- English-only filters
What the interviewer asks next
Jailbreak vs prompt injection?
Jailbreak: make the model break its safety policy. Injection: make the model follow the attacker’s instructions instead of the developer’s. Injection can be entirely “safe” content that still causes harm (e.g. sending data).