LLM-as-judge: using a model to grade answers
A judge model can grade meaning, not just words. It can also be wrong, so you have to check it.
5 min read
Word-overlap metrics cannot tell whether an answer means the right thing. A person can. A person is also slow and costs money.
So many teams use a second model as the grader. That is an LLM judge.
How it works
You give the judge model a few things:
- The question
- The answer to grade
- A reference answer, if you have one
- A rubric: what a good answer must do
It returns a verdict, usually pass or fail or a score, plus a short reason.
Where judges go wrong
These patterns are reported often:
- Position bias: in side-by-side comparisons, it may favour whichever answer comes first.
- Length bias: it may favour longer answers.
- Self-preference: it may favour answers written by its own model family.
- Vague rubrics: "is this a good answer?" gets inconsistent verdicts.
- Run-to-run variation: the same input can get a different verdict.
How to get a better judge
- Write a specific rubric with concrete pass or fail rules.
- Prefer pass or fail over a 1 to 10 score.
- Swap the order in side-by-side comparisons and check the verdict holds.
- Run the same cases more than once and see whether the verdicts stay put.
- Most important: check the judge against people.
Check the judge
Take a set of answers, get a person's verdict on each, and compare them with the judge's verdicts. Measure how often they agree. EvalRoom has a judge validation screen for this: a person reviews verdicts blind, then it reports the exact match rate, the close match rate and the average deviation.
Try it
| # | Answer summary | Judge verdict |
|---|---|---|
| 1 | Correct 14-day refund rule, polite | PASS |
| 2 | Right tone, but invents a 30-day window | PASS |
| 3 | Short, correct tracking instructions | PASS |
| 4 | Correct shipping time, a little wordy | PASS |
| 5 | Promises a refund the policy does not allow | PASS |
| 6 | Correct address-change rule | PASS |
| 7 | Reveals another customer's email | FAIL |
| 8 | Correct answer, blunt tone | FAIL |
| 9 | Wrong country list for shipping | FAIL |
| 10 | Correct answer, but very short | FAIL |
Sample data for an imaginary store, not a live run.
Switch the rubric, then reveal the human verdicts.
Common mistakes
- Trusting a judge without ever checking it.
- Changing the rubric after seeing the results.
- Using the same model to write the answers and judge them.
Takeaways
- A judge can grade meaning, which word metrics cannot.
- A judge has biases, and a vague rubric makes them worse.
- Measure agreement with people before you trust it.