Jailbreaks: a taxonomy for defenders
The families of techniques people use to get models past their safety training (role-play, obfuscation, many-shot, multi-turn escalation, payload splitting, adversarial suffixes, multimodal and language attacks), how jailbreaks differ from prompt injection, and how to test for and limit them in your own application.
By Sandip Maity, Applied AI Engineer
A jailbreak is an input that gets a model to do something its developers trained it not to do. For an application builder, jailbreaks matter in two ways: your product could be used to produce harmful content under your name, and the same techniques are used to break your application's own rules. This lesson classifies the main techniques so you can test for them, without being a recipe book.
#Jailbreak versus prompt injection
| Jailbreak | Prompt injection | |
|---|---|---|
| Goal | Bypass the model's safety training and policies | Make the model follow the attacker's instructions instead of the application's |
| Who attacks | Usually the user | The user, or third-party content the app reads |
| Typical harm | Harmful or policy-violating content | Data theft, unwanted actions, manipulated output |
| Main defence | Model choice, input and output classifiers, scope limits | Least privilege, separating data from instructions, output checks |
Real attacks mix them: a document injects instructions that also contain a jailbreak. Defend against both (prompt injection).
Pro content
Keep reading with Inference Academy Pro
Unlock the rest of this lesson, plus every advanced lesson, hands-on lab, the larger playground models and completion certificates.
Still to come in this lesson
- The families
- Defending your application
- Testing for jailbreaks
- Exercises
You will be able to answer
- What is the difference between a jailbreak and prompt injection?
- Why does 'many-shot' jailbreaking get stronger with long context windows?
- A user asks for something harmful split across five innocent-looking messages. Which family is this?
- What is the most reliable way to limit the damage of a successful jailbreak in your app?
- Why should you test jailbreak resistance in every language your users write in?