Constitutional classifiers are safeguard models that screen the inputs and outputs of a large language model, trained on synthetic data generated from a natural-language constitution that defines which content is permitted and which is restricted. In AI security, they are a defense against universal jailbreaks, prompting strategies that reliably extract dangerous information across many queries, with a particular focus on chemical, biological, radiological and nuclear weapons knowledge.
The approach was introduced by Anthropic in early 2025 as a layer separate from the model’s own refusal training. Instead of relying on the generating model to recognize every attack, a dedicated classifier pair decides independently whether a request or a partial response crosses a defined harm boundary.
How constitutional classifiers work
Constitutional classifiers work by turning a written policy into training data and then training classifiers on that data. The constitution lists categories of harmful content and, equally important, categories of harmless content that must stay allowed, such as basic chemistry education or common medication questions.
A capable language model uses the constitution to generate large volumes of synthetic prompts and responses for both sides of each boundary. These examples are then expanded with data augmentation: translation into other languages, paraphrasing, cipher and encoding transformations, role-play framings and known jailbreak templates. The augmentation teaches the classifiers to recognize harmful intent even when it is disguised.
The pipeline consists of the stages shown below.
| Stage | What happens | Purpose |
|---|---|---|
| Constitution writing | Experts define restricted and permitted categories | Explicit, auditable policy |
| Synthetic generation | A model produces labeled examples per category | Scalable training data |
| Augmentation | Translations, ciphers, jailbreak styles are applied | Robustness to obfuscation |
| Classifier training | Input and output classifiers are fine-tuned | Fast, specialized detection |
| Red teaming | Human and automated attackers probe the system | Measured robustness before release |
Input and output classifier roles
The system uses two complementary classifiers: one evaluates the incoming prompt, and the other evaluates the response as it is generated. Splitting the task this way catches attacks that look harmless at the input stage but produce dangerous content once the model answers.
The output classifier operates in streaming mode, scoring the response token by token. When the predicted harm probability for the full continuation exceeds a threshold, generation is halted mid-stream, so the user never receives the complete harmful answer. This design avoids waiting for the entire response before a decision, which would add latency and expose partial content.
| Property | Input classifier | Output classifier |
|---|---|---|
| What it reads | The prompt and conversation context | The response as it is generated |
| When it acts | Before generation starts | During generation, per token |
| Typical catch | Explicit harmful requests | Harmful content reached through obfuscation |
| Main risk | Blocking benign but sensitive questions | Stopping legitimate answers partway |
Robustness results and costs
Constitutional classifiers were evaluated through a public bug bounty and extensive human red teaming, reported at several thousand hours of attempts, in which no participant found a universal jailbreak that answered all target questions at the level of detail required. In automated evaluations, the reported jailbreak success rate fell from about 86 percent to under 5 percent for the guarded model compared with an unguarded one.
The defense has measurable costs. The first published version reported an increase in refusals on harmless traffic of well under one percentage point and a substantial inference compute overhead, roughly one quarter of the base cost. Later research iterations focused on reducing that overhead, for example by reusing internal activations of the model rather than running a separate full-size classifier.
| Parameter | Raising it | Lowering it |
|---|---|---|
| Block threshold | Fewer false positives, more missed attacks | More refusals, fewer missed attacks |
| Classifier size | Better detection, higher latency | Lower cost, weaker on obfuscation |
| Constitution scope | Broader coverage, more overblocking risk | Narrower coverage, fewer false alarms |
How they compare with related defenses
Constitutional classifiers belong to the broader family of safety classifiers and LLM firewalls, but they differ in how their training data is produced. Conventional moderation classifiers rely on human-labeled examples, which are slow to update; a constitutional classifier can be retrained quickly by editing the constitution and regenerating data when a new threat appears.
| Defense | Where it acts | Main limitation |
|---|---|---|
| Refusal training | Inside the generating model | Bypassed by novel jailbreaks |
| Constitutional classifiers | Separate models on input and output | Compute cost and some overblocking |
| Keyword and regex filters | Text pattern matching | Trivially evaded by paraphrase or encoding |
| Instruction hierarchy | Model training on privilege levels | Targets prompt injection, not harmful knowledge |
The method shares a name with Constitutional AI, but the purpose differs. Constitutional AI uses principles to shape the model’s own behavior during training, while constitutional classifiers enforce a policy externally at inference time.
Limitations and deployment considerations
Constitutional classifiers reduce rather than eliminate jailbreak risk. Their coverage is limited to the categories written into the constitution, so harms outside that scope pass through unless other safeguards address them.
- Scope dependence: an incomplete constitution leaves blind spots that attackers can target.
- Overblocking in dual-use domains such as virology or toxicology frustrates legitimate researchers.
- Adaptive attackers keep developing new obfuscations, so augmentation and retraining must be continuous.
- Partial leakage remains possible when harmful details are spread across many innocuous-looking conversations.
In practice, the classifiers work best as one layer of defense in depth, combined with refusal training, account-level abuse monitoring, rate limits and incident response processes.
In simple terms
Constitutional classifiers are like security guards for an AI chatbot. One guard checks each question at the door. A second guard reads the answer as it is being written. If either guard sees something truly dangerous, the conversation stops.
The guards learn their job from a written rulebook called a constitution. The rulebook says what is forbidden, such as instructions for making weapons, and what is fine, such as a school chemistry question. Because the rules are written down, they are easy to update when new tricks appear.
A practical example
A company offers a scientific assistant to university laboratories. Its security team worries that users could extract step-by-step instructions for dangerous pathogens by hiding requests in role-play or encoded text. The team writes a constitution that restricts weaponization details but explicitly permits standard biosafety and laboratory protocols.
After training input and output classifiers on synthetic data derived from that constitution, the team runs a two-week red-team exercise. Attackers try translations into rare languages, base64 encoding and multi-turn role-play. The output classifier stops most attempts mid-response.
Monitoring after launch shows that refusals on ordinary biology questions rise only slightly, while no tested jailbreak delivers the restricted content. When a new attack style appears months later, the team adds it to the augmentation set and retrains within days.