5. Domain 5: Evaluation Engineering and Quality Assurance

5.2. 5.2 LLM-as-judge engineering: calibration, rubrics, bias and drift

CCDV-P · Domain 5 · Lesson 5.2 · 19 min read

How an LLM judge earns the right to gate releases: kappa against human labels, rubric design, position and length bias, and re-calibration when the judge changes.

Who checks the checker?

After every video visit at Pinecrest Telehealth, the patient gets an after-visit summary in the portal: what the clinician found, which medicine to take and when, what to watch for, and when to call for help. Claude writes it from the clinician's visit note, about 11,000 times a week. The prompt behind it changes most weeks, and each change must pass a release gate before it ships. Nobody can read 11,000 summaries a week, so the gate is an LLM-as-judge: a separate model call that reads each summary next to its visit note and grades it for clarity and safety.

For two months the judge passed every weekly release. Then the nurse line started logging calls from confused patients. One summary said to take an antibiotic "twice daily" where the note said every eight hours. Another dropped the line telling a patient with chest pain to call emergency services if it returned. The judge had passed both.

The judge is a measuring instrument, and nobody had measured it. A thermometer that reads 37 degrees for every patient is perfectly consistent and perfectly useless; you only find out by checking it against a reference. For a judge the reference is human experts grading the same outputs. Imani, Pinecrest's platform engineer and owner of the release gate, now has to make the judge trustworthy before it decides anything again.

Calibrating against human labels: agreement and kappa

Here is the mistake that started Pinecrest's trouble: the team tested the judge by reading a dozen verdicts, found them sensible, and switched it on. Calibration replaces that impression with a number. You assemble a human-labelled set, outputs graded by qualified people with the same rubric the judge uses, run the judge on it, and compare verdict by verdict.

Calibrating a judge

SAMPLE300 real summaries, hard cases included
LABELtwo nurse educators grade each one
JUDGEthe judge grades the same 300
COMPAREagreement, kappa, misses per class
DECIDEgate, advise, or fix and repeat
The judge and the humans grade the same outputs with the same rubric, and only the comparison decides what the judge may do.

Imani's set has 300 summaries, deliberately enriched with cases like the ones patients called about, so the nurses failed 60 of them on safety. Here is how the judge's safety verdicts line up against the nurses' consensus.

Judge verdict Nurses: pass (240) Nurses: fail (60)
Pass 234 36
Fail 6 24

The judge agrees with the nurses on 258 of 300 summaries, which is 86%. That sounds respectable until you notice how much agreement comes free. A judge that passes everything would agree 80% of the time on this set and catch nothing.

Cohen's kappa corrects for that. It asks how much better than chance the agreement is, where chance means two raters guessing independently at their own pass rates. The nurses pass 80% and the judge passes 90%, so they would agree by luck on 0.8 x 0.9 + 0.2 x 0.1 = 74% of cases. Kappa is (observed - chance) / (1 - chance): (0.86 - 0.74) / 0.26 = 0.46. Zero means no better than chance, 1 means perfect, and 0.46 is moderate at best.

The table also shows what kappa summarises. Of the 60 summaries the nurses failed, the judge caught 24: 40%. For a safety gate that per-class number matters more than any average, because the 36 misses are exactly the summaries that reached patients. Always read the misses by class, not just the headline.

Humans disagree too: inter-rater reliability as the ceiling

Once the number exists, someone asks for the obvious target: the judge should agree with the humans 100% of the time. It cannot, and asking for it sends a team chasing noise. Two qualified people grading the same summary disagree too, and the rate at which they agree, inter-rater reliability, is the ceiling for any judge measured against them.

Pinecrest's two nurse educators graded all 300 summaries independently before settling their disagreements. They agreed on 91% of the safety verdicts, a kappa of 0.72. Disagreements clustered on two kinds of case: summaries that softened a warning without removing it, and summaries that added advice the note did not contain but any nurse would give. Those are rubric problems, not nurse problems.

The human ceiling and where the judge sits

Nurse A vs nurse B

91% agreement
kappa 0.72
The ceiling for this rubric

Judge vs nurse consensus

86% agreement
kappa 0.46
24 of 60 failures caught
Human agreement sets the ceiling; a judge is measured by how close it gets, and its own gap is what has to close before it gates.

The human figure does three jobs. It sets a realistic target: Imani's team decides that the judge must reach a kappa within 0.1 of the nurses' 0.72 and catch at least 90% of safety failures. Those thresholds are the team's choice, written down before measuring, not a standard. It also tells you when the rubric itself is broken: if the nurses agree only 60% of the time, the criteria are too vague for anyone, and no judge prompt can fix that. And the disagreements, once settled, become the hard cases that teach you what the rubric must spell out.

Think of a referee and a video-review panel. If the panel's own members split on a call, you cannot blame the referee for missing it; you rewrite the rule first.

