Constitutional classifiers

On this page 7

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.

StageWhat happensPurpose
Constitution writingExperts define restricted and permitted categoriesExplicit, auditable policy
Synthetic generationA model produces labeled examples per categoryScalable training data
AugmentationTranslations, ciphers, jailbreak styles are appliedRobustness to obfuscation
Classifier trainingInput and output classifiers are fine-tunedFast, specialized detection
Red teamingHuman and automated attackers probe the systemMeasured robustness before release
Stages of the constitutional classifier pipeline

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.

PropertyInput classifierOutput classifier
What it readsThe prompt and conversation contextThe response as it is generated
When it actsBefore generation startsDuring generation, per token
Typical catchExplicit harmful requestsHarmful content reached through obfuscation
Main riskBlocking benign but sensitive questionsStopping legitimate answers partway
Comparison of the two classifier roles

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.

ParameterRaising itLowering it
Block thresholdFewer false positives, more missed attacksMore refusals, fewer missed attacks
Classifier sizeBetter detection, higher latencyLower cost, weaker on obfuscation
Constitution scopeBroader coverage, more overblocking riskNarrower coverage, fewer false alarms
Trade-offs that operators tune

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.

DefenseWhere it actsMain limitation
Refusal trainingInside the generating modelBypassed by novel jailbreaks
Constitutional classifiersSeparate models on input and outputCompute cost and some overblocking
Keyword and regex filtersText pattern matchingTrivially evaded by paraphrase or encoding
Instruction hierarchyModel training on privilege levelsTargets prompt injection, not harmful knowledge
Position among model-level defenses

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.