The DAN jailbreak, short for Do Anything Now, is a family of prompt attacks that instruct a large language model to adopt an alternative persona that supposedly has no content restrictions, in order to obtain outputs the model would otherwise refuse. In AI security, DAN is the best-known example of a persona-based jailbreak, and it shaped how both attackers and defenders think about the limits of safety training.
DAN prompts circulated widely on public forums from late 2022, shortly after conversational assistants became broadly available. They went through dozens of numbered versions as providers patched each one, which made DAN an early, very public case study in the adversarial cycle between jailbreak authors and model safety teams.
How the DAN jailbreak manipulates a model
The DAN jailbreak manipulates a model by framing harmful compliance as part of a fictional role rather than as a request that violates policy. The prompt asserts that the assistant now has a second identity that has been freed from its rules, and it asks the model to answer as that identity.
Most DAN variants combine several persuasion techniques. The table below lists the recurring components and the weakness each one targets, described at the level needed for defense rather than as a recipe.
| Component | What it does | Weakness it targets |
|---|---|---|
| Persona assignment | Declares an unrestricted alter ego | Strong instruction-following in role-play |
| False authority claims | States that rules no longer apply | Lack of a verified instruction hierarchy |
| Dual response format | Requests a normal and a persona answer | Separates refusal from compliance |
| Token or penalty games | Threatens the persona with loss of points | Tendency to stay consistent with a scenario |
| Reminder phrases | Restores the persona after a refusal | Weak persistence of refusals across turns |
The attack works because safety training and helpfulness training compete. A model trained to follow instructions and sustain creative scenarios can treat the persona as a legitimate task, and the refusal behavior learned during alignment may not generalize to every framing of the same request.
Evolution of DAN prompts
DAN prompts evolved through rapid iteration in response to provider fixes, and the version numbers reflected community attempts to stay ahead of patches. Each generation added more elaborate framing as simpler variants stopped working.
The following table summarizes the broad phases of that evolution without reproducing any specific prompt.
| Phase | Characteristic approach | Defensive response |
|---|---|---|
| Early versions | Short request to pretend rules are gone | Additional refusal training on role-play |
| Gamified versions | Token systems and penalties for refusing | Training on adversarial persona data |
| Long-form versions | Very long, layered instructions | Classifiers on input and output |
| Derivative personas | Renamed characters with similar logic | Generalized detection of persona attacks |
| Combined attacks | Persona mixed with encoding or multi-turn setup | Layered defenses and red teaming |
Against current frontier models, classic DAN prompts are largely ineffective, because providers have trained extensively on them. The underlying idea, however, persists in newer persona attacks and in multi-turn jailbreaks that build a role gradually instead of declaring it in one message.
DAN compared with other attack types
The DAN jailbreak differs from related attacks mainly in who supplies the malicious instruction and which safeguard it tries to defeat. A jailbreak is typed by the user who wants restricted output, whereas prompt injection hides instructions in content the model processes on behalf of someone else.
| Attack type | Attacker position | Primary goal |
|---|---|---|
| DAN jailbreak | Direct user of the model | Bypass safety policy through a persona |
| Multi-turn jailbreak | Direct user over several turns | Erode refusals gradually |
| Token smuggling | Direct user | Hide restricted words through encoding |
| Prompt injection | Third party via documents or web content | Hijack the model’s task or tools |
| Adversarial suffix attack | Direct user with optimized text | Trigger compliance through learned tokens |
This distinction matters for threat modeling. A DAN-style attack mainly creates content and reputational risk, while prompt injection in an agent with tool access can lead to data exfiltration or unauthorized actions, which typically demands architectural controls rather than better refusals alone.
Defenses against persona-based jailbreaks
Effective defense against persona-based jailbreaks relies on layered controls, because no single technique blocks every variant. Providers and application builders typically combine model-level training with external filters and continuous testing.
- Adversarial safety training: fine-tuning and reinforcement learning on known jailbreak patterns so refusals generalize across framings.
- Instruction hierarchy: training the model to rank system and developer instructions above user claims that rules have changed.
- Input and output classifiers: separate safety classifiers or constitutional classifiers that screen prompts and responses independently of the main model.
- Red teaming: routine testing with tools such as garak or PyRIT to measure jailbreak resistance before release.
- Monitoring and rate limits: detecting accounts that repeatedly submit persona attacks and applying policy enforcement.
Defenders should also avoid overcorrecting. Aggressive filters that block all role-play or fiction harm legitimate creative use, so a good defense targets the harmful output itself rather than the mere presence of a character or scenario.
Why DAN remains relevant for AI security
DAN remains relevant because it demonstrated that alignment can be bypassed through framing alone, without technical access to the model. It established jailbreak resistance as a standard evaluation dimension and influenced benchmark design, red teaming practice and frameworks such as MITRE ATLAS and the OWASP guidance for LLM applications.
For organizations deploying chat assistants, the practical lesson is that a system prompt is not a security boundary. Any capability exposed to users should be safe even if the model is persuaded to ignore its instructions, which is a core principle of secure LLM application design.
A non-technical view
AI chat assistants follow rules about what they will not say. The DAN trick tries to get around those rules with a game of pretend. The user tells the assistant to play a character who has no rules at all. The hope is that the assistant will say forbidden things while staying in character.
It is a bit like telling a security guard that today he is an actor playing a guard who lets everyone in. A well-trained guard still checks the badges. Modern assistants are trained the same way, so the old DAN tricks rarely work now.
A concrete example
A software company prepares to launch a customer support chatbot built on a commercial language model. Before release, its security team runs a red teaming exercise with a test suite of about 300 known jailbreak prompts, including several dozen DAN variants and derivative personas.
The first run shows that the base model refuses nearly all classic DAN prompts. However, about 4 percent of persona prompts combined with a multi-turn setup produce off-policy answers, such as insulting language aimed at competitors. The team adds an output safety classifier, tightens the system prompt and ensures the bot has no tool access beyond read-only order lookup.
A second run shows the off-policy rate falling below 0.5 percent, with no harmful output reaching users in the remaining cases because the classifier blocks it. The team schedules the same suite to run against every future model update.