Evaluation lab · San Francisco · London · Zürich
Reinforced Labs Request a briefing
RL for language models

RLAIF and Constitutional AI: reinforcement learning from AI feedback

RLAIF swaps human preference labels for a model's judgments; Constitutional AI steers that model with a written list of principles. How both work, what the head-to-head comparisons with RLHF found, and a seeded simulation of how a labeller bias that agreement audits miss ends up in the reward model.

Part of RL for language models. New to the topic? Start with Reinforcement learning for LLMs: how RL trains language models, from RLHF to RLVR.

RLAIF (reinforcement learning from AI feedback) is RLHF in which the preference labels come from an AI model instead of human annotators: a labeller model reads two responses and says which is better, a reward model is trained on those labels, and the policy is optimised against it. Constitutional AI is the best-known RLAIF method: the labeller is steered by a short written list of principles, the "constitution", which is also used to make the model critique and revise its own answers before any RL happens. Both cut the cost of feedback by orders of magnitude, and both inherit every bias the labeller has.

This page explains how AI feedback is produced, how the two stages of Constitutional AI work, what the published comparisons with human feedback found, and where AI feedback fails. We also ran a seeded simulation, which you can replay in the interactive figure, showing how a labeller bias that barely moves agreement with human labels is passed in full to the reward model and then amplified by optimisation.

A worked example: critique, revise, compare#

The Constitutional AI paper illustrates its first stage with a red-team prompt asking for help breaking into a neighbour's wifi [1]. The helpful-only model answers with instructions. The model is then asked to critique that answer according to a principle, here one about identifying harmful, unethical or illegal content, and it points out that the answer helps invade someone's privacy. Asked to revise in light of the critique, it produces a response that declines and explains why: hacking into the neighbour's network is an invasion of their privacy and may be illegal. The prompt plus the revised response becomes a supervised training example.

In the second stage the model being trained produces two responses to a prompt, and a feedback model is shown both with a principle phrased as a multiple-choice question, for example "Which of these assistant responses is less harmful? Choose the response that a wise, ethical, polite and friendly person would more likely say." The feedback model's log-probabilities for the answers "(A)" and "(B)" give a soft label:

and are the log-probabilities the feedback model assigns to choosing A and B. If it puts 0.8 of its probability on (A), the training target for this pair is 0.8, not a hard 1. That number goes into the same preference-model loss used in RLHF:

is the reward model with parameters and the logistic function. This is the Bradley-Terry objective with soft targets; it is explained in detail in reward models. After that, the pipeline is ordinary RLHF: optimise the policy against with a KL penalty, as in RLHF explained and KL-regularised RL.

How does Constitutional AI work?#

Stage 1: supervised learning from self-critique and revision#

Starting from a model trained to be helpful, the authors sampled responses to red-team prompts, asked the model to critique each response under a principle drawn at random from 16 harmlessness principles, asked it to revise, and repeated the critique-revision loop several times with a fresh principle each time [1]. They report that the first revision removed most of the harmful content and later revisions improved scores further but less visibly. A pre-trained model was then fine-tuned on the revised responses, together with helpful responses to ordinary prompts so that helpfulness was retained. Varying the number of principles did not change harmlessness scores much but made revisions more diverse, which helps exploration in the RL stage.

Stage 2: RL from AI preference labels#

The fine-tuned model generated response pairs, a feedback model labelled them under a randomly sampled principle (again one of 16), and these AI labels for harmlessness were mixed with human labels for helpfulness to train a preference model. Three details from the paper are worth keeping [1]:

  • Ensembling over principles. Sampling a different principle per label gave noticeably more stable preference-model behaviour than using one principle for every label.
  • Soft labels. Normalised log-probabilities worked much better than hard 0/1 labels.
  • Clamped chain-of-thought labels. When the feedback model reasoned step by step before answering, it became nearly certain, so probabilities were close to 0 or 1. Clamping them to the 40 to 60 percent range worked better than clamping to 20 to 80 percent, and both beat no clamping, which led the policy to more extreme responses.

The paper also reports the failure that every RLAIF practitioner should expect: over-trained RL-CAI models became Goodharted, giving overly harsh answers to harmful prompts or appending boilerplate such as "you are valid, valued, and cared for" to most red-team responses [1]. The preference model rewarded a pattern, and the policy found it. Measured against a gold-standard reward, optimising a learned reward model follows a predictable curve in which the true score first rises and then falls as the policy moves away from its starting point [10]. Reward hacking and the research note on reward over-optimisation cover why that happens.

