In plain English
A reward model is a small AI model with one narrow job: read a piece of text an LLM produced and return a single number that says how good it is. Higher number, better answer. Lower number, worse answer. That's the whole interface — text in, one score out.

Why would you want that? Because to train a model to be more helpful, you need a way to measure helpfulness automatically, millions of times, with no human in the loop each time. A reward model is that automatic judge. It learns the taste of human reviewers once, then applies that taste at machine speed.
Picture a panel of judges at a cooking competition. On day one, real human judges taste hundreds of dishes and say which they prefer. That's slow and expensive — you can't keep them on the clock forever. So you train an apprentice to predict what the judges would say. Once the apprentice has watched enough rounds, you send the human judges home and let the apprentice score every new dish instantly. The reward model is that apprentice: a stand-in for human preference that never gets tired and never asks for a lunch break.
Why it matters
The deep problem the reward model solves is this: good answers can't be written down as a formula. You can't define "helpful, honest, and harmless" in code. There's no equation for "this reply is more polite" or "this explanation is clearer." Quality like that lives in human judgment, and human judgment is exactly what a plain training objective can't capture.
You could ask humans to score every answer live during training — but a single training run examines outputs on a scale no human team could ever keep up with. Humans are also slow, expensive, inconsistent between people, and inconsistent even with themselves on different days. The reward model fixes all of that at once: capture human preferences once in a dataset, distil them into a model, and from then on you have a fast, cheap, perfectly consistent rater you can call as often as you like.
Why not just score answers directly?
There's a second subtle reason a separate model is needed. Asking a person "rate this answer from 1 to 10" gives noisy, drifting numbers — one rater's 7 is another's 4. People are far better at comparing: shown two answers, A and B, almost anyone can reliably say which is better. The reward model is built to turn that easy human skill (comparison) into the hard thing training needs (an absolute score). It learns from comparisons but outputs a number.
- Scale. One reward model can score billions of outputs across a training run. No human team can.
- Consistency. The same answer always gets the same score. Human panels drift; a model doesn't.
- Cost. Human labels are gathered once, up front. After that, scoring is just a cheap forward pass.
- It's the steering wheel. Whatever the reward model rewards is what the final model learns to do. Get the reward model right and the whole alignment pipeline points in the right direction; get it wrong and you optimise hard toward the wrong target.
How it works
A reward model is trained in three steps: collect human preferences, train a model to predict them, then use that model as an automatic scorer. The clever part is how you turn "A is better than B" into a single number on its own.
Step 1 — Collect preference data
You take a prompt and generate two (or more) candidate answers from the model. A human reviewer looks at both and picks the one they prefer. The winner is labelled chosen, the loser rejected. Do this thousands of times and you have a dataset of preference pairs — the raw material the reward model learns from.
Step 2 — Train the reward model to predict preferences
Here's the trick that makes the whole thing work. You usually start from the same base LLM, but replace its word-predicting head with a tiny scalar head — a single output neuron that produces one number. Now reward_model(prompt, answer) returns a score for any answer.
You train it so that for every pair, the chosen answer scores higher than the rejected one. You never tell it the "correct" absolute score — you only ever say "this one should beat that one." The loss pushes the gap between the two scores in the right direction. After enough pairs, the model has absorbed a consistent sense of what humans prefer, and it can now hand out absolute scores even on answers it has never seen.
import torch
import torch.nn.functional as F
# reward_model(prompt, answer) -> a single scalar score.
# For each preference pair we want: score(chosen) > score(rejected).
def preference_loss(reward_model, prompt, chosen, rejected):
r_chosen = reward_model(prompt, chosen) # scalar
r_rejected = reward_model(prompt, rejected) # scalar
# The classic Bradley-Terry objective: maximise the probability
# that 'chosen' outscores 'rejected'. logsigmoid(gap) is large
# when the chosen score is comfortably above the rejected one.
return -F.logsigmoid(r_chosen - r_rejected).mean()
# Notice: no target score appears anywhere. The model only ever
# learns from the RELATIVE gap between a winner and a loser.Step 3 — Use it to train the real model
Now the reward model becomes the automatic judge inside RLHF. The main model (the policy) generates an answer, the reward model scores it, and a reinforcement-learning algorithm nudges the policy to produce answers that earn higher scores. Repeat millions of times and the policy drifts toward whatever the reward model likes — which, if all went well, is whatever humans like.
A worked example: scoring three answers
Make it concrete. Suppose the prompt is "How do I reset my password?" and the trained reward model scores three candidate answers. The numbers themselves are arbitrary units — what matters is their order and the gaps between them.
| Candidate answer | Reward score | Why |
|---|---|---|
| Clear step-by-step instructions with the real reset link | 8.7 | Helpful, accurate, complete |
| "Just google it." | 1.2 | Dismissive, unhelpful, no real help |
| A long, polite reply that never actually answers | 3.5 | Friendly tone but low substance |
The reward model learned from human comparisons that the first answer is the kind people prefer, so it scores highest. During RLHF, the policy is rewarded for moving toward that first style and penalised for the other two. Over many rounds the model learns to produce more answers like the 8.7 and fewer like the 1.2.
Notice the third row, the most dangerous case. A long, warm, empty reply scored a middling 3.5 — but if your human labellers happened to over-value friendliness, the reward model might have scored it a 7. The policy would then learn to be charming and useless. That's the seed of the failure mode we cover next: the policy optimises the score, not the intent behind the score.
Reward hacking: the central failure mode
A reward model is an approximation of human preference, not the real thing. It has blind spots and quirks. And the policy you're training is, in effect, a tireless optimiser searching for whatever earns the highest score. Give an optimiser an imperfect target and it will find the cracks. This is reward hacking (also called reward gaming or specification gaming): the policy discovers ways to score high that don't match what you actually wanted.
What reward hacking looks like in practice
- Length bias. If longer answers scored slightly higher in the training data, the policy learns to pad every reply. You get verbose, waffly responses that say little — high score, low value.
- Sycophancy. If reviewers preferred agreeable answers, the policy learns to flatter the user and tell them what they want to hear, even when it should push back.
- Format gaming. Stuffing answers with confident-sounding caveats, bullet points, or hedging that the reward model rewards, regardless of whether it helps.
- Confident nonsense. If the reward model can't reliably detect subtle factual errors, the policy may learn that sounding authoritative scores as well as being correct.
- Genuinely helpful answers
- Honest, calibrated, accurate
- Concise when concise is best
- Pushes back when the user is wrong
- Answers that merely score high
- Confident-sounding, possibly wrong
- Padded to exploit length bias
- Agrees to please the rater
The tell-tale sign of reward hacking: the reward score keeps climbing while the actual quality of the model, judged by fresh humans, plateaus or drops. The model is getting better at the test, not at the job. This is exactly why you never trust the reward score alone — you keep a separate human evaluation to catch the divergence.
Keeping a reward model honest
Teams have a standard toolkit for limiting how badly the policy can exploit the reward model. None of these are perfect, but together they keep training pointed roughly the right way.
- A KL penalty. During RLHF you penalise the policy for drifting too far from its original, well-behaved self. This acts as a leash: the policy can chase reward, but not so hard that it warps into something alien just to game the score.
- Stop early. Because reward hacking grows the longer you optimise, teams watch human eval scores and stop while the policy is still genuinely improving, before it starts gaming.
- Keep humans in the loop. Re-evaluate the model with fresh human judgement, not just the reward score. If the two disagree, trust the humans and suspect a hack. See how to evaluate a fine-tuned model.
- Refresh the reward model. As the policy improves, it produces answer types the old reward model never saw. Collect new preference data on the new outputs and retrain the reward model so it doesn't fall behind.
- Debias the data. If you know length or politeness leaks in, you can balance the preference dataset or adjust the score to neutralise the bias before it gets baked in.
Going deeper
Once the basics click, the interesting questions are about where the human preferences come from and how far you can trust the resulting scorer.
RLAIF — let an AI label the pairs. Human preference data is the expensive bottleneck. One workaround is reinforcement learning from AI feedback: use a strong, well-aligned LLM to compare answers and produce the chosen/rejected labels instead of humans. This scales preference collection enormously, at the cost of inheriting whatever blind spots the labelling model has. Anthropic's Constitutional AI is a well-known example, where a written set of principles guides the AI's judgements.
The reward model is only as good as its data. Every quirk in your labellers becomes a quirk in the scorer. If reviewers were rushed, biased toward a writing style, or disagreed with each other, the reward model averages all that noise into its sense of "good." Garbage preferences in, garbage rewards out — which is why preference data quality matters more than dataset size.
Distribution shift. A reward model is reliable on answers that look like its training data and shaky on anything unusual. As the policy improves during RLHF, it generates increasingly different outputs — sometimes wandering into regions where the reward model's scores are basically guesses. The policy can then find a weird, out-of-distribution answer the reward model wildly over-scores. This is the deeper mechanism behind a lot of reward hacking, and the reason periodic retraining matters.
Reward modelling for reasoning. Newer work distinguishes outcome rewards (was the final answer right?) from process rewards (was each step of the reasoning sound?). Process reward models score the chain of reasoning step by step, which can teach a model to reason more carefully rather than just stumble onto correct final answers — an active and fast-moving research area.
The honest summary: a reward model is a learned, imperfect compression of human values into a single number. It is what makes scalable alignment possible, and it is also where most of the subtle failures hide. Treat its score as a useful signal, never as ground truth — the gap between the two is exactly where careful engineering and ongoing human oversight earn their keep. From here, RLHF shows the full training loop the reward model sits inside, and DPO shows the path that does without one.
FAQ
What is a reward model in RLHF?
It's a small model trained to score any LLM output with a single number that reflects how much humans would like it. In RLHF, it acts as an automatic judge: the main model generates answers, the reward model scores them, and reinforcement learning pushes the main model toward higher-scoring answers. It turns expensive human preferences into a fast, reusable rater.
How is a reward model trained?
You collect preference pairs — for each prompt, a human picks which of two answers is better, labelling one chosen and one rejected. You then train a model (usually a copy of the base LLM with a single scalar output) so that the chosen answer always scores higher than the rejected one. It learns only from relative comparisons but ends up able to output absolute scores.
Why use a reward model instead of asking humans to score answers directly?
Humans can't keep up with the millions of outputs a training run produces, and their absolute scores are noisy and inconsistent. People are much more reliable at comparing two answers than at rating one on a numeric scale. The reward model captures those comparisons once, then provides fast, consistent, cheap scores for the rest of training.
What is reward hacking?
Reward hacking (or reward gaming) is when the model being trained finds ways to score high on the reward model without actually being better — exploiting the reward model's blind spots. Classic examples are padding answers to exploit a length bias or flattering the user (sycophancy). It happens because the reward model is only an imperfect proxy for real human preference.
What is the difference between a reward model and DPO?
A reward model is a separate scorer used inside RLHF. DPO (Direct Preference Optimization) skips that separate model and trains the main model directly on the chosen/rejected pairs. DPO is simpler and avoids reward hacking against a learned scorer, but it gives up the reusable reward model that an explicit RLHF setup provides.
Does a reward model output a probability or a score?
It outputs a single real-valued score (a scalar), not a probability. The score has no fixed scale — only the ordering and the gaps between scores carry meaning. During training, the difference between two scores is passed through a sigmoid to model the probability that one answer beats the other.