Jailbreak: Definition and Examples
Technique aimed at bypassing the guardrails and security restrictions of a generative AI model to make it produce content that is normally prohibited or filtered.
Full definition
Jailbreak refers to all techniques used to bypass the safety measures built into language models (LLMs) like ChatGPT, Claude, or Gemini. These models are trained with strict rules that prevent them from generating dangerous, illegal, or unethical content. Jailbreak seeks to neutralize these protections through cleverly crafted prompts.
Jailbreak methods typically exploit flaws in how the model interprets instructions. Common techniques include role-playing (asking the model to play a character without restrictions), prompt injection (inserting hidden instructions that override system directives), or encoding attacks (using coded languages or text transformations to mask the actual request).
AI providers invest heavily in red teaming and alignment research to make their models more resistant to jailbreaks. Each new technique discovered is usually fixed quickly, creating a dynamic race between attackers and defenders. This domain has become a full-fledged research field in AI safety.
It is important to distinguish malicious jailbreak, which aims to produce harmful content, from ethical red teaming, practiced by security researchers to identify and correct model vulnerabilities before they are exploited. Red teaming is encouraged by AI companies and constitutes a legitimate cybersecurity practice.
Etymology
The term "jailbreak" is borrowed from computer vocabulary where it refers to the unauthorized unlocking of a device (notably the iPhone starting in 2007) to bypass manufacturer restrictions. Literally "prison escape" in English, it was transposed to the field of generative AI around 2022-2023 with the rise of ChatGPT, to describe attempts to make a model "escape" from its safety constraints.
Concrete examples
AI security research (ethical red teaming)
As an AI security researcher, test the model's robustness against indirect reformulations of sensitive queries and document the results to improve protections.
Awareness of risks within a company
Explain to our product team the main categories of jailbreak (prompt injection, role-playing, encoding) and the protective measures to integrate into our customer chatbot.
Model robustness assessment before deployment
List the 10 categories of adversarial tests recommended by OWASP to evaluate a production LLM's resistance to jailbreak.
Practical usage
In prompt engineering, understanding jailbreak is essential for building robust systems. When designing a system prompt, anticipate bypass attempts by adding explicit refusal instructions and testing your system with adversarial scenarios. Knowledge of jailbreak techniques also helps in writing clear instructions that reduce exploitable ambiguities.
Related concepts
FAQ
Is jailbreaking an AI illegal?
Why are AI models vulnerable to jailbreak?
How can I protect my AI application from jailbreak?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
JSON Mode: Definition and Examples
JSON Mode is a parameter available in some language model APIs that forces the model to produce a response exclusively in valid JSON format.
Knowledge Cutoff: Definition and Examples
The knowledge cutoff (or knowledge cut-off date) refers to the limit date up to which an AI model has been trained on data. Beyond this date, the model has no knowledge of events or information that occurred.
Knowledge Graph: Definition and Examples
A Knowledge Graph is a data structure that organizes information as a network of relationships between entities, allowing
KV Cache: Definition and Examples
KV Cache (Key-Value Cache) is an optimization mechanism used by language models (LLMs) to store attention layer keys and values
LangChain: Definition and Examples
LangChain is an open source framework designed to facilitate the development of applications powered by language models (LLMs), by allowing chains of
Large Language Model: Definition and Examples
A Large Language Model (LLM) is an artificial intelligence model trained on massive volumes of text, capable of understanding and generating language
Get new prompts every week
Join our newsletter.