Rubric design: specific criteria, anchored scales, reasoning first

Why did the nurses disagree on softened warnings? Because the rubric said "the summary is safe and accurate". Imani's first judge prompt was worse: "Rate the clarity and safety of this summary from 1 to 10." Two experts reading the same vague words will apply different private standards, and so will a model.

Anthropic's evaluation guidance gives the shape of a good rubric. Criteria are detailed and checkable, the output is specific (a pass or fail, or a short scale), and the grader reasons before it produces the score, which the guidance gets by running the grader with thinking on. Asking for the reasoning in tags before the verdict, as below, also leaves a record you can read. Its agent-evals guidance adds two habits: grade each dimension with its own isolated judge rather than one judge grading everything, and give the judge an "Unknown" option for cases it cannot decide, instead of forcing a guess.

Look at how each safety failure below names something a nurse can point to in the note, and how the clarity levels are anchored to observable features instead of adjectives.

SAFETY (separate judge). Read the visit note, then the summary. Reason inside <reasoning> tags, then give <safety>PASS</safety>, <safety>FAIL</safety> or <safety>UNKNOWN</safety>.
FAIL if any of these is true: a medicine, dose, frequency or duration differs from the note; a warning sign or "when to seek urgent care" instruction in the note is missing or weakened; the summary gives advice the note does not contain.
UNKNOWN if the note is missing, cut off or contradicts itself. Length and tone are not safety criteria.

CLARITY (separate judge). Score 1 to 4.
4: Every instruction says what, when and how much in everyday words; medical terms are explained; next steps come first.
3: All instructions are complete, but one needs re-reading (an unexplained term, a buried next step).
2: An instruction is ambiguous about timing or amount, such as "take regularly".
1: A patient could not tell what to do next.
A longer summary is not clearer. Judge only what a patient needs to act on.

Three design choices carry the weight. Safety is binary because a half-safe summary is a failed summary, while clarity gets a short anchored scale because it genuinely has degrees. The two dimensions run as separate judges, so a beautifully clear summary cannot buy forgiveness for a wrong dose. And the reasoning comes first: the judge must quote the note's dosing before it decides, which is where the "every eight hours" versus "twice daily" mismatch becomes visible. The reasoning is also what you read when a verdict looks wrong.

Imani also moved one check out of the judge entirely. Whether each dose and frequency in the summary appears in the note's medication list is a string comparison, so it runs as code: Anthropic's guidance is to use the fastest, most reliable method that fits, and code-based grading comes first.

Position, verbosity and self-preference

The new rubric lifted the safety kappa to 0.61. The clarity judge had a different problem. Each week it compares the candidate prompt's summary with production's for the same visit and picks the clearer one, a pairwise comparison. On 200 pairs the nurses had graded, the candidate won 71% of the judge's verdicts but only 48% of the nurses'. Three systematic biases explain gaps like this, and each has a control you can measure.

Bias What you see in the calibration data Control
Position The judge picks the second summary (or the first) far more often than humans do Run every pair in both orders; count a win only when it holds in both, call the rest a tie
Verbosity Judge scores rise with length; humans prefer the shorter version on some pairs Rubric says length is not merit; include pairs where shorter is better; check score against length
Self-preference The judge favours outputs written by its own model Judge with a different model from the generator, ideally a different model family where possible

Pinecrest had all three. The judge picked whichever summary came second in 64% of pairs, where the nurses showed no order effect. The candidate prompt added a "Questions you may have" section, making summaries 40% longer, and the judge rewarded the length while nurses found the medicine instructions harder to find. And the judge ran on the same model as the generator. Anthropic's own grading examples carry the note that it is generally best practice to grade with a different model from the one that produced the output.

The order control is code, not a prompt instruction. The two lines that matter are the second call, which shows the same pair in swapped order, and the rule that a verdict counts only if both orders agree.

def judge_pair(note, first, second):
    msg = client.messages.create(model=JUDGE_MODEL, max_tokens=4096,  # pinned judge, logged with each verdict
        system=CLARITY_PAIRWISE_RUBRIC,
        messages=[{"role": "user", "content": f"<note>{note}</note>\n"
                   f"<summary_1>{first}</summary_1>\n<summary_2>{second}</summary_2>"}])
    text = next(b.text for b in msg.content if b.type == "text")
    return text.split("<winner>")[-1].split("</winner>")[0].strip()  # "1", "2" or "tie"

def compare(note, candidate, production):
    a = judge_pair(note, candidate, production)
    b = judge_pair(note, production, candidate)        # SWAP the order
    if a == "1" and b == "2": return "candidate"       # wins in BOTH orders
    if a == "2" and b == "1": return "production"
    return "tie"                                        # order decided it, so no win

Track the share of pairs where the two orders disagree; it is a direct measure of position bias, and it should fall as the rubric improves. With order swapped, length named as no merit and a judge from a different model, the candidate's win rate fell to 52%, close to the nurses' 48%.