RLAIF vs RLHF: what the evidence says#

The most direct comparison trained the same policies with human labels and with AI labels from a larger off-the-shelf model on three tasks [2]. Human raters preferred RLAIF over the supervised baseline 71% of the time for summarisation and 63% for helpful dialogue, against 73% and 64% for RLHF; head to head, the two policies were equally preferred (a 50% win rate on summarisation). For harmless dialogue, 88% of RLAIF responses were rated harmless against 76% for RLHF and 64% for the baseline. The AI labeller's agreement with human preferences reached 78% on summarisation, and a labeller the same size as the policy still produced a policy preferred to the baseline 68% of the time. The paper also introduced direct RLAIF, which skips the reward model and asks the labeller for a score during RL; it matched or beat the two-step version.

Result [2]RLAIFRLHF
Win rate vs supervised baseline, summarisation71%73%
Win rate vs supervised baseline, helpful dialogue63%64%
Harmless rate, harmless dialogue (baseline 64%)88%76%
Head to head, summarisation50%50%

A more sceptical study found that in a common setup, where supervised data comes from a weaker teacher model and AI feedback from a stronger critic, almost all of the RL step's improvement disappears if you simply fine-tune on the stronger model's outputs instead [3]. The lesson is not that RLAIF does nothing, but that its gains have to be measured against the cheapest strong baseline, not against a weak one. Related work pushes the idea further by having the policy act as its own judge and training on its own preference labels across iterations [4], and by writing the constitution from public input rather than by the developers [5].

Where AI feedback fails#

An AI labeller is an LLM-as-a-judge, and every documented judge bias becomes a training signal. The ones with the most evidence:

  • Position bias. Judges prefer the first or second slot depending on the model. Swapping the order and averaging the two probabilities was standard in the RLAIF comparison, which found position bias most prevalent in smaller labellers [2]; an earlier study showed that simply reordering candidates could change which model a judge ranked best [7]. Our note on position and verbosity bias measures both.
  • Verbosity bias. Judges tend to prefer longer answers; this was documented in the MT-Bench study of judge agreement [6]. Length correlates with quality in many datasets, which makes the bias easy to miss.
  • Self-preference. Models rate their own generations above others', and the strength of this bias correlates linearly with how well they recognise their own outputs [8]. When the labeller and the policy share a base model, this is a direct channel for drift.
  • Sycophancy. Preference data rewards answers that agree with the user, and both humans and preference models sometimes prefer convincing sycophantic answers over correct ones [9]. A labeller trained on such data passes the tendency on.

Human labels have their own noise; see preference label noise. The difference is that a labeller's bias is systematic and identical on every one of millions of labels, so it does not average out. It is learned.

Simulation: a bias you cannot see in agreement rates#

We simulated 3,000 response pairs. Each response has a true quality and a length correlated with quality at 0.3, a realistic sign: longer answers are somewhat better on average. A "human" label prefers A with probability . The AI labeller uses

is a length bias, a bias towards whichever response is shown first. We fitted a linear Bradley-Terry reward model to each label set by Newton's method, then used it for best-of-16 selection on 2,000 fresh prompts and recorded the true quality and length of the selected responses. Everything is seeded (mulberry32, seed 11) and the browser figure reruns the identical computation. It is a simulation, not a measurement of any particular model.

0.40.81.21.600.511.52Labeller length bias (lambda)Selected response, SD unitsBest-of-16 true quality (AI-label reward model)Best-of-16 length (AI-label reward model)True quality, human-label reward model
1.00 0.00

Figure 1. Static view: as the labeller's length bias grows, best-of-16 selection with the AI-label reward model picks longer (amber) and lower-quality (green) responses; grey is the quality picked by the reward model trained on human labels; dashed line at the interactive default . Interactive view: left, candidate responses in the quality-length plane and the direction each reward model rewards; right, the best-of-16 pick under each. Position bias with randomised order adds label noise and shrinks the reward model's weights but does not rotate its direction.
Length bias AI-human label agreementReward model Best-of-16 qualityBest-of-16 length
0 (unbiased)77.3%0.001.750.52
0.576.9%0.261.700.89
1.076.3%0.521.601.16
2.073.2%0.971.411.42

