TL;DR
LLM-as-a-judge means prompting a strong language model to grade an answer, or to pick the better of two answers, against a rubric. It scales evaluation to open-ended questions where no single correct answer exists and where human raters are slow and expensive. Its verdicts can agree with expert human judgement at roughly the rate experts agree with each other, but the judge has systematic biases: it favours answers in certain positions, longer answers, and sometimes its own style. Those biases have to be measured and corrected before the scores mean anything.
Where you'll see it: in chat-model leaderboards such as MT-Bench, in automatic evaluation of instruction-following, and as a source of preference labels or rewards in post-training pipelines.
Intuition
Why reference-based scores break down
For a question like "translate this sentence", a machine can compare the output with a reference translation and count overlapping word sequences. Metrics like BLEU, introduced for machine translation in 2002, do exactly that. Open-ended chat has no single reference. Two very different replies can both be excellent, so overlap with a fixed answer says little.
A judge model reads the question and the candidate answers and forms an opinion using the same kind of understanding a human reader uses. This is the appeal: it is flexible and cheap compared with asking people to rate thousands of answers.
The cost is that the judge is itself a language model with its own quirks. A human grader gets tired and inconsistent. A model grader is consistent in the wrong way: the same quirk shows up every time, and it can be triggered by something as simple as the order in which the answers appear.
flowchart LR Q[Question] --> J[Judge prompt with rubric] A1[Answer A] --> J A2[Answer B] --> J J --> V[Verdict: A, B or tie] V --> S[Swap order and judge again] S --> R[Keep a verdict only if both orders agree]
The last two steps are the standard correction, and they come up again below.
The math
Two judging modes
Write the judge as a function that takes a question and answers and returns a score or a verdict.
Single-answer grading gives each answer a score on a fixed scale:
Pairwise comparison takes two answers and returns a verdict:
Pairwise comparison is more reliable for close calls, and single-answer grading is cheaper and scales to many models. The paper that introduced the modern form of the method found that GPT-4 agreed with human experts about as well in single-answer mode as in pairwise mode (85% on non-tied votes in both), so the cheaper single-answer mode is a reasonable choice for scoring many models.
Position consistency
A pairwise judge should be symmetric. If it prefers when is shown first, it should prefer when is shown second. Define the consistency rate as the fraction of pairs where the two orderings give the same underlying winner:
Any shortfall from 100% is position bias, which is not a rare edge case. In the paper's test on hard, similar answers, GPT-4 with its default prompt was consistent only 65.0% of the time. It favoured whichever answer came first in 30.0% of pairs.
Debiasing by swapping
A simple correction is to ask twice and combine the verdicts. Declare a win for only if and . Declare a win for only in the mirror case. Everything else becomes a tie:
The cost is double the calls. The gain is that a verdict now needs the judge to agree with itself, so the position effect cannot manufacture a win.
Win rates and agreement
Given questions, the win rate of model against model is the share of questions where wins, with or without ties counted in the denominator. The paper also defines agreement between two kinds of judge as the probability that two different judges of those kinds agree on a random question. Agreement is usually reported only on non-tied votes, because ties carry little information about who was better.
Connecting verdicts to scores
If each answer has a latent quality score , the probability that beats is often modelled as
which is the Bradley-Terry model with a sigmoid link. Fitting it to pairwise verdicts by maximum likelihood turns many judged pairs into one ranking.
- P(a beats b) as a function of score gap
Worked examples
Example 1: how many verdicts a judge loses to position
Take 100 answer pairs, each judged in both orders by GPT-4 with the default prompt. Using the paper's consistency figure of 65.0%.
- Consistent pairs: . For these the verdict survives the swap.
- Inconsistent pairs: . Under the swap rule these become ties.
- The paper also reports 30.0% of verdicts biased toward the first answer and 5.0% toward the second. Those account for the inconsistent pairs.
- Interpretation: if you had used only the first-order verdict, about 30 of the 100 pairs would have been decided by position rather than quality. Swapping converts those into ties, which is a loss of signal but not a false win.
- With few-shot examples in the prompt, the same paper reports consistency rising to 77.5%, which leaves 22.5 of 100 pairs as ties. The paper notes this costs about four times more per call because the prompt is longer.
Example 2: win rate after the swap rule
Illustrative counts, not from the paper. Suppose a judge compares model with model on 20 questions, each judged in both orders.
- After applying the swap rule: wins 7 questions, wins 6, and 7 are ties.
- Win rate of with ties in the denominator: .
- Win rate of over non-tied votes: .
- Interpretation: the honest summary is that is slightly ahead, but a 20-question test cannot separate the two. The large tie count is itself a signal that the judge could not decide, and reporting it is more informative than reporting only the 53.8%.
Tradeoffs and failure modes
| situation | what goes wrong | better choice |
|---|---|---|
| Single-order pairwise judging | Position bias decides close calls | Swap order and count only consistent verdicts |
| Longer answers | Judge favours verbosity even when padded with repeated content | Length-controlled comparison, or a rubric that penalises padding |
| Judge is a model from the same family as a candidate | Self-favouritism, which the paper measured at about 10 points for GPT-4 and 25 for Claude-v1 | Use a judge from a different family, or several judges |
| Math, reasoning or factual checks | The judge can be misled by the candidate answers it is grading and can fail to solve the problem itself, even for basic math it could solve when asked directly | Reference-guided grading, or chain-of-thought before the verdict |
| Weak judge model | Verdicts are close to random, and the scores hide that | Measure agreement with human labels first, and report it |
| Optimising a policy against the judge | The policy learns to please the judge rather than to be better, a form of [[reward-model | reward hacking]] |
The paper's verbosity test is a useful template. It rewrote answers with extra repeated content and checked how often the judge preferred the padded version. GPT-4 was fooled in 8.7% of cases, while Claude-v1 and GPT-3.5 were fooled in 91.3%. A judge should be validated against attacks like this before it is trusted.
The most important practice is calibration against humans. Collect a set of human judgements, measure agreement with the judge, and report it alongside every score. Agreement between two human experts sets a practical ceiling. In the paper, GPT-4 agreed with human experts on 85% of non-tied votes, while two humans agreed with each other on 81%.
History
Zheng and colleagues, in a 2023 paper, introduced MT-Bench, a set of 80 multi-turn questions, and Chatbot Arena, a crowdsourced arena of pairwise human votes. They used GPT-4 as a judge and measured its agreement with 58 expert labellers. Their study named and measured position, verbosity and self-enhancement biases and reported the swap-and-count correction described above.
The method makes it cheap to score open-ended models. It is also close to a training tool: preference judges and reward models trained on human comparisons, as in RLHF, are the same idea used to produce a training signal rather than a score.
Check yourself
QuestionWhy is position bias a problem for pairwise judging, and what simple procedure reduces it?Show answer
A judge that favours the first answer will declare a winner partly because of order, which adds noise and can manufacture wins. Asking the judge twice with the order swapped, and counting a win only when both orders agree, removes the position effect from the verdict, at the cost of more ties and twice the calls.
QuestionA judge's consistency is 60%. Out of 250 pairs judged in both orders, how many pairs does the swap rule turn into ties?Show answer
Inconsistent pairs are . The swap rule turns those 100 into ties, so 100 of the 250 pairs become ties. The remaining 150 keep a verdict.
QuestionWhy can a judge from the same model family as a candidate give misleadingly high scores, and what would you do about it?Show answer
The judge may prefer answers written in its own style, which the paper called self-enhancement bias. Its high score then reflects familiarity rather than quality. The fix is to use a judge from a different family, to compare several judges, or to check the ranking against human labels.
QuestionTwo answers have Bradley-Terry scores 1.5 and 0.5. What probability does the model give that the first answer beats the second, and why is that a sensible but uncertain number?Show answer
The score gap is , so . It is sensible because the higher score wins more often. It is uncertain because the scores themselves were estimated from noisy judge verdicts, and a biased judge shifts all the scores in ways the model does not see.