# Jailbreak (AI)

> A trick prompt that gets an AI to break its own rules.

**Field:** Artificial Intelligence  
**Category:** Safety & Security  
**Also known as:** AI Jailbreak, LLM Jailbreak, Jailbreaking

## Think of it like

It is like telling a guard a long tale. Then they let you in.

## Definition

A jailbreak is a prompt written to get a model to break its own safety rules. A plain request for harm is often refused. A jailbreak hides it in a story, a game of pretend, a code, or many small steps, until the model goes along. The user is the one doing it, and the target is the model's own training. Model makers patch the known ones, and people keep finding new ones.

## Example

A user asks a model for something it refuses. They then ask it to play a character in a story who would explain it. An older model plays along and answers.

## Why it matters

A model that can be talked out of its rules is only as safe as its worst user.

## Common mistake

Mixing it up with prompt injection. In a jailbreak, the user attacks the model. In injection, someone else's text attacks the user's app.

## Three principles

- **Breaks safety rules.** Of the model.
- **Wrapped request.** Story, role, code.
- **Patched, then found.** Over and over.

## Related terms

- [Prompt Injection](https://learn.benibix.com/term/ai/prompt-injection)
- [AI Red Teaming](https://learn.benibix.com/term/ai/ai-red-teaming)
- [Guardrail (AI)](https://learn.benibix.com/term/ai/guardrail)
- [AI Alignment](https://learn.benibix.com/term/ai/ai-alignment)

## Told apart from

- [Prompt Injection vs Jailbreak](https://learn.benibix.com/compare/prompt-injection-vs-jailbreak): People often think prompt injection and a jailbreak are the same attack. In a jailbreak, the user tricks the model into breaking its own safety rules. In prompt injection, someone else's text takes over an app. It hides in a message, a page or a file that the app trusts. A jailbreak aims at the model's training. Injection aims at the app built on it, and the user may never see it.

![A plain harmful request is refused. The same request wrapped in a story or a role-play gets past the model's safety training.](https://learn.benibix.com/diagrams/sf-jailbreak.svg)

---

Source: https://learn.benibix.com/term/ai/jailbreak
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
