Ranking Models with Comparative Evaluation
A reward model takes a (prompt, response) pair and scores how good that single response is, such as Cappy's score between 0 and 1.
Why Grading One Answer Is Not Always Enough
Earlier in this chapter, a general-purpose AI model was used to evaluate the output of another model. That approach is flexible, because the same model can be asked about many kinds of responses. It also has limits. A general model asked to judge might be slow or costly, and its verdicts can be hard to reproduce. Specialized AI judges are models built or trained for one narrow evaluation job. This article follows three families of them: reward models, reference-based judges, and preference models.
Before reading on, try the question below. Each specialized judge is designed around a different kind of input, so the question is really about what information the judge needs in order to do its job.
What do you think happens?
A team has two candidate answers to the same prompt and wants to know which one people would prefer. Which kind of judge fits this task?
Reveal answer
A preference model
A preference model takes a prompt and two candidate responses and outputs which of the two people would prefer. It returns a relative choice, not an absolute grade for each answer.
Following One Response Through a Reward Model
A reward model is defined by one feature: it looks at a single response on its own, in the context of the prompt. It does not need a second answer to compare against, and it does not need a model answer written in advance. The input is the prompt together with a single response. The output is a score that expresses how good that response is for that prompt.
Reward models have been used in reinforcement learning from human feedback (RLHF) for many years. The scores they produce can guide how a model is tuned. Cappy, developed by Google in 2023, is a concrete case. Given a prompt and a response, Cappy produces a score between 0 and 1 that indicates how correct the response is. It is a lightweight scorer with 360 million parameters, which is much smaller than general-purpose foundation models.
Scoring a batch of single responses
A support team has 500 chatbot answers and wants a quality score for each answer, judged against the question that was asked. No reference answers exist for these questions. Which judge can do this, and what does each call consume and return?
- 1Identify what each call has available
Each answer has a question (the prompt) and the answer itself (one response). There is no second answer to compare with and no written model answer.
- 2Match the inputs to a judge
A reward model takes a (prompt, response) pair and needs nothing else, so it fits this batch.
- 3Trace one call
The prompt and one answer go in. A single score comes out for that answer, such as a number between 0 and 1 in the style of Cappy.
- 4Repeat across the batch
Because the scorer is small, it can be run many times over cheaply, which suits checking 500 answers one at a time.
A reward model scores each (prompt, response) pair independently, producing one score per answer and no comparison between answers.
Scoring Against Reference Answers
The reference-based judge changes what the score is measured against. Instead of asking how good a response seems in the abstract, it asks how well the generated response lines up with trusted reference answers. The reference answers are supplied as part of the input. Depending on the judge, the output can be a similarity score, which says how close the generated response is to the references, or a quality score, which says how good the generated response is compared to them.
Two published judges show the two output styles. The walkthrough below treats each one separately, because they answer different questions about the generated response.
Preference Models: Choosing Between Two Responses
A preference model works on a different question from the first two judges. It does not assign each response its own number. It takes a prompt and two candidate responses, and it returns a decision about which of the two people would prefer. Its target is human preference. The people who study it often describe it as one of the most promising directions for specialized judges, because a model that can predict what humans prefer can stand in for some of the human judgment that evaluation normally requires.
The reason this matters is cost. Preference data is essential for aligning AI models with human preferences, but it is challenging and expensive to collect. A preference model that predicts human choices well can make evaluation easier, and it can help make models safer to use, because its judgments follow the preferences that real people express. Two named examples are PandaLM, developed with work by Wang and colleagues in 2023, and JudgeLM, by Zhu and colleagues in 2023.
PandaLM goes a step beyond a bare verdict. Its output names the better response and also gives an explanation of its rationale. The explanation is useful to a reader who wants to check whether the verdict makes sense, not only whether the verdict is the one they expected.
Matching a Judge to an Evaluation Task
Choosing the right specialized judge depends on whether you need a single score, a score anchored to references, or a head-to-head preference. The decision path below turns those three needs into questions you can answer about your task.
Read the flowchart from the top. The first question separates the preference model from the other two, since only the preference model takes two responses and returns a choice. The second question separates the reference-based judge from the reward model, since only the reference-based judge uses reference answers to anchor its score.
Routing three evaluation tasks
Match each task to a judge: (a) rate each generated summary against a trusted reference summary using a rubric; (b) decide which of two drafts readers would choose; (c) give each product description a quality score with no reference available.
- 1Task (a)
References are present and the score must be anchored to them, so the path goes to the reference-based judge. A rubric-based quality score fits this task.
- 2Task (b)
Two drafts are compared head-to-head and the question is which one readers prefer, so the path goes to the preference model.
- 3Task (c)
One description is scored at a time with no references and no pairwise choice, so the path goes to the reward model.
(a) reference-based judge, (b) preference model, (c) reward model.
A research group wants to rank three candidate answers to the same question. They will compare the answers in pairs and need to know which answer people would pick in each pair. Which specialized judge should they use, and what does one call consume and return?
Hints
- Look at how many responses the judge takes in at once.
- Ask whether the output is an absolute score or a relative choice.
- A preference model takes a prompt and two responses and outputs which one users would prefer.
Mistakes When Comparing Judge Types
Common mistake Treating a reward model's score as a preference result
What it looks likeA reward model returns 0.8 for response A and 0.6 for response B, and someone concludes that people prefer A.
Why it failsA reward model scores each response on its own. Its output is an absolute score for one response, not a choice between two.
Do this insteadIf you need to know which of two responses is preferred, use a preference model, which takes both responses and outputs the preferred one.
Common mistake Using a reference-based judge when no reference answers exist
What it looks likeTrying to run a Prometheus-style judge on open-ended questions where no reference response was written.
Why it failsThe reference-based judge's score is anchored to reference responses, and the reference response is taken to earn a 5. Without it, the anchor is missing.
Do this insteadIf no references are available, the reward model is the path that needs only the prompt and one response.
Common mistake Assuming a rubric is optional for a quality score
Why it failsThe rubric tells the judge what good means for this task.
Do this insteadWrite the rubric for the task before interpreting the score.
Common mistake Assuming a preference model's verdict is the same as a reward score for ranking many responses
Key Takeaways
- 1A reward model takes a (prompt, response) pair and returns a score for that single response, such as Cappy's score between 0 and 1.
- 2A reference-based judge compares the generated response with reference answers: BLEURT returns a similarity score, and Prometheus returns a rubric-based quality score between 1 and 5 with the reference earning a 5.
- 3A preference model takes a prompt and two responses and outputs which one people would prefer, a relative choice rather than an absolute grade.
- 4Choose the judge by its inputs and needs: a single score for one response, a score anchored to references, or a head-to-head preference.
At a glance
- A reward model takes a (prompt, response) pair and returns a score for that single response, such as Cappy's score between 0 and 1.
- A reference-based judge compares the generated response with reference answers: BLEURT returns a similarity score, and Prometheus returns a rubric-based quality score between 1 and 5 with the reference earning a 5.
- A preference model takes a prompt and two responses and outputs which one people would prefer, a relative choice rather than an absolute grade.
- Choose the judge by its inputs and needs: a single score for one response, a score anchored to references, or a head-to-head preference.