# Jailbreak

> A jailbreak is an attempt by a user to trick an AI model into ignoring its safety rules or instructions, for example through role-play, hypothetical framing or carefully crafted wording, so that it produces content or actions it should refuse.

Also called: AI jailbreak, jailbreaking, prompt jailbreak, DAN prompt, safety bypass. Category: Delivery and quality. Source: https://aibuildindex.com/glossary/jailbreak

## In the index

- Customer support chatbot: median $2,000, middle half $300 to $5,300, 1,344 priced briefs (https://aibuildindex.com/cost/support-chatbot)
- Information security: median $3,200, middle half $1,450 to $7,200, 81 priced briefs (https://aibuildindex.com/skills/information-security)

Any AI assistant open to the public will meet users who try to make it misbehave. A jailbreak is a deliberate attempt to get past the model's built-in safety training or the business's own instructions: getting a support bot to write offensive content, reveal its hidden instructions, promise discounts it should not, or discuss topics it was told to avoid. The results range from embarrassing screenshots to real liability, so jailbreak resistance is part of making any customer-facing AI fit for release.

## How it works

Jailbreaks exploit the fact that models follow instructions written in ordinary language and cannot perfectly separate legitimate requests from manipulative ones. Common approaches include:

- **Role-play.** Asking the model to pretend to be a character without rules.
- **Hypotheticals.** Framing a forbidden request as fiction, research or a thought experiment.
- **Gradual escalation.** Starting innocently and pushing a little further each turn.
- **Obfuscation.** Hiding the request in another language, encoding or unusual formatting.
- **Instruction override.** Telling the model its previous instructions no longer apply.

Jailbreaks differ from [prompt injection](https://aibuildindex.com/glossary/prompt-injection), though the two overlap. In a jailbreak the user is the attacker. In prompt injection, hostile instructions arrive through content the system processes, such as an email or web page.

Defences come in layers. Providers train models to resist jailbreaks. Builders write a clear [system prompt](https://aibuildindex.com/glossary/system-prompt), add [guardrails](https://aibuildindex.com/glossary/guardrails) that screen inputs and outputs, limit what the assistant can actually do, and use [content moderation](https://aibuildindex.com/glossary/content-moderation) for harmful material. Before launch, [red-teaming](https://aibuildindex.com/glossary/red-teaming) tests these defences with deliberate attacks.

## What it means for cost

Jailbreak resistance adds testing and safety work to any public-facing build: writing attack scenarios, adding input and output checks, logging and reviewing suspicious conversations, and updating defences as new techniques appear. The amount needed depends on exposure and stakes. An internal tool for trained staff needs less than a public chatbot for a regulated business.

The most effective cost control is limiting what a successful jailbreak can achieve. If the assistant cannot issue refunds, access other customers' data or publish content without review, a jailbreak can only produce words. Ask a builder what attacks they tested, what the assistant is technically able to do, and how incidents will be detected after launch.

## Common questions

### Can jailbreaks be prevented completely?

No. New techniques keep appearing, and no current model is fully resistant. The realistic goal is to make jailbreaks hard, detect them, and ensure a successful one cannot cause serious harm.

### Is jailbreaking an AI model illegal?

Generally it breaches the provider's or business's terms of use rather than the law, though using it to commit fraud, access data or cause harm can be unlawful. Businesses should state acceptable use in their terms and keep logs.

### Who is responsible if a jailbroken chatbot says something harmful?

Usually the business that deployed it, at least in the eyes of customers and often legally. That is why customer-facing assistants need safety testing and clear limits on what they can say and do.

## Related terms

- [Prompt injection](https://aibuildindex.com/glossary/prompt-injection): Prompt injection is a security attack in which hostile instructions are hidden in content an AI system processes, such as an email, web page or document, causing the model to follow the attacker's instructions instead of its own.
- [Guardrails](https://aibuildindex.com/glossary/guardrails): Guardrails are the checks and controls placed around an AI model, such as input filters, output validation, topic limits and action restrictions, that keep its behaviour within safe, permitted and useful bounds in a live system.
- [Red teaming](https://aibuildindex.com/glossary/red-teaming): Red teaming is deliberately trying to make an AI system fail, by attacking it with misleading, harmful or adversarial inputs, to find unsafe behaviour, data leaks and weaknesses before real users or attackers do.
- [System prompt](https://aibuildindex.com/glossary/system-prompt): A system prompt is the standing set of instructions sent to a chat-style AI model before any user message, defining its role, rules, tone and limits for every conversation in an application.
- [Content moderation](https://aibuildindex.com/glossary/content-moderation): Content moderation is the process of detecting and handling harmful, abusive, illegal or off-policy material in text, images, audio or video, increasingly done by AI classifiers with human reviewers for difficult cases.
