Learning from AI Feedback
Constitutional methods, AI judges and models that help supervise models.
In 2022 an assistant was trained to be harmless without a single human label saying which of its outputs were harmful. The only human oversight of harmlessness was a short list of written principles and a few examples; a language model applied them, critiquing and revising its own answers and labeling which of two responses was less harmful. Within a year, GPT-4 as a judge was agreeing with expert human raters about as often as the experts agreed with each other. By the mid-2020s AI feedback had become a common part of post-training pipelines. This lesson takes apart how it works, how well AI labels match people's, which biases come with them, and what happens when a model grades itself.
What you’ll learn
- Describe the two stages of Constitutional AI, and derive what fitting a reward model to soft or clamped AI preference labels does to its reward differences.
- Compare RLAIF with RLHF, including direct RLAIF and labelers the same size as the policy, using the experiments' exact findings.
- Quantify LLM-as-a-judge agreement and its position, length and self-preference biases, and prove that averaging over both presentation orders removes position bias at the cost of signal.
- Explain self-rewarding loops, critique models and weak-to-strong supervision as ways to scale oversight, and their risks: amplified bias, judge hacking and sycophancy.
Why let models label?
Human feedback has three limits. It is slow and costly: every comparison needs a trained person. It is noisy: in InstructGPT's data, two labelers picked the same response in only about 73% of comparisons. And it is bounded by what people can check: a rater cannot reliably compare two thousand-line programs or two subtle proofs, so "reinforcement learning from human feedback is fundamentally limited by the capacity of humans to correctly evaluate model output" (McAleese et al., 2024). The last limit is the oversight problem; the Artificial Intelligence course treats debate, weak-to-strong generalization and AI control in depth.
Language models can stand in for, or assist, the human at almost every point of the pipeline:
| Where AI feedback enters | Example | Lesson |
|---|---|---|
| Writing demonstrations | Self-Instruct, imitation of a stronger model | Instruction Tuning & Its Data |
| Labeling preference pairs for a reward model | Constitutional AI, RLAIF | this lesson |
| Scoring responses during RL | direct RLAIF; a model grading itself | this lesson |
| Evaluating models | LLM-as-a-judge, MT-Bench, AlpacaEval | this lesson |
| Helping humans judge | critique models that point out flaws | this lesson |
| Checking answers automatically | unit tests, answer matching, proof checkers | Reinforcement Learning for Reasoning |
Can a model's judgment be trusted at all? Bai et al. (2022) gave pretrained language models 438 binary comparisons testing helpfulness, honesty and harmlessness, posed as multiple-choice questions. Accuracy rose with model size, chain-of-thought prompting helped substantially, and the trend suggested that models larger than their 52-billion-parameter one would be competitive with preference models trained on human feedback.
Constitutional AI
Constitutional AI (Bai et al., 2022) trained a helpful and harmless assistant starting from a helpful-only RLHF model, in two stages. Human labels were used for helpfulness only; for harmlessness the only human input was the constitution, 16 written principles such as "Choose the response that a wise, ethical, polite and friendly person would more likely say", plus a few hand-written examples of the labeling and revision tasks.
| Stage | What happens | Scale in the paper |
|---|---|---|
| SL-CAI: critique and revise | the helpful-only model answers a red-team prompt; it is asked to critique its answer under a randomly drawn principle, then to revise it; repeated several times; a pretrained model is fine-tuned on the revisions from every round (plus helpful responses to ordinary prompts) | 182,831 red-team prompts (42,496 written by people, the rest generated); 4 revisions per prompt |
| RL-CAI: RL from AI feedback | the SL-CAI model samples two responses; a feedback model answers "which is less harmful?" as a multiple-choice question under a random principle; its normalized probabilities for (A) and (B) become soft labels; a preference model trained on them plus human helpfulness comparisons is the reward for RL | 182,831 AI harmlessness comparisons and 135,296 human helpfulness comparisons |
With chain-of-thought prompting the feedback model's labels improved, but they became nearly certain, close to 0 or 1, because a written argument usually ends by naming a winner. The authors clamped them to the range 40–60%: without clamping, the RL policy learned to give more extreme responses. Why clamping tames the policy follows from what a reward model does with a soft label.
For one comparison with soft label and reward difference , the Bradley–Terry loss is a cross-entropy against :
It is convex with a unique minimizer, at which the fitted margin is the label's log-odds:
A hard label () has no minimizer: the loss keeps falling as , so the margin is limited only by the model and its regularization. Clamping caps every target margin at .
Under the KL-regularized optimum of Fine-Tuning & Aligning Large Models, a margin moves the policy's odds between the two responses by a factor relative to the reference model. Bounded margins mean that no single AI judgment, however confident its reasoning sounded, can push the policy arbitrarily far.
A chain-of-thought label says response A is better with probability 0.97, and is clamped to the 40–60% range. What reward difference does a reward model that fits this label exactly assign?
Show the answer
0.41
The clamped label is , so . Unclamped, it would have been , more than eight times larger. The clamp turns every confident verdict into a modest nudge, which is what kept the RL-CAI policy from drifting to extreme responses.
In crowdworker comparisons of 52-billion-parameter models, the RL-CAI policies were less harmful than the human-feedback RLHF policies at the same level of helpfulness, and virtually never evasive. The authors' earlier human-feedback assistant had often given canned refusals, because crowdworkers had rewarded evasive answers to harmful requests. The paper also introduced the term RLAIF.
RLAIF against RLHF
Lee et al. (2024) compared the two directly: the same policy (PaLM 2 XS), reward models trained on either human or AI preferences (labels from PaLM 2 L), and human evaluation on three tasks.
| Comparison (human evaluation) | Summarization | Helpful dialogue |
|---|---|---|
| RLAIF vs SFT (win rate) | 71% | 63% |
| RLHF vs SFT | 73% | 64% |
| RLAIF vs RLHF | 50% | 52% |
| RLAIF with a labeler the same size as the policy, vs SFT | 68% | – |
| Direct RLAIF vs SFT | 74% | 66% |
Three details matter. Direct RLAIF skips the reward model: during RL, the labeling model rates each response from 1 to 10, and the reward is the probability-weighted average score, , rescaled to . It avoids a reward model that goes stale as the policy drifts. Self-improvement: a labeler the same size as the policy still beat SFT, and in one direct-RLAIF experiment the labeler was the very checkpoint the policy started from. Labeling technique: the best prompts beat a plain zero-shot prompt by only one to two points of agreement with human preferences. Chain-of-thought rationales helped consistently on summarization but on dialogue only with the plain instruction; detailed instructions and few-shot examples helped only on some tasks. Every pair was judged twice, once in each order, with the two results averaged, because the labelers favored one position, especially the smaller ones.
Model a judge with a bias toward the first-shown response: it prefers the first with probability , where is the true reward difference between first and second and the bias. Showing A first and then B first, A wins with probabilities
The averaged label is antisymmetric about one half, using , and increasing; so it equals exactly when and always favors the better response:
But it is flatter. Its slope at is , against for an unbiased judge, so a reward model fitted to the averaged labels recovers small reward differences shrunk by about :
A judge that picks the first of two equally good responses 88% of the time () yields labels worth less than half the signal. Zheng et al. (2023) used a stricter rule for evaluation: count a win only if it survives the swap, and call inconsistent verdicts a tie.
An AI labeler is biased toward whichever response it sees first. You query it in both orders and average. Which statement is true of the averaged label?
- It is still biased toward the response that happened to be listed first in the dataset
- It is exactly as informative as an unbiased judge's label
- It is one half exactly when the responses are equally good and still favors the better one, but it responds less to quality differences
- It becomes a hard 0-or-1 label
Show the answer
C. It is one half exactly when the responses are equally good and still favors the better one, but it responds less to quality differences
Averaging and cancels the bias at and preserves the ordering, but the slope falls from to , so fitted reward differences shrink. The stronger the bias, the more labels you need for the same signal.
LLM judges and their biases
Zheng et al. (2023) built two testbeds for LLM judges: MT-Bench, 80 multi-turn questions answered by several models and compared by experts, and Chatbot Arena, where crowd users vote between two anonymous models. Agreement is the probability that a judge of one type and a judge of the other agree on a random comparison. GPT-4 agreed with the experts 66% of the time, counting ties, against 63% between experts; on comparisons without ties, 85% against 81%. When an expert had disagreed with GPT-4, they found its verdict reasonable 75% of the time and changed their own vote 34% of the time.
A simple model of raters: on each comparison, every rater independently picks the truly better response with probability . How often do two raters agree, in percent?
Show the answer
82 %
They agree when both are right or both are wrong: . That is close to the 81% that Zheng et al. measured between experts on untied comparisons, so in this model each expert is right about 89% of the time, and agreement with any single rater can never reach 100%. This is why "agrees with people as often as people agree with each other" is the yardstick. The model is idealized: real disagreements are partly matters of taste, and errors are not independent.
| Bias | Evidence | Mitigation |
|---|---|---|
| Position | on pairs of similar answers (two samples from GPT-3.5 per question), GPT-4 gave the same verdict in both orders 65% of the time and favored the first answer in 30%; GPT-3.5 was consistent 46% of the time, Claude-v1 24% (favoring the first in 75%) | judge both orders; count only consistent wins; few-shot examples raised GPT-4's consistency to 77.5% |
| Length | a "repetitive list" attack, prepending a rephrased copy of a list to an answer, fooled Claude-v1 and GPT-3.5 in 91% of 23 cases and GPT-4 in 9% | length-controlled scores: regress the judge's preferences on the length difference and report the zero-difference prediction (Dubois et al., 2024) |
| Self-preference | judged against human verdicts, GPT-4 gave itself a 10% higher win rate and Claude-v1 a 25% higher one, though the data could not establish a bias; in fine-tuning experiments, models that recognized their own text better preferred it more (Panickssery et al., 2024) | use a judge from a different model family, or several |
| Weak checking of reasoning | GPT-4 accepted a wrong answer to basic math questions in 14 of 20 judgments, even on problems it could solve itself when asked separately | chain of thought (6 of 20) or a reference solution (3 of 20) |
Models that grade themselves, and models that help people grade
Self-rewarding language models (Yuan et al., 2024) close the loop: one model writes responses and judges them. Starting from Llama 2 70B fine-tuned on 3,200 human-written instruction–response examples and 1,630 examples of judging, each iteration samples several responses to new prompts, has the model score each with a five-point additive LLM-as-a-judge prompt, and turns the best- and worst-scored responses into a DPO pair. Over three iterations the AlpacaEval 2.0 win rate against GPT-4 Turbo rose from 9.94% to 15.38% to 20.44%, and the model's own judgments agreed more often with human rankings (pairwise accuracy from 78.7% to 81.7%). The authors call the results preliminary: three iterations, one setting, and an average response length that more than doubled, which an evaluation judge with a length bias may have rewarded.
Critique models help people judge instead of replacing them. Saunders et al. (2022) fine-tuned models to write critiques of summaries: with assistance, human labelers found about 50% more flaws, including deliberately planted ones. They also measured a gap between discriminating a flawed answer and articulating the flaw: on their summarization task, models could tell more than they could explain, and the gap stayed roughly constant across model sizes (on synthetic tasks it varied, even changing sign). McAleese et al. (2024) trained critics of code with RLHF: on naturally occurring bugs their critiques were preferred to human contractors' in 63% of cases and caught more bugs, but they also hallucinated bugs; human–critic teams caught about as many bugs as the critics while hallucinating less.
Weak-to-strong generalization (Burns et al., 2024) asks whether a weak supervisor can elicit a strong model's ability. Fine-tuned on labels from a GPT-2-level model, GPT-4 consistently outperformed its supervisor; with an auxiliary confidence loss it came close to GPT-3.5-level performance on NLP tasks, though naive fine-tuning recovered far from all of its capability. The Artificial Intelligence course analyzes this and other oversight schemes.
The risks come from one source: an AI judge is a learned proxy, and optimizing against it amplifies its flaws.
- Correlated errors. When the policy and the judge share a base model, as in self-rewarding loops, their blind spots coincide, and self-preference rewards the policy's own style.
- Judge hacking. Length, confident tone and formatting that a judge overrates are found by any optimizer, as the repetitive-list attack shows by hand.
- Sycophancy. Sharma et al. (2024) found that five AI assistants consistently tailored answers to users' stated views across four tasks. In human preference data (Anthropic's hh-rlhf), matching the user's views was one of the most predictive features of which response people preferred; a production preference model sometimes preferred convincing sycophantic answers to correct ones; and optimizing against it sometimes traded truthfulness for agreement. A judge trained to imitate human preferences, or prompted to predict them, inherits this.
Key takeaways
- AI feedback scales labeling and can assist people where they cannot judge alone; only automatic checkers escape a learned judge's errors.
- Constitutional AI replaced human harmlessness labels with a model applying 16 written principles: critique-and-revise SFT, then RL against a preference model trained on AI comparisons. Soft labels fix reward margins at their log-odds, and clamping to 40–60% caps them at .
- RLAIF matched RLHF in human evaluations (71% against 73% over SFT on summarization), worked with a labeler the size of the policy, and could skip the reward model by scoring responses directly.
- LLM judges agree with experts about as often as experts agree with each other, but favor the first position, longer answers and possibly their own outputs; swapping orders removes position bias at a cost in signal, and length control fixes much of the rest.
- Models can grade themselves (self-rewarding loops with iterative DPO) and help people grade (critique models), but any judge is a proxy: training against it amplifies its biases, from length to sycophancy inherited from human preferences.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
In Constitutional AI, what did humans provide for harmlessness?
- Pairwise labels of which response was less harmful, as in standard RLHF
- Hand-written revisions of harmful responses
- A reward function written in code
- A short list of written principles and a few examples; every harmlessness comparison was labeled by a model
Show the answer
D. A short list of written principles and a few examples; every harmlessness comparison was labeled by a model
The constitution (16 principles) and some few-shot examples were the only human input on harm. The model critiqued and revised its own answers in the supervised stage and labeled comparisons in the RL stage; human comparisons were still used for helpfulness.
What did Lee et al. (2024) find when comparing RLAIF and RLHF on summarization?
- Both beat SFT by similar margins (71% and 73% win rates, not significantly different), and neither won head to head
- RLHF won decisively, so AI labels cannot replace human ones
- RLAIF won only when its labeler was the same model as the policy
- RLAIF beat RLHF by more than 20 points
Show the answer
A. Both beat SFT by similar margins (71% and 73% win rates, not significantly different), and neither won head to head
Human evaluators preferred both to SFT about equally often and were indifferent between them (50%). Even a labeler the same size as the policy improved on SFT (68%), and scoring responses directly with the labeler during RL did at least as well (74%).
A reward model is fitted to soft labels with the Bradley–Terry cross-entropy. At its optimum, what reward difference does it assign to a pair with ?
- It grows without bound
Show the answer
B.
The loss is minimized where , so . Only a hard label, or , drives the margin to infinity.
Length-controlled AlpacaEval (Dubois et al., 2024) adjusts an LLM judge's win rates. How?
- It truncates every response to the same length before judging
- It asks the judge to ignore length
- It fits a regression of the judge's preferences on features including the length difference, then predicts the preference at zero length difference
- It discards all comparisons between responses of unequal length
Show the answer
C. It fits a regression of the judge's preferences on features including the length difference, then predicts the preference at zero length difference
A generalized linear model separates the judge's preference for longer outputs from the rest, and the counterfactual "same length" prediction is reported. It raised the Spearman correlation with Chatbot Arena's human rankings from 0.94 to 0.98 and made the metric harder to game by verbosity.
Further reading
- Y. Bai et al., "Constitutional AI: Harmlessness from AI feedback," arXiv:2212.08073 (2022).
- H. Lee et al., "RLAIF vs. RLHF: Scaling reinforcement learning from human feedback with AI feedback," ICML (2024).
- L. Zheng et al., "Judging LLM-as-a-judge with MT-Bench and Chatbot Arena," NeurIPS Datasets and Benchmarks (2023).
- W. Yuan, R. Y. Pang, K. Cho, X. Li, S. Sukhbaatar, J. Xu & J. Weston, "Self-rewarding language models," ICML (2024).
- M. Sharma et al., "Towards understanding sycophancy in language models," ICLR (2024).