Topic 2 of 5 · 5 min read
Preference tuning from ranked answers
Goal: Describe how ranked answer pairs become a training signal and name what preference tuning can and cannot fix.
Preference tuning teaches a model what people like by showing it pairs of answers where one was ranked better, then nudging the model toward the winners.
Check yourself · 1 of 3
In RLHF, what is a reward model?
Why it matters
After SFT, a model can answer, but its answers vary in quality. Some are clear and safe, some are rambling, some are wrong in a confident tone. Writing a perfect answer is hard. Picking the better of two answers is easy. Preference tuning uses that easier judgment at large scale. It is a main reason chat assistants feel helpful, and also a reason they can feel flattering.
How it works
- Collect comparisons. For one prompt, the model writes two or more answers. A person, or sometimes another model, marks which is better.
- Turn the rankings into a signal. In classic RLHF (reinforcement learning from human feedback), a separate reward model learns to score answers the way the raters would. The assistant is then trained with reinforcement learning to produce answers that score well, while a penalty keeps it from drifting far from the SFT model.
- Or skip the reward model. Direct Preference Optimization (DPO) trains on the pairs directly, raising the odds of the chosen answer and lowering the odds of the rejected one. It is simpler to run.
- Or use AI feedback. In Constitutional AI, a model judges answers against written principles, and those labels replace some human rankings.
Before and after
Weak: the SFT model answers "Can I take ibuprofen with my blood pressure pill?" with a dense paragraph of unsorted facts.
Fixed: after preference tuning, raters preferred answers that lead with the key warning, stay short and suggest asking a pharmacist. The model now writes that way by default.
What goes wrong
- The signal is taste, not truth. Raters may prefer answers that sound sure, are long, or agree with them. The model learns to please.
- Raters can be fooled. A polished wrong answer can beat a plain right one, especially when the rater cannot check it.
- Over-optimising. Push too hard on the score and answers get strange. That is why the penalty term exists.
Preference tuning can fix tone, structure and many refusals. It cannot add knowledge the model lacks or guarantee that an answer is correct.
Examples
One ranked pair
Prompt: "Explain what a firewall does." Answer one: three plain sentences with a home example. Answer two: a long, jargon-heavy paragraph. The rater picks answer one. Thousands of such pairs teach the reward model, or DPO directly, to favour clear, short explanations.
Where preference data goes wrong
Raters see two answers to a maths question. One is confident and wrong, the other is hesitant and right. If the rater cannot check, the confident one may win. The model then learns that sounding sure pays.
Key points
- Preference tuning trains on comparisons: for one prompt, which of two answers is better.
- RLHF first trains a reward model on the rankings, then uses reinforcement learning to raise its score.
- DPO uses the ranked pairs directly and needs no separate reward model.
- AI feedback replaces some human rankings with a model judging answers against written principles.
- The training signal is what raters preferred, which is not the same as what is true.
Common mistakes
- Believing human feedback means a person checked every fact in every answer.
- Thinking RLHF and DPO are the same training signal, when one uses a reward model and the other does not.
- Assuming preference tuning adds knowledge, rather than shaping how existing knowledge is shown.
- Treating a higher preference score as proof of a more accurate model.
Check yourself · 2 of 3
What does Direct Preference Optimization (DPO) do differently from classic RLHF?
Check yourself · 3 of 3
Raters tend to prefer confident, agreeable answers even when they are slightly wrong. What is the likely effect on the tuned model?
Practice items, not counted towards your mastery.
Start here
- Training language models to follow instructions with human feedback (InstructGPT) (opens in a new tab)PaperFree
The 2022 OpenAI paper that describes the supervised, ranking and RL steps, and reports a 1.3B tuned model preferred over the 175B base model.
- RLHF Book (Nathan Lambert) (opens in a new tab)BookFree
A free book that walks through instruction tuning, reward models, DPO and RL on verifiable rewards in order.
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model (opens in a new tab)PaperFree
Shows how preference pairs can train a model directly, without a separate reward model or RL loop.
More for this topic
- Constitutional AI: Harmlessness from AI Feedback (opens in a new tab)PaperFree
Explains how written principles let a model critique itself and produce preference labels instead of people.