Shaping the model: data and training
Constitutional AI and rule-based rewards
Turn a written principle set into an AI-generated reward model, replacing most human harm labels.
Constitutional AI trains a model against a written list of principles instead of thousands of human labels of harmful outputs. An AI model reads the principles and judges which of two answers follows them better. Those AI judgements become the training reward. Because the rules are written down, safety training gets cheaper, easier to change and easier to inspect.
How it works
Anthropic's December 2022 method has two phases. In the first, the model answers a risky prompt, critiques its own answer against a principle (for example, that it should not help with harmful acts), rewrites the answer, and is then fine-tuned on the rewrites. In the second, the model produces two answers to each prompt, an AI judge picks the one that better fits the principles, and those choices train a preference model. Reinforcement learning then uses that preference model as its reward, a step called reinforcement learning from AI feedback (RLAIF).
Other labs use close relatives. OpenAI's Rule Based Rewards (2024) method writes fine-grained rules, such as "refusals should not be judgmental", and has a language-model grader score each answer against them directly during training. OpenAI's deliberative alignment (December 2024) goes a step further. It teaches the model the safety rules themselves and trains it to reason over them before answering.
Where research stands
The method is mature. Anthropic says its published constitution "plays a crucial role in our training process", and OpenAI has published two rule-based variants. Comparisons find that AI feedback can stand in for human feedback. In a Google DeepMind study, summaries tuned with AI feedback were preferred over a baseline 71% of the time, against 73% for human feedback, a gap that was not statistically significant. OpenAI reported that its rule-based rewards scored 97.1 on a safety-and-usefulness measure, against 91.7 for a human-feedback baseline. In February 2024 Hugging Face released datasets, models and code for constitutional training of open models.
Two questions remain open. An AI judge carries its own blind spots and biases into the reward, and the model can learn to satisfy the judge rather than the principle. The other question is who writes the principles. In October 2023 Anthropic and the Collective Intelligence Project drafted a constitution with about 1,000 Americans. It overlapped with Anthropic's own by roughly half, and a model trained on it showed lower bias on one benchmark with similar performance. Critics argue that company-written constitutions borrow the language of law without public accountability.
Key results
- A model trained with self-critique against written principles and AI preference labels became harmless but non-evasive, explaining its objections rather than just refusing, with far fewer human labels. Yuntao Bai et al. (Anthropic, 51 authors), 2022
- AI feedback matched human feedback on summarisation (71% vs 73% win rate over a baseline, not a significant difference) and gave a higher harmless rate in dialogue (88% vs 76%). Harrison Lee et al. (Google DeepMind and Google), 2023
- A single broad principle, roughly "do what's best for humanity", was enough for the largest models to become harmless and stop expressing interest in power, though specific rules still gave finer control. Sandipan Kundu, Yuntao Bai, Saurav Kadavath, Amanda Askell et al., 2023
- Rule Based Rewards, graded by a language model, reached an F1 score of 97.1 on balancing safety and usefulness, against 91.7 for a human-feedback baseline. Tong Mu, Alec Helyar, Johannes Heidecke et al. (OpenAI), 2024
- A constitution drafted with about 1,000 Americans overlapped with Anthropic's by roughly 50%; the model trained on it showed lower bias across nine social dimensions with similar benchmark scores. Anthropic and the Collective Intelligence Project, 2023
- Teaching models the written safety rules and training them to reason over the rules before answering improved jailbreak robustness while reducing over-refusal. Melody Y. Guan et al. (OpenAI), 2024
Open problems
- The AI judge is itself imperfect, so its errors and biases can flow into the reward, and the model can learn to satisfy the judge rather than the principle.
- General principles generalise well but give coarse control, while specific rules give control but may not cover new cases; the right mix is unsettled. source
- There is no agreed process for choosing the principles, or for giving the public a real say in them. source
See all open problems in this group
Criticisms
- Constitutional AI writes principles down but does not give them democratic legitimacy or explain individual decisions; the author proposes public deliberation and "AI Courts" instead. Gilad Abiri
- Calling a company's rulebook a "constitution" hides that the company is "the author, interpreter, and arbiter of the principles by which it claims to be bound". Lisa Klaassen and Ralph Schroeder (Lawfare)
Who works on it
- Anthropic: Created Constitutional AI and says its published constitution plays a crucial role in training Claude. Constitutional AI: Harmlessness from AI Feedback (2022)
- OpenAI: Developed Rule Based Rewards and deliberative alignment, which train models against written safety rules. Rule Based Rewards for Language Model Safety (2024)
- Google DeepMind: Compared AI feedback with human feedback head to head. RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedback (2023)
- Collective Intelligence Project: Ran the public process that drafted a constitution with about 1,000 Americans. Collective Constitutional AI: Aligning a Language Model with Public Input (2023)
- Hugging Face: Released open datasets, models and code for constitutional training of open models. Constitutional AI with Open LLMs (2024)
Status
Mature, in production.
Start reading
- Constitutional AI: Harmlessness from AI Feedback, Yuntao Bai et al. (2022). The original method, clearly laid out.
- Collective Constitutional AI: Aligning a Language Model with Public Input, Anthropic and the Collective Intelligence Project (2023). A worked attempt to let the public write the rules.
- Constitutional AI with Open LLMs, Shengyi Costa Huang, Lewis Tunstall et al. (Hugging Face) (2024). Hands-on explainer with open code.
- Public Constitutional AI, Gilad Abiri (2024). The legitimacy critique and a proposed fix.
- Deliberative Alignment: Reasoning Enables Safer Language Models, Melody Y. Guan et al. (2024). Where the idea went next: models that reason over the rules.
Related approaches
- Model specs and constitutions the written spec the AI judge uses
- Learning from feedback (RLHF) the human-feedback method it replaces
- Public input into model values public input into the principles
- Defining the alignment target choosing which values to write down
In their own words
The only human oversight is provided through a list of rules or principles, and so we refer to the method as 'Constitutional AI'. ... In the RL phase, we sample from the finetuned model, use a model to evaluate which of the two samples is better, and then train a preference model from this dataset of AI preferences.
Yuntao Bai et al. (Anthropic), Constitutional AI: Harmlessness from AI Feedback, 2022
Our method, Rule Based Rewards (RBR), uses a collection of rules for desired or undesired behaviors (e.g. refusals should not be judgmental) along with a LLM grader. In contrast to prior methods using AI feedback, our method uses fine-grained, composable, LLM-graded few-shot prompts as reward directly in RL training, resulting in greater control, accuracy and ease of updating.
Tong Mu et al. (OpenAI), Rule Based Rewards for Language Model Safety, 2024
Suggest a correction Something wrong, out of date or missing, such as an organisation? Opens a GitHub issue (free account needed).