Calibrating an LLM Judge: Diagnosing Position, Verbosity, Self-Preference and Drift
A pairwise judge agrees with human reviewers on 4 of 8 pairs. Each of the four mismatches has a different cause. Change one thing at a time to name it, apply only that fix, and re-score a fixed human calibration set every week to catch drift.
What you will learn
- Name the four judge biases behind a mismatch with human review: position, verbosity, self-preference and drift
- Diagnose each mismatch by changing one thing and watching whether the verdict moves to the human choice
- Apply the matching fix: settle both orders, a length-controlled rubric, a different judge model, an anchored rubric
- Re-check the judge every week on a fixed human calibration set and flag drift under a set agreement limit
Before you start
- Writing and validating an LLM judge
- Mixed-method evals: code, judge and human
Picture the TripDesk quality team. A judge model reads two replies to one customer and picks the better one. Human reviewers pick too. And the two do not match.
Checking a rubric judge against human labels is covered in writing and validating an LLM judge. This article asks the next question: why do they disagree? There are four suspects: position, verbosity, self-preference and judge drift. Diagnose which bias is responsible, then fix that one, and only that one. A fix for the wrong bias leaves the real one in place.
A talent show with four judges
Think of a talent show. Each judge has a habit, and each habit has a check:
- The first act scores best for coming first. That is position bias. The check: swap the order.
- The long speech wins on length. That is verbosity bias. The check: judge content, not time.
- Their own student gets a better mark. That is self-preference. The check: a judge from outside.
- The judge's mood slips over a long season. That is judge drift. The check: a fixed panel, every week.
Match the fix to the habit behind the mismatch.
The judge
The project runs against a stand-in: the Anthropic SDK on an httpx mock transport with a scripted judge that has four habits built in. It reads the order, the length, the judge model and the week from the request. So no API key is needed, and nothing here says how a real model behaves; it shows the method. From judge.py:
def judge_pair(client, case, model, rubric, week, swap=False):
"""ask for a winner; swap=True flips the order of the replies"""
ids = ["r2", "r1"] if swap else ["r1", "r2"]
shown = "\n".join(f"Reply {slot}: {case['replies'][i]['text']}"
for slot, i in zip("AB", ids))
ask = f"Customer: {case['question']}"
prompt = f"Pair {case['id']}. Week {week}.\n{ask}\n{shown}"
response = client.messages.create(
model=model, max_tokens=20, system=RUBRICS[rubric],
messages=[{"role": "user", "content": prompt}])
slot = response.content[0].text.split()[-1]
return ids["AB".index(slot)]
The rubric goes in the system prompt. The swap flag shows the two replies in the other order. And the verdict returned is the id of the winning reply (r1 or r2), not the slot, so verdicts from both orders can be compared.
Run against eight human-labelled pairs with the base setup, BASE in fixes.py (Sonnet, the plain rubric, week 4):
judge vs human: claude-sonnet-5-5, rubric plain, week 4
P-01 human r1 judge r1 agree
P-02 human r2 judge r2 agree
P-03 human r1 judge r1 agree
P-04 human r2 judge r2 agree
P-05 human r2 judge r1 DISAGREE
P-06 human r1 judge r2 DISAGREE
P-07 human r1 judge r2 DISAGREE
P-08 human r1 judge r2 DISAGREE
agreement 4 of 8
Diagnose: change one thing, watch the verdict
From diagnose.py:
PROBES = {"verbosity": ("controlled rubric", {"rubric": "controlled"}),
"self-preference": ("another judge model",
{"model": "claude-opus-5-5"}),
"drift": ("the week 1 judge", {"week": 1})}
def diagnose(client, case, verdict):
"""the first probe that matches the human label names the bias"""
swapped = judge_pair(client, case, **BASE, swap=True)
if swapped != verdict:
return "position", f"swap the order -> {swapped}"
for bias, (label, change) in PROBES.items():
again = judge_pair(client, case, **{**BASE, **change})
if again == case["human"]:
return bias, f"{label} -> {again}"
return "unknown", "send to a human"
diagnosis: change one thing, watch the verdict
P-05 position swap the order -> r2
P-06 verbosity controlled rubric -> r1
P-07 self-preference another judge model -> r1
P-08 drift the week 1 judge -> r1
- P-05. The judge said r1. Swapped, it says r2. The verdict follows the slot, not the reply: position.
- P-06. Reply two has 75 words, reply one has 14, and the longer one won. With a length-controlled rubric the verdict moves to the human choice: verbosity.
- P-07. Reply two came from the judge's own model. Another judge model moves to the human choice: self-preference.
- P-08. Reply two opens with an apology. The week 1 judge agrees with the human, so the judge itself changed: drift.
The probe that moves the verdict to the human choice names the bias. One change at a time, so nothing is guessed.
Fix: one correction per bias
From fixes.py:
BASE = {"model": "claude-sonnet-5-5", "rubric": "plain", "week": 4}
FIXES = {"position": "swap the order",
"verbosity": "a length-controlled rubric",
"self-preference": "a different judge model",
"drift": "a periodic human calibration set"}
CHANGE = {"position": {},
"verbosity": {"rubric": "controlled"},
"self-preference": {"model": "claude-opus-5-5"},
"drift": {"rubric": "anchored"}}
def settle(client, case, **setting):
"""both orders; a verdict must survive the swap"""
first = judge_pair(client, case, **setting)
second = judge_pair(client, case, **setting, swap=True)
return first if first == second else "tie"
def fixed(client, case, bias):
"""apply only the correction that belongs to this bias"""
setting = {**BASE, **CHANGE[bias]}
if bias == "position":
return settle(client, case, **setting)
return judge_pair(client, case, **setting)
For position, settle judges both orders; a verdict stands only if it survives the swap, and a changed winner becomes a tie that a human decides. For verbosity, the controlled rubric says "Do not reward length: judge the next step, not the word count." For self-preference, a different judge model from the one that wrote the reply. For drift, an anchored rubric that uses the human calibration pairs as examples (it adds: an apology is not a solution).
fix, one per bias
P-05 position swap the order -> tie, send to a human
P-06 verbosity a length-controlled rubric -> r1 agree
P-07 self-preference a different judge model -> r1 agree
P-08 drift a periodic human calibration set -> r1 agree
after the fixes: agree 7, tie 1, disagree 0
After the fixes: seven agree, one tie goes to a human, none disagree. A tie is an honest result; the judge could not decide without the order, so a person should.
Calibrated once is not enough
The last file keeps a fixed set of six human-labelled pairs that nobody changes, and re-scores the production judge on it every week. From calibrate.py:
MIN_AGREEMENT = 0.85
PRODUCTION = {"model": "claude-opus-5-5", "rubric": "controlled"}
def agreement(client, week, rubric=None):
"""the share of labelled pairs where the judge matches the human"""
setting = {**PRODUCTION, "week": week}
if rubric:
setting["rubric"] = rubric
verdicts = [settle(client, pair, **setting) for pair in SET]
hits = sum(v == p["human"] for v, p in zip(verdicts, SET))
return hits, hits / len(SET)
def status(rate):
return "ok" if rate >= MIN_AGREEMENT else "DRIFT"
The 0.85 limit is this team's own number, not a Claude default.
calibration set: 6 pairs, limit 0.85
week 1 6 of 6 1.00 ok
week 2 6 of 6 1.00 ok
week 3 6 of 6 1.00 ok
week 4 4 of 6 0.67 DRIFT
week 4 re-tuned 6 of 6 1.00 ok
A judge calibrated once in week 1 and never re-checked moves in week 4 and nothing shows it; people only see scores that do not fit. Re-checked weekly, the calibration set catches it at 0.67, the team re-tunes with the anchored rubric, and agreement is back to 1.00. A judge is a measuring tool: check it against known answers, again and again. For wiring that check into CI, see golden-set judge calibration as a CI gate.
The traps
When a judge's results are inconsistent with human review, three answers tempt you:
- Average three runs of the same judge. The same bias repeats in every run.
- Change everything at once. You never learn which bias it was.
- Trust the larger judge model. The check against people still has to pass.
The right answer is the correction that matches the responsible bias.
Recap
| Bias | Sign | Fix |
|---|---|---|
| Position | Verdict follows the slot when swapped | Judge both orders; a changed winner is a tie for a human |
| Verbosity | The longer reply wins | Length-controlled rubric |
| Self-preference | The judge's own model wins | A different judge model |
| Drift | An earlier week's judge agreed | Fixed human calibration set, re-scored weekly |
The project files for this lesson are in the community, free to join.
StudyEasy AI Community
Learn AI engineering, share what you build, and connect with other learners.
Free resources: lesson files, notebooks and code
Ask questions and join engineering discussions
Meet real people learning and building with AI
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
From ML Metrics to LLM Evals: Same Ruler, New Targets
Precision and recall don't disappear when you build with LLMs; they move. A spam filter at 0.75/0.75, precision@3 and recall@3 on six help-desk documents, exact match vs a key-fact check on two written answers, and the rubric that replaces a single label.
Why You Cannot Ship an LLM Feature Without an Eval: Five Parts, Three Graders, One Tiny Eval
A friendlier prompt looked better on three questions and broke on others. An eval catches that: a fixed set of cases, a grader, a pass rate and a threshold. A tiny Python eval scores two prompt versions on the same six questions: v1 passes 83% and ships, v2 passes 50% and is blocked.
Building a Golden Dataset for LLM Evals: Cases, a Schema, a Coverage Table and a Seeded Split
The answer key for a support bot: 24 cases in one JSONL file, from 12 past tickets, 8 edge cases and 4 attacks. A Pydantic schema catches 4 problems in a broken file, a stats table finds that payments and account have no hard case, and a seeded split gives the same 16 dev and 8 test cases every time.
Retrieval Evals: Score the Retriever With Recall@K, MRR and nDCG Before Blaming the Model
When a RAG answer is wrong, check the retriever first. Score two retrievers on 24 graded queries with Recall@5, MRR and nDCG@5: overall there's no clear winner (0.757 vs 0.819, 0.854 vs 0.826, 0.769 vs 0.782), but the paraphrase slice drops to about 0.5 for both, and one query scores zero everywhere.