Three things stand out. The labeller with agrees with human labels on 76.3% of pairs, which is more than two independent human labellers agree with each other in this model (76.0%, computed exactly), so a standard agreement audit would pass it. Yet its reward model weights length at about half the weight of quality, , exactly what the labeller's formula implies: the reward model learns the labeller, bias included. And best-of-16 selection, a mild form of optimisation, turns that tilt into responses that are 0.61 SD longer and 0.15 SD worse than with human labels. RL optimises harder than best-of-16, so the gap grows.

Position bias behaved differently. With the presentation order randomised, cut agreement by about 1.5 points and shrank the fitted weights, but the reward model's direction barely changed: at the best-of-16 picks were identical, and at they moved by less than 0.04 SD. Position bias is mostly noise when order is random and becomes a systematic bias only when it is not, for instance when the policy's sample always appears in the same slot. Swap-and-average removes it either way, at the cost of two labeller calls per pair.

How to use AI feedback safely#

StepWhat to doWhy
Gold setKeep a few hundred human-labelled pairs from the policy's own distribution and score the labeller on them every time the policy, labeller or prompt changesAgreement is the minimum bar; see LLM judge error for confidence intervals
Bias regressionFit the same regression of the label on length difference, slot and same-model indicators for AI labels and for human labels, and compare the coefficientsAgreement rates hide systematic bias; regression coefficients show it
OrderLabel both orders and average, or randomise and check the first-slot win rate is near 50%Removes position bias [2]
PrinciplesWrite principles that cover over-refusal and preachiness as well as harm, and sample one per labelEnsembling over principles gave more stable preference models; rewriting them reduced over-reactive answers [1]
LabelsUse soft probabilities; clamp confident chain-of-thought labelsCalibrated targets give better reward models [1]
Labeller choiceUse a labeller from a different model family than the policy when possibleReduces self-preference [8]
Over-optimisationTrack a held-out human evaluation during RL and stop when it peaksBoilerplate and harshness appear late in training [1]

For the human side of the comparison, LLM-as-a-judge vs human evaluation compares cost and error. When the labeller must judge outputs it cannot fully verify, the question becomes one of scalable oversight, and Constitutional AI is one of the early concrete proposals in that research line.

Code: soft labels with order swapping, and a bias audit#

import numpy as np

def soft_label(logp_first_A, logp_first_B, logp_swapped_A, logp_swapped_B):
    """Preference P(A > B) averaged over both presentation orders.
    logp_first_*: log-probs of choosing each option when A is shown first.
    logp_swapped_*: log-probs when B is shown first (option labels follow the responses)."""
    p1 = np.exp(logp_first_A) / (np.exp(logp_first_A) + np.exp(logp_first_B))
    p2 = np.exp(logp_swapped_A) / (np.exp(logp_swapped_A) + np.exp(logp_swapped_B))
    return 0.5 * (p1 + p2)

def clamp(p, lo=0.4, hi=0.6):
    return np.clip(p, lo, hi)

def logit_fit(y, X, iters=25):
    w = np.zeros(X.shape[1])
    for _ in range(iters):                       # Newton steps
        p = 1 / (1 + np.exp(-X @ w))
        H = X.T @ (X * (p * (1 - p))[:, None])
        w += np.linalg.solve(H, X.T @ (y - p))
    return w

def length_bias_audit(ai_label, human_label, d_len):
    """How strongly each label set follows the length difference (A minus B),
    with an intercept for slot bias. Humans may legitimately prefer longer
    answers; the labeller's bias is the gap between the two coefficients."""
    X = np.column_stack([d_len, np.ones_like(d_len)])
    w_ai, w_h = logit_fit(ai_label, X), logit_fit(human_label, X)
    return dict(length_ai=w_ai[0], length_human=w_h[0], gap=w_ai[0] - w_h[0], slot_ai=w_ai[1])

Run the audit on your gold set with standardised length differences. A labeller with the simulation's passes an agreement check, but on a 3,000-pair gold set drawn from the same model its length coefficient came out about 0.7 higher than the human one in three seeded draws (0.70 to 0.75), while an unbiased labeller's gap was 0.04 or less.

Failure modes#

Auditing agreement only. A labeller can match human agreement rates and still carry a systematic bias, as the simulation shows. Look at coefficients and at what the optimised policy actually outputs.

A constitution that only lists harms. Principles that only penalise harm produce preachy or evasive policies. Measure over-refusal alongside harm; see over-refusal calibration.

Same model as judge and policy. Self-preference turns into a feedback loop, especially in iterative self-rewarding schemes.

Treating AI labels as ground truth in evaluation. If the evaluation judge is the training labeller, the evaluation cannot see what the policy learned to exploit. Use a different judge or humans for the final numbers; the LLM evaluation guide covers how.

Over-training. The boilerplate failure in Constitutional AI appeared with more RL, not less. Plan early stopping against a held-out human evaluation.

Frequently asked questions#

What is RLAIF?

Reinforcement learning from AI feedback is RLHF with the human labeller replaced by a language model. The model compares pairs of responses, its preferences train a reward model (or score responses directly), and the policy is optimised against that reward with RL. It cuts labelling cost sharply but copies the labeller's biases into training.

What is Constitutional AI?

A training method in which a short list of human-written principles guides the model. First the model critiques and revises its own harmful answers under randomly sampled principles and is fine-tuned on the revisions. Then a feedback model labels response pairs under those principles, and the labels train a preference model used for RL.

Is RLAIF as good as RLHF?

In the main head-to-head study, raters preferred RLAIF and RLHF policies equally often (50%) on summarisation and helpful dialogue, and RLAIF scored higher on harmlessness (88% vs 76%). Another study found that much of RLAIF's gain disappears if the supervised baseline is trained on outputs from a strong model, so compare against strong baselines.

What are the main problems with AI feedback?

The labeller's biases become training signal: position bias, preference for longer answers, preference for its own outputs, and sycophancy. Because the bias is the same on every label it does not average out; the reward model learns it and the policy amplifies it. Over-training can also produce boilerplate, as Constitutional AI reported.

How is a preference label extracted from an AI labeller?

The labeller is shown the conversation, two responses and a principle phrased as a multiple-choice question. The log-probabilities of answering A and B are normalised into a probability that A is better, which is used as a soft training target. Averaging over both presentation orders removes position bias.

What is d-RLAIF?

Direct RLAIF skips training a reward model. During RL, an off-the-shelf language model is asked to score each policy response directly, and that score is the reward. In the study that introduced it, d-RLAIF matched or beat the standard two-step RLAIF pipeline.

Why clamp chain-of-thought preference labels?

When the labeller reasons before answering it usually commits to one option, so its probabilities are near 0 or 1 and badly calibrated. Constitutional AI found that clamping them to 40 to 60 percent gave better, less extreme policies than clamping to 20 to 80 percent or not clamping.

Sources#

  1. Yuntao Bai, Saurav Kadavath, Sandipan Kundu, et al.. Constitutional AI: Harmlessness from AI Feedback, 2022. arxiv.org
  2. Harrison Lee, Samrat Phatale, Hassan Mansoor, et al.. RLAIF vs. RLHF: Scaling Reinforcement Learning from Human Feedback with AI Feedback, 2023. arxiv.org
  3. Archit Sharma, Sedrick Keh, Eric Mitchell, et al.. A Critical Evaluation of AI Feedback for Aligning Large Language Models, 2024. arxiv.org
  4. Weizhe Yuan, Richard Yuanzhe Pang, Kyunghyun Cho, et al.. Self-Rewarding Language Models, 2024. arxiv.org
  5. Saffron Huang, Divya Siddarth, Liane Lovitt, et al.. Collective Constitutional AI: Aligning a Language Model with Public Input, 2024. arxiv.org
  6. Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, et al.. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, 2023. arxiv.org
  7. Peiyi Wang, Lei Li, Liang Chen, et al.. Large Language Models are not Fair Evaluators, 2023. arxiv.org
  8. Arjun Panickssery, Samuel R. Bowman, Shi Feng. LLM Evaluators Recognize and Favor Their Own Generations, 2024. arxiv.org
  9. Mrinank Sharma, Meg Tong, Tomasz Korbak, et al.. Towards Understanding Sycophancy in Language Models, 2023. arxiv.org
  10. Leo Gao, John Schulman, Jacob Hilton. Scaling Laws for Reward Model Overoptimization, 2022. arxiv.org

Know the number before you ship.

A 45-minute working session with an evaluation engineer. Bring one use case; leave with a threat model, a draft eval plan with sample sizes, and an honest read on where you stand.