Before we build them, here is the full alphabet the parent note throws at you. If any of these look like hieroglyphics right now, that is exactly why this page exists.
The picture: think of a vending machine. You press a button — that press is x. A snack drops out — that snack is y. Press the same button twice and you might get slightly different snacks (y1, y2) because the model has some randomness.
Why the topic needs it: the whole method is a factory of (x,y) pairs — first good revised pairs (Stage 1), then pairs of competing answers to be judged (Stage 2). Everything downstream is a function of these two letters.
Recall If the model gives two answers to one question, what do we call them?
Once a judge looks at y1 and y2 and picks a favourite, we rename them by their role, not their number.
The picture: a talent show with exactly two contestants. The judge raises a paddle toward one of them. The paddled one is yw; the other is yl. The arrow-like ≻ is the paddle pointing left-to-right: this beats that.
Why the topic needs it: the parent note's Bradley–Terry model is entirely about "how likely is the winner to beat the loser?" We can't write that until "winner" and "loser" have names.
The judge said "yw beats yl" — a yes/no fact. To do maths we want a number measuring how good each answer is.
The picture: a judge's scorecard. Feed in (question, answer); a needle swings to a number. As we train, we tighten the internal screws θ so the needle agrees with the observed winners.
Why this tool and not just "good/bad"? A raw label ("winner") gives no magnitude. With a number we can say answer A is far better than B, or only slightly — and, crucially, we can take derivatives of a number to train. This is why we invent rθ. See Reward modeling.
Recall What does the subscript
θ in rθ mean?
The current settings of all the tunable weights (dials) inside the scoring model.
We have two numbers, rθ(x,yw) and rθ(x,yl). We want a probability — a number between 0 and 1 — saying "how likely is the winner to actually win?" We need a machine that takes any real number and squashes it into [0,1].
Why this tool? Scores can be negative. Probabilities can't. Exponentiating forces positivity, so a ratio of exponentials is guaranteed to sit safely in [0,1].
Before the formula, let us give the two scores short names so the algebra stays readable.
The picture: a smooth "S" ramp. Far left it hugs 0, far right it hugs 1, and it crosses exactly 21 at z=0.
Now watch the parent note's key identity fall out. Let z=rw−rl be the score gap:
erw+erlerw=1+erl−rw1=1+e−z1=σ(z)
What we did: divided top and bottom by erw. Why: it reveals the whole thing depends only on the differencez=rw−rl, not the two raw scores. What it looks like: the S-curve of §4a, read at the point z=rw−rl.
This is exactly the Bradley-Terry preference model the parent uses.
Recall Why exponentiate the scores before comparing them?
To guarantee positivity so their ratio is a valid probability in [0,1]; algebra then shows it equals σ of the score gap.
We can now predict how likely each observed win was. Training means: tune θ so the wins we actually saw come out as likely as possible. Multiplying many probabilities together gives tiny unwieldy numbers, so we take logarithms to turn products into sums.
The picture: a curve that is 0 at p=1 (certain, no surprise) and plunges to a deep pit as p→0 (a thing we said was likely but that failed — huge penalty).
Recall Why take the log of the probability instead of using the probability directly?
Logs turn products of many probabilities into sums, and heavily punish confident-but-wrong predictions.
The loss above was for one comparison. A dataset has thousands. We need the average loss over all of them.
The picture: a giant bin of scorecards; reach in, read a card's loss, repeat many times, take the average. That average is what we actually minimise.
Why the topic needs it: it lets the parent note write one clean formula that stands for "do this over the whole dataset and average," instead of a messy sum with indices.
So the parent's reward-model loss reads, fully decoded:
Lr=−average over all judged pairsE(x,yw,yl)∼D[punish surprise (base e)loggap→probσ(score gap zrw−rl)]
Every piece is now something you built by hand. This is the same machinery used in RLHF and DPO Direct Preference Optimization — only the source of the pairs differs.
The reward model scores answers. But the thing we ultimately want to improve is the answer-generator itself.
The picture: a dartboard where each possible answer is a spot, and the policy is a heat-map of where the dart is likely to land. Training reshapes the heat-map to favour high-reward answers.
Recall What is the difference between
πϕ and πref?
πϕ is trained and changes; πref is a frozen anchor (the SL-CAI model) we must not drift too far from.
If we only maximise reward, the policy will find cheap tricks that fool the score machine (the parent's "As an AI, I strictly comply!!!" example). We need a term that punishes drifting away from sane, fluent language. That penalty — hinted at in §7 — is built now.
The picture: a dog (πϕ) on a leash held at the anchor post (πref). Reward is a tasty treat pulling the dog forward; the leash tension is β⋅KL pulling it back. The dog settles where treat-pull balances leash-pull.
Now the two halves — the reward pull from §7 and the leash from §8 — combine into the parent's full objective, fully readable:
This is the same PPO Proximal Policy Optimization objective used in RLHF; see also Red teaming and harmlessness for how the harmful prompts that feed this pipeline are sourced.
Each box is one section above; the two chains (reward-model chain and policy chain) meet at the RLAIF objective, which is what the parent Constitutional AI overview page assumes you already own.