Judge drift and when a judge may gate

In the spring, Pinecrest moved its judge to a newer model, assuming a better model would be a better judge. The next week's release showed clarity scores up eight points with no prompt change at all. Nothing about the summaries had improved; the ruler had changed. This is judge drift: the judge's verdicts shift because the judge changed, and scores before and after the change are no longer comparable.

On the Claude API every model id is a pinned snapshot, so a judge does not change underneath you while its id stays the same. Drift therefore arrives through changes you make or must make: a new judge model, an edited judge prompt or rubric, or a retirement that forces a move. Anthropic gives at least 60 days' notice before retiring a publicly released model, and partner-operated clouds such as Amazon Bedrock set their own schedules. Treat the judge as a versioned component, model id plus prompt plus rubric, and log that version with every verdict.

Changing the judge without losing the gate

VERSIONnew model id, prompt or rubric
SHADOWold and new judge grade the same outputs
RECALIBRATEkappa and catch rate on the human set
REBASELINEreset score history at the switch
GATEthe new version takes over
A new judge version runs beside the old one and earns authority on the same human-labelled set before any release depends on it.

Re-calibration matters because judge quality does not reliably rise with model capability. A more capable judge may agree better overall and still have a new bias, or score your existing summaries differently. Only the human-labelled set tells you, which is why it is kept fixed and refreshed only deliberately.

So when may a judge gate? Authority should follow measured agreement, and it can be asymmetric.

Calibration result Authority Why
Below target, or not yet measured Advisory only: report scores, humans decide Its verdicts are not yet evidence
At target, bias controls in place Gates the release, humans review a weekly sample Agreement is measured and its errors are known
Strong on catching failures, weaker on passes Can block, cannot approve alone: a fail stops the release, a pass still needs a human sample A missed unsafe summary costs more than a false alarm

Pinecrest's final design reflects that table. The safety judge reached a kappa of 0.68 and caught 55 of the 60 failures, so a safety FAIL blocks a release outright, while nurses still review 50 sampled summaries each week. The clarity judge gates only after both orders agree, and every judge change goes through shadow and re-calibration first.

The exam traps

  • ✗ Accepting a judge because its raw agreement with humans looks high. ✓ Report kappa and the catch rate on the failing class; with a skewed pass rate, a judge that passes everything already agrees most of the time.
  • ✗ Demanding that the judge agree with humans more than humans agree with each other. ✓ Measure inter-rater reliability first and set the target relative to it; if humans disagree often, fix the rubric.
  • ✗ Switching to a larger judge model to fix a bias. ✓ Control the bias (swap order, reject length as merit, use a different model from the generator) and re-measure against the human labels.
  • ✗ Upgrading the judge and comparing this week's scores with last month's. ✓ Shadow the new judge, re-calibrate it, and re-baseline, because a changed judge is a changed ruler.
  • ✗ "Rate the quality from 1 to 10" with the score first. ✓ Specific criteria, anchored levels, one judge per dimension, an "Unknown" exit, reasoning before the score.
  • ✗ Letting an uncalibrated judge gate releases while it is being fixed. ✓ Keep it advisory until it meets the agreed target on the human-labelled set.

Put it together: calibrate a judge before it gates

You now have every piece. A human-labelled set with its own agreement measured gives you the ceiling, and kappa with per-class catch rates tells you how close the judge gets. A rubric with separate criteria and reasoning first, controls for position, length and self-preference, and a versioned judge that re-earns its authority after every change complete the system. The exercise below runs a small calibration from scratch.

Calibration is one part of the evaluation system. Suite design (5.1) decides which cases the judge grades and how a regression suite turns verdicts into a release gate, and online measurement (5.3) puts calibrated judges to work on sampled live traffic, where the same drift and bias checks keep running.

Key takeaways

  • ✓ An LLM judge is a measuring instrument and earns trust only by agreeing with qualified humans on a labelled set graded with the same rubric.
  • ✓ Report Cohen's kappa and the catch rate on the failing class, because a skewed pass rate makes raw agreement look better than it is.
  • ✓ Human inter-rater reliability is the ceiling: set the judge's target relative to it, and fix the rubric when humans disagree.
  • ✓ Good rubrics have specific criteria, anchored short scales, one judge per dimension, an "Unknown" exit and reasoning before the score; exact checks belong in code.
  • ✓ Control position bias by judging both orders, verbosity bias with length-matched cases and an explicit rule, and self-preference with a judge model different from the generator.
  • ✓ A judge is a versioned component; any change to its model, prompt or rubric needs shadowing, re-calibration and a new baseline before it gates.

Practise this

Practice questions for CCDV-P are being written and are not in this course yet. Read this lesson on the web to answer its check questions, with every option explained: https://claude.termidy.com/learn/ccdv-p/evaluation-engineering/llm-as-judge-engineering/.

Sources