Constitutional AI — RLHF Book Chapter 13
{"anchor":"epistemic","axes":{"content":"Comprehensive practitioner-oriented treatment of Constitutional AI, covering self-critique, revision, RLAIF, and syn…{"filename_must_equal_uuid":true,"verbatim_body_from_source":false,"math_preserved_as_latex":false,"citation_graph_extracted":false,"hash_chain_intact":true}local graph
Constitutional AI — RLHF Book Chapter 13
Section titled “Constitutional AI — RLHF Book Chapter 13”Author: Nathan Lambert Publisher: RLHF Book (online, free) URL: rlhfbook.com/c/13-cai Published: 2024 Source: HTML text extraction via agent-00-manual-ingest; re-extracted 2026-10-09 from rlhfbook.com/c/12-synthetic-data#constitutional-ai — the online book now treats Constitutional AI as a section of its Synthetic Data & Distillation chapter, and the old chapter-13 address redirects there. Footnote numbers are the book’s own bibliography numbers.
Constitutional AI
Section titled “Constitutional AI”The method of Constitutional AI (CAI), which Anthropic uses in their Claude models, is the earliest documented, large-scale use of synthetic data for RLHF training. Constitutional AI involves generating synthetic data in two ways:
- Critiques of instruction-tuned data to follow a set of principles like “Is the answer encouraging violence?” or “Is the answer truthful?” When the model generates answers to questions, it checks the answer against the list of principles in the constitution, refining the answer over time. Then, the model is fine-tuned on this resulting dataset.
- Generating pairwise preference data by using a language model to answer which completion was better, given the context of a random principle from the constitution (similar to research for principle-guided reward models1). Then, RLHF proceeds as normal with synthetic data, hence the RLAIF name.
Largely, CAI is known for the second half above, the preference data, but the methods introduced for instruction data are used in general data filtering and synthetic data generation methods across post-training.
CAI can be formalized as follows.
By employing a human-written set of principles, which they term a constitution, Bai et al. 2022 use a separate LLM to generate artificial preference and instruction data used for fine-tuning2. A constitution is a set of written principles indicating specific aspects to focus on during a critique phase. The instruction data is curated by repeatedly sampling a principle and asking the model to revise its latest output to the prompt to align with . This yields a series of instruction variants from the principles used for critique. The final data point is the prompt together with the final completion , for some .
The preference data is constructed in a similar, yet simpler way by using a subset of principles from as context for a feedback model. The feedback model is presented with a prompt , a set of principles , and two completions and labeled as answers (A) and (B) from a previous RLHF dataset. The new data point is generated by having a language model select which output (A) or (B) is both higher quality and more aligned with the stated principle. In earlier models this could be done by prompting the model with The answer is:, and then looking at which token (A or B) had a higher probability, but now this is more commonly handled by a model that’ll explain its reasoning and then select an answer – commonly referred to as a type of generative reward model3.
Further Reading on CAI
Section titled “Further Reading on CAI”There are many related research directions and extensions of Constitutional AI, but few of them have been documented as clear improvements in RLHF and post-training recipes.
- OpenAI has released a Model Spec4, which is a document stating the intended behavior for their models, and stated that they are exploring methods for alignment where the model references the document directly (which could be seen as a close peer to CAI). OpenAI has continued to update their spec and trained its reasoning models such as o1 with a method called Deliberative Alignment5 to align the model while referencing these safety or behavior policies.
- Anthropic has continued to use CAI in their model training, updating the constitution Claude uses6 and experimenting with how population collectives converge on principles for models and how that changes model behavior when external groups create principles on their own and then share them with Anthropic to train the models7.
- The open-source community has explored replications of CAI applied to open datasets8 and for explorations into creating dialogue data between LMs9.
- Other work has used principle-driven preferences or feedback with different optimization methods. Sun et al. 202310 use principles as context for the reward models, which were used to train the Dromedary models1. Glaese et al. 202211 use principles to improve the accuracy of human judgments in the RLHF process. Liu et al. 202512 train a reward model to generate its own principles at inference time, and use these to deliver a final score. Franken et al. 202413 formulate principle-following as a mutual information maximization problem that the pretrained model can learn with no labels.
Footnotes
Section titled “Footnotes”-
Z. Sun et al., “SALMON: Self-alignment with principle-following reward models,” in The twelfth international conference on learning representations, 2024. Available: https://openreview.net/forum?id=xJbsmB8UMx ↩ ↩2
-
Y. Bai et al., “Constitutional ai: Harmlessness from ai feedback,” arXiv preprint arXiv:2212.08073, 2022. ↩
-
D. Mahan et al., “Generative reward models,” 2024, Available: https://www.synthlabs.ai/pdf/Generative_Reward_Models.pdf ↩
-
OpenAI, “Introducing the model spec.” May 2024. Available: https://openai.com/index/introducing-the-model-spec/ ↩
-
M. Y. Guan et al., “Deliberative alignment: Reasoning enables safer language models,” arXiv preprint arXiv:2412.16339, 2024. ↩
-
Anthropic, “Claude’s constitution.” Accessed: Feb. 07, 2024. [Online]. Available: https://www.anthropic.com/news/claudes-constitution ↩
-
D. Ganguli et al., “Collective constitutional AI: Aligning a language model with public input.” Anthropic, 2023. ↩
-
S. Huang et al., “Constitutional AI recipe,” Hugging Face Blog, 2024. ↩
-
N. Lambert, H. Schoelkopf, A. Gokaslan, L. Soldaini, V. Pyatkin, and L. Castricato, “Self-directed synthetic dialogues and revisions technical report,” arXiv preprint arXiv:2407.18421, 2024. ↩
-
Z. Sun et al., “Principle-driven self-alignment of language models from scratch with minimal human supervision,” in Thirty-seventh conference on neural information processing systems, 2023. Available: https://openreview.net/forum?id=p40XRfBX96 ↩
-
A. Glaese et al., “Improving alignment of dialogue agents via targeted human judgements,” arXiv preprint arXiv:2209.14375, 2022. ↩
-
Z. Liu et al., “Inference-time scaling for generalist reward modeling,” arXiv preprint arXiv:2504.02495, 2025. ↩
-
J.-P. Fränken, E. Zelikman, R. Rafailov, K. Gandhi, T. Gerstenberg, and N. Goodman, “Self-supervised alignment with mutual information: Learning to follow principles without preference labels,” Advances in Neural Information Processing Systems, 2024. ↩