Reward model in RLHF: what does it score, and on what data does it train?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A reward model maps (prompt, response) to a scalar score and is trained on preference pairs under a Bradley-Terry loss so chosen beats rejected.
Imagine a restaurant critic who is shown two dishes from the same kitchen for the same order. The critic never says either dish is perfect or wrong; they just point at the one they preferred. Do this a few thousand times and a junior trainee can learn to predict which dish the critic would pick before the critic even tastes it. That trainee is the reward model. It does not learn an absolute standard of goodness; it learns the critic's relative preference from many head to head comparisons. Once trained, the trainee can score any new dish on a quiet scale that reliably ranks better above worse, which is exactly what the next stage of training needs.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
6 min: the reward model's role + architecture + Bradley-Terry loss + why pairwise beats absolute + where it plugs into PPO + reward hacking + how DPO eliminates it.
| Reward signal | Input shape | Training signal |
|---|---|---|
| RLHF reward model | (prompt, response) | Pairwise preferences, Bradley-Terry |
| BLEU / ROUGE | (response, gold reference) | Surface overlap with reference |
| Verifiable reward | (response, checker) | Programmatic pass/fail |
| LLM judge | (prompt, response) | Sampled from a strong model |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming the reward model needs gold answers or absolute scores. It learns purely from pairwise preferences; the absolute reward scale is free and meaningless on its own.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.