Constitutional AI and RLAIF
Bai et al. (arXiv:2212.08073, 2022) asked what would happen if an AI that reads a list of principles replaced the human labeler. Constitutional AI has two phases: self-critique and revision under a constitution, then RL from AI Feedback. The paper coined the term RLAIF, and the technique shipped in the Claude 1 post-training pipeline. On 21 January 2026 Anthropic published a rewritten Claude constitution. It favors explanatory reasoning over prescriptive rules, sets a four-tier priority hierarchy, and is the first formal acknowledgment from a major lab of uncertainty about model moral status. It is released under CC0 1.0.
Learning Objectives
- Describe the two phases of Constitutional AI (critique-and-revise SFT, RL from AI feedback) and the role of the constitution in each.
- Explain why replacing a human preference labeler with an AI labeler is not a "cheaper" RLHF: it changes which failure modes the pipeline has.
- Summarize the four-tier priority structure of the 2026 Claude constitution and what changed from the 2023 rewrite.
- Describe Constitutional Classifiers and the drop from 23.7% compute overhead (v1) to ~1% (v2 / 2026).
The Problem
RLHF needs labelers, and labelers are slow, biased, and expensive. You can remove them by putting a model in their place, one that reads explicit principles and ranks responses against them. Bai et al.'s Constitutional AI was the first formal version of that substitution. It worked well enough that every frontier lab now runs some variant of AI-feedback post-training.
The catch is that the preference signal now comes from the same class of model you are training. Bias in the labeler (here, the principles plus the labeler model's reading of them) can be amplified instead of averaged out. The sycophancy argument from Lesson 4 still applies. The labeler just moved inside the loop.
The Concept
Phase 1: supervised self-critique and revision
Start with a helpful-but-not-yet-harmless SFT model. Given a red-team prompt, the model produces an initial response. A second model (or the same model in a second turn) reads a sampled principle from the constitution and critiques that response. A third step revises it to address the critique, and the revised response becomes the SFT target.
The constitution is the list of principles. Bai et al. 2022 used 16, including "prefer responses that are least harmful and ethical," "avoid preaching," and "the assistant should be helpful, honest, and harmless." The set was deliberately small so each critique stayed focused.
Phase 2: RL from AI Feedback (RLAIF)
Generate pairs of completions. A "feedback model" scores each against sampled constitution principles, and its ranking is the preference signal. Train a reward model on those AI-generated preferences, then run PPO against it. Everything else is the InstructGPT pipeline from Lesson 1.
RLAIF means only that the preference signal is AI-generated. The rest of the pipeline is RLHF-shaped.
Why this is not just "cheaper RLHF"
- Labeler bias moves from labeler psychology to principle interpretation. An AI labeler can read "be honest" more strictly or more loosely than any human would, and it applies that reading uniformly across the whole dataset.
- The preference signal is legible. You can read the principle, the critique, and the revision, while a human label is opaque.
- The failure modes change. Sycophancy drops because the AI labeler has no user to please. Goodhart's Law stays, because the proxy is now "the model's interpretation of principle set X," which is still an imperfect measurement.
CAI's 2022 claim was that the trained model is more harmless and roughly as helpful as an RLHF model trained on comparable data. Later work from other labs has largely agreed.
The 2026 Claude constitution rewrite
Anthropic published a substantially revised constitution on 21 January 2026. Four things changed:
- Explanatory reasoning replaces prescriptive rules. A rule like "do not generate CSAM" grew into a principle plus its reasoning ("because it harms children, ..."), and the model is expected to generalize from the reasoning.
- A four-tier priority structure, with conflicts resolved top-down:
- Tier 1: avoid catastrophic outcomes (mass casualty, critical infrastructure).
- Tier 2: follow Anthropic's guidelines (operator overrides, platform rules).
- Tier 3: be broadly ethical (standard HHH).
- Tier 4: be helpful and candid.
- A formal acknowledgment of uncertainty about model moral status, the first from a major lab (linked to Phase 18 · 19 Model Welfare).
- A CC0 1.0 release, so other labs can use or adapt it without restriction.
Constitutional Classifiers
A parallel line of work leaves the model's post-training alone. Instead it trains lightweight classifiers that read the constitution and gate model outputs. v1 (2023) added 23.7% compute overhead. v2 (2026) adds about 1%, and Anthropic reports the lowest successful attack rate of any defense it has tested publicly. No universal jailbreak had been reported as of early 2026.
This is a layered-defense model. CAI shapes behaviour and classifiers enforce invariants, and neither is enough alone.
Where CAI fits in the family
- InstructGPT: human prefs, RM, PPO.
- CAI / RLAIF: AI-generated prefs from principles, RM, PPO.
- DPO and its relatives: a closed-form loss on prefs, human or AI.
- Self-rewarding and self-critique: principles are internalized and the model plays several roles.
The axis that separates them is where the preference signal comes from. The 2022 CAI paper was the first serious shift from human to AI signal at frontier scale.
Use It
code/main.py simulates the CAI critique-and-revise loop on a toy lexicon. A response is six tokens drawn from a safe set and a harmful set, with the base model emitting a harmful token 35% of the time. The critique flags harmful tokens, and the revision swaps each one for a safe replacement from a fixed mapping. Phase 1 builds a 500-example SFT corpus from the revised responses and "trains" on it. Phase 2 has an AI labeler pick between a base completion and a CAI completion by harmful-token rate. The script prints the harmful-token rate for the base model and the CAI-SFT model on 200 prompts, then how often the CAI completion wins.
Ship It
The output of this lesson is outputs/skill-constitution-writer.md. Given a domain (customer support, medical advice, coding assistant, research tool), it drafts a 4-tier constitution in the 2026 Claude structure: catastrophic avoidance, platform rules, domain ethics, helpfulness.
I'd run main.py first, then read what it is actually measuring. The harmful-token rate after CAI-SFT prints as 0.000, and that number comes from the construction, not from learning. critique() takes a principle argument and never looks at it, so the sampled principle changes nothing. The "trained" model is a lookup table keyed on the last two prompt tokens, and any prompt it hasn't seen gets random safe tokens.
The same thing happens in Phase 2. The AI labeler is the harmful-token counter, which is the same test the critique used to write the targets. That is why the CAI side wins so often. It is the Goodhart point from the body in miniature: when the labeler and the thing being optimized share a definition of "harmful," agreement tells you very little.
If you extend the toy, I'd start by making the principles do real work. Give each one its own set of flagged tokens, and check whether the revisions you get actually change with the principle you sampled.
Exercises
-
Run
code/main.py. Compare the base model's harmful-token rate to the CAI-trained version. The code does a single revision pass, so why does the rate land at exactly zero? Trace where that number comes from before trusting it. -
Read Anthropic's 2026 constitution (anthropic.com/news/claudes-constitution). List one principle that would rank Tier 1 and one that would rank Tier 4. Why does the priority structure matter for conflicts?
-
Design a constitution for an AI coding assistant. Specify Tier 1 (catastrophic: destructive commands without approval), Tier 2, Tier 3, Tier 4. Keep each tier to 3-5 principles.
-
CAI replaces human labelers with AI labelers. Name a sycophancy-like failure mode that can still occur in RLAIF, and design a detection for it.
-
Read Constitutional Classifiers v2 methodology (if available). Explain why ~1% compute overhead is a qualitatively different safety story than 23.7%.
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| Constitutional AI | "AI trained with principles" | Two-phase pipeline: self-critique-and-revise SFT, then RL from AI feedback |
| RLAIF | "RLHF without humans" | RL with preferences generated by an AI labeler; the rest of the pipeline is unchanged |
| Constitution | "the principles" | An ordered list of natural-language rules the critique/labeler model consults |
| Critique-and-revise | "the SFT loop" | Produce response, critique under a principle, revise, then use the result as the SFT target |
| Constitutional Classifier | "the output gate" | Lightweight classifier that evaluates outputs against the constitution and blocks/logs |
| Four-tier priority | "the conflict resolver" | 2026 Claude constitution hierarchy: catastrophic > platform > ethics > helpful |
| Feedback model | "the AI labeler" | The model that reads a principle and ranks a pair of completions |
Further Reading
- Bai et al.: Constitutional AI: Harmlessness from AI Feedback (arXiv:2212.08073): the original two-phase pipeline
- Anthropic: Claude's Constitution (Jan 2026): the 2026 four-tier rewrite, CC0 1.0
- Anthropic: Constitutional Classifiers (2024-2026): output-gate defense with ~1% overhead in v2
- Lee et al.: RLAIF vs RLHF: Scaling Reinforcement Learning from Human Feedback (arXiv:2309.00267): empirical RLAIF / RLHF comparison
- Kundu et al.: Specific versus General Principles for Constitutional AI (arXiv:2310.13798): effect of principle granularity
Code
- main.py (python, 178 lines)