A team tests a new system prompt for their help-center bot. Instead of reading hundreds of answer pairs, they ask an LLM judge which answer is better, always with the new answer as A and the old one as B. The new prompt wins most comparisons, so it ships. Two weeks later, support asks why answers got longer without getting more helpful. An engineer reruns the judge with the order swapped, and many of the wins turn into losses.
The common misconception
"Grading outputs with a strong LLM gives an objective score you can trust without checking it against human judgments." There are good reasons to believe it:
Strong judges really do agree with people. In the 2023 MT-Bench study, GPT-4 agreed with human experts on 85% of non-tied votes, more than the experts agreed with each other (81%).
It looks objective: the same rubric every time, no fatigue, and a number at the end.
It explains each verdict, and the explanation reads like a careful review.
Anthropic's docs recommend LLM-based grading for complex judgment, because it's fast, flexible and scalable.
The half-truth: average agreement can hide biases that all push the same way. The same docs attach a condition: test the grader's reliability first, then scale.
What actually happens
A judge is a model reading a prompt
An doesn't measure quality directly. It generates a verdict conditioned on everything in its prompt: which answer comes first, how long each one is, how familiar the style looks. When one of those cues lines up with the change you're testing, the bias doesn't average out. It becomes your result.
Position: the order can decide
Zheng and colleagues, in the MT-Bench study, sampled two similar answers to each question from GPT-3.5 and asked judges to compare them in both orders. GPT-4 gave the same verdict after the swap 65.0% of the time, GPT-3.5 46.2% and Claude-v1 23.8%; Claude-v1 favored the first answer in 75% of cases.
Wang and colleagues, also in 2023, showed how far that can move a ranking. Comparing Vicuna-13B with ChatGPT on 80 questions, GPT-4 as judge gave Vicuna a 51.3% win rate when it was shown first and 23.8% when shown second. With ChatGPT as judge, it was 2.5% and 82.5%: placement alone could make Vicuna win 66 of 80. GPT-4 also flipped more often when the two answers were close in quality, and two versions of your own prompt usually are. is strongest exactly where you need the judge most.
Length: more looks better
The MT-Bench study also ran a "repetitive list" test: 23 answers containing numbered lists were padded with a rephrased copy of their own list, adding no information. Claude-v1 and GPT-3.5 preferred the padded version 91.3% of the time; GPT-4, 8.7%. The bias varies widely between judges, which is why you test yours. If a new prompt makes answers longer, a length-biased judge will call it better.
Self-preference: familiar text scores higher
Zheng and colleagues saw GPT-4 favor its own answers with a 10% higher win rate and Claude-v1 with 25%, though their data couldn't settle whether that was self-preference. Panickssery and colleagues tested it directly in 2024 on news summarization: GPT-4, GPT-3.5 Turbo and Llama 2 favored summaries they had written over those by other models and by humans. All three recognized their own text more than half the time, GPT-4 with 73.5% accuracy, and when fine-tuning changed how well a model recognized itself, its moved with it, linearly. If the judge and a candidate share a model, the comparison isn't neutral.
The graded answer can mislead the judge
GPT-4 sometimes graded elementary math wrong even though it could solve the problem when asked separately: the answers in front of it led it astray. On ten math questions judged in both orders, adding a reference answer to the prompt cut failures from 14 of 20 judgments to 3.
Measure the judge, then use it
The fix isn't to drop LLM judges; it's to treat one like any measuring instrument. Anthropic's eval guidance says LLM-as-judge graders should be closely calibrated against human experts, suggests giving the judge a way out such as answering "Unknown" and grading each dimension with its own isolated judge. The docs add clear rubrics, constrained outputs such as "correct" or "incorrect", and a grader with thinking on.
Here is the comparison from the hook, before and after. Both use this helper:
Python · judge.py
import anthropicclient = anthropic.Anthropic()def judge(question, first, second): prompt = JUDGE_PROMPT.format(q=question, a=first, b=second) reply = client.messages.create( model="claude-opus-5-5", max_tokens=16000, messages=[{"role": "user", "content": prompt}], ) return next(b.text for b in reply.content if b.type == "text").strip()
Python · compare_prompts.py
# The new prompt's answer is always shown first, as Awins = sum(judge(c.question, c.new, c.old) == "A" for c in CASES)print(f"new prompt wins {wins / len(CASES):.0%} of comparisons")# No swap, no length check, no human labels
Python · compare_prompts.py
def compare(case): new_first = judge(case.question, case.new, case.old) new_second = judge(case.question, case.old, case.new) if (new_first, new_second) == ("A", "B"): return "new" if (new_first, new_second) == ("B", "A"): return "old" return "tie" # the verdict followed the order, not the answersverdicts = [compare(c) for c in CASES]print({v: verdicts.count(v) for v in ("new", "old", "tie")})longer = sum(len(c.new) > 1.3 * len(c.old) for c in CASES)print(f"new answer 30%+ longer in {longer} of {len(CASES)} cases")checked = [(v, c.human) for v, c in zip(verdicts, CASES) if c.human]agree = sum(v == human for v, human in checked) / len(checked)print(f"judge agrees with experts on {agree:.0%} of labeled cases")
The second version counts a win only when the judge picks the same answer in both orders, reports ties instead of hiding them, flags length differences and checks the judge against expert labels before anyone reads the win rate.
Bias
Evidence
Mitigation
Position
After a swap, GPT-4 kept its verdict 65.0% of the time, Claude-v1 23.8%
Judge both orders; a split verdict is a tie
Length
Padded lists won 91.3% of the time with GPT-3.5 and Claude-v1, 8.7% with GPT-4
Track length; state in the rubric that length isn't quality
Self-preference
GPT-4, GPT-3.5 Turbo and Llama 2 favored their own summaries
Keep the judge's model out of the candidates, or check those cases
Misled by the answer
A reference answer cut GPT-4's math failures from 14 of 20 to 3
Put a reference answer in the judge prompt
How to apply it in your project
Label a calibration setHave the people who own the answers grade a sample of real outputs, including close calls.
Prefer code, then rubricsUse code checks where an answer is simply right or wrong, a rubric with a reference answer where judgment is needed, and pairwise comparison only for preferences.
Judge both ordersRun every pairwise comparison twice, swapped, and count disagreements as ties.
Watch length and model familyLog the length ratio of each pair, and avoid a judge that shares a model with a candidate; where you can't, check those cases against humans.
Recalibrate on every changeRe-measure agreement on the labeled set when you change the judge model, its prompt or the kind of output it grades.
Key takeaways
A strong LLM judge can match human agreement on average and still be biased in a consistent direction.
Order alone flipped many verdicts in 2023 studies; with ChatGPT judging, placement let Vicuna-13B beat it on 66 of 80 questions.
Padded answers fooled some judges over 90% of the time, and judges favored text they wrote themselves.
Judge both orders, watch length, give the judge a reference and count split verdicts as ties.
Calibrate the judge against human labels before trusting its score, and again whenever it changes.
التعليقات (0)