Loading patterns…
Constitutional Classifiers(CC)
Lightweight input and output classifiers trained on synthetic data generated from a natural-language constitution that defines allowed and blocked content. They are cascaded so cheap screening covers all traffic while suspicious cases escalate, and the output classifier can halt a streaming generation the moment a violating token appears. This is distinct from Constitutional AI: Constitutional AI aligns the model during training, while Constitutional Classifiers are runtime guards trained from a constitution.
In 30 seconds
- What
- Trains lightweight classifiers on synthetic data from a natural-language constitution to screen inputs before inference and halt outputs at first violating token.
- When to use
- High-volume systems needing runtime content filtering where constitution rules are clear and attack patterns can be synthesized for training.
- Watch out
- Classifiers trained on synthetic data may miss novel obfuscation or adversarial phrasing not represented in constitution-generated examples.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Constitutional Classifiers: Overview
Lightweight input and output classifiers trained on synthetic data generated from a natural-language constitution that defines allowed and blocked content. They are cascaded so cheap screening covers all traffic while suspicious cases escalate, and the output classifier can halt a streaming generation the moment a violating token appears. This is distinct from Constitutional AI: Constitutional AI aligns the model during training, while Constitutional Classifiers are runtime guards trained from a constitution.
- Constitution in natural language defines allowed vs blocked content
- Synthetic training data generated from the constitution
- Input classifier screens prompts before the model runs
- Streaming output classifier halts generation at first violating token
- Cascaded cheap-to-expensive screening controls cost
- Constitution can be updated as new attack classes emerge
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
From the engineer behind this catalog
Get your agent system red-teamed
The controls described here only hold if somebody tries to break them. Have yours tested the way a real attacker would: prompt injection, jailbreaks, tool misuse and data exfiltration, every finding written up next to its fix.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September