LLM Judges Need Their Own Test Suite
An LLM judge can automate semantic evaluation, but it brings position bias, verbosity bias, self-preference, rubric drift, and variance. A practical calibration workflow using blinded pairwise tests and human-labeled anchors.
On this page
Using an LLM to grade another LLM is useful for exactly the same reason it is dangerous: the judge can make nuanced decisions that are difficult to encode as deterministic rules.
If the rubric asks whether an answer is grounded, complete, concise, or appropriately uncertain, a model can evaluate hundreds of cases much faster than a human review team.
But the judge is still a model. It can prefer longer answers. It can prefer the first option in a pair. It can reward writing style instead of factual support. A model family may favor output that resembles its own style. Small prompt changes can shift grading behavior.
I therefore do not treat a judge score as ground truth. I treat the judge as another measurement instrument that needs calibration.
The example here is an evaluation pipeline comparing two versions of a RAG support assistant.
Start with a narrow rubric
The wider the question, the more room the judge has to invent criteria.
Instead of “which answer is better?”, I separate dimensions:
type RubricScore = { factualSupport: 0 | 1 | 2; taskCompletion: 0 | 1 | 2; unnecessaryContent: 0 | 1 | 2; explanation: string;};Each dimension gets behavioral anchors.
For factual support:
2 = all material factual claims are supported by the supplied evidence.1 = one minor unsupported or overstated claim, but the main answer is supported.0 = any material claim is unsupported or contradicted by the evidence.For task completion, write a separate definition. Do not ask one number to simultaneously represent truth, style, completeness, safety, and usefulness.
The narrower the rubric, the easier it is to compare the judge against humans.
Blind the judge to model identity
This prompt leaks information:
Answer A was generated by our old cheap model.Answer B was generated by the new premium model.Even if the judge tries to be impartial, that metadata is irrelevant to the rubric.
I pass opaque candidate IDs:
type JudgeCandidate = { candidateId: string; answer: string;};Model name, prompt version, latency, and price remain in the evaluation record but outside the judge input unless the rubric explicitly concerns those properties.
A judge should score the artifact, not the release narrative around it.
Pairwise comparisons can be easier than absolute scores
When I care about whether a candidate release is better than a baseline, pairwise judging is often more stable than asking for two independent 1–10 scores.
type PairwiseDecision = { winner: "A" | "B" | "tie"; confidence: "low" | "medium" | "high"; reason: string;};The judge sees the question, evidence, rubric, and both answers.
Then I run the same comparison with positions swapped.
async function judgeBothOrders( caseInput: EvalInput, baseline: string, candidate: string,): Promise<[PairwiseDecision, PairwiseDecision]> { const forward = await judgePair({ ...caseInput, A: baseline, B: candidate, }); const reversed = await judgePair({ ...caseInput, A: candidate, B: baseline, }); return [forward, reversed];}If the judge selects “A” in both orders, that is a strong signal of position bias for that case.
You do not necessarily need to double every production eval forever. Running swapped-order calibration periodically can tell you whether one ordering is trustworthy enough for routine use.
Normalize position-swapped decisions
The result needs to be mapped back to baseline/candidate identity:
type NormalizedWinner = "baseline" | "candidate" | "tie";function normalizeWinner( decision: PairwiseDecision, candidateIsA: boolean,): NormalizedWinner { if (decision.winner === "tie") return "tie"; if (candidateIsA) { return decision.winner === "A" ? "candidate" : "baseline"; } return decision.winner === "B" ? "candidate" : "baseline";}A calibration report can then measure how often the same pair produces a different normalized winner after swapping positions.
That disagreement rate is more informative than assuming a neutral prompt solved position bias.
Verbosity can look like quality
Suppose both answers contain the same correct facts. One is six sentences; the other is twenty paragraphs with repeated caveats and examples.
A judge may reward the longer response because it appears more thorough.
There are two fixes I use together.
First, make concision or unnecessary content an explicit rubric dimension instead of hoping the judge infers it.
Second, create calibration pairs where content is intentionally equivalent but verbosity differs. A good judge for a concise support product should not consistently reward padding.
type CalibrationCase = { id: string; question: string; evidence: string[]; answerA: string; answerB: string; humanWinner: "A" | "B" | "tie"; biasTag: "position" | "verbosity" | "style" | "self-preference" | "other";};Now judge quality can be measured by slice just like the system being judged.
Human labels are the calibration anchor
An automated judge should agree reasonably with people on the decisions that matter to the product.
I build a human-labeled set using clear review guidance. For important cases, two reviewers and adjudication are better than one person's opinion.
The goal is not perfect agreement; humans disagree too. I want to know:
- judge/human agreement rate;
- agreement by rubric dimension;
- agreement by task category;
- systematic bias tags;
- cases where the judge is confidently wrong.
A judge that matches humans 90% overall but fails half the security/grounding cases is not acceptable for that gate.
Measure confusion, not only correlation
For a discrete 0/1/2 rubric, a confusion matrix is useful.
from collections import Counterfrom dataclasses import dataclass@dataclass(frozen=True)class LabeledScore: human: int judge: intdef confusion(scores: list[LabeledScore]) -> Counter[tuple[int, int]]: return Counter((item.human, item.judge) for item in scores)If most disagreement is human=2/judge=1, the judge may simply be conservative.
If human=0/judge=2 appears frequently, the judge is missing severe failures. That is a much more serious problem even if the average numeric error looks similar.
The shape of disagreement matters.
Do not let the judge see a reference answer unless the rubric needs it
Reference answers can create their own bias.
For grounding, the judge's job is to determine whether claims follow from evidence. If you give it a polished ideal answer containing the same claim, it may reward similarity even when the supplied evidence does not support it.
For exact task completion, a reference can be useful.
I decide judge inputs per rubric rather than creating one universal evaluator prompt stuffed with question, evidence, reference, chain of thought, model metadata, and everything else available.
More context can contaminate the measurement.
Keep deterministic checks out of the judge
If JSON failed schema validation, score it deterministically.
If a forbidden tool was called, inspect the trace.
If the answer cites a source ID that does not exist, check the ID.
Using an LLM judge for these makes the evaluation both more expensive and less reliable.
I reserve judges for semantics that code cannot cleanly determine.
This also lowers the blast radius when a judge model changes.
Judge variance needs repeated measurements
Run the same calibration set multiple times with the same configuration.
from statistics import mean, pstdevdef summarize_repeated_scores(runs: list[list[float]]) -> tuple[float, float]: run_means = [mean(run) for run in runs] return mean(run_means), pstdev(run_means)If identical evaluations move substantially from run to run, release thresholds need to account for that variance.
Options include lower temperature where appropriate, clearer rubrics, larger sample sizes, repeated judging on critical cases, or deterministic substitutes for some dimensions.
A noisy metric can still be useful. It should not pretend to be precise to three decimal places.
Judge self-preference is worth testing explicitly
If the same model family both generates and judges, create calibration cases from multiple model families and compare judge preference against human labels.
I am looking for a pattern like:
Human prefers candidate B in 65% of matched cases.Judge X prefers outputs from family X in 78% of cases regardless of human label.If that pattern exists, options include using a different judge family, an ensemble, stronger blinding, or relying more heavily on human-calibrated deterministic metrics for the affected slice.
I would not assume self-preference exists in every judge. I would measure it.
Ensembles help only when errors are not identical
Using three judges sounds safer, but three near-identical models can share the same bias.
An ensemble is useful when the components add different information—for example:
- one semantic judge;
- deterministic grounding checks;
- retrieval metrics;
- a human-labeled critical slice.
That mixture is often more robust than majority voting among three prompts to the same model.
For high-value release decisions, heterogeneous evidence beats decorative redundancy.
Calibrate confidence too
If the judge emits confidence, test whether it means anything.
A useful high-confidence bucket should actually contain fewer wrong decisions than a low-confidence bucket.
type ConfidenceStats = { level: "low" | "medium" | "high"; cases: number; agreementWithHuman: number;};If “high confidence” is wrong just as often as “low confidence,” do not use it to skip human review.
Confidence labels are output fields, not automatically calibrated probabilities.
Store judge versions with every result
Evaluation history needs:
- judge model/version;
- judge prompt/rubric version;
- sampling settings;
- dataset version;
- system-under-test version.
When the judge changes, I generally do not compare its raw score directly against six months of scores from another judge without a bridge calibration.
Run both judges on an overlapping set first. Otherwise you can mistake a measurement-system change for a product regression or improvement.
CI should not depend on one fuzzy number
A robust release gate can combine:
schema/tool/security invariants: hard passretrieval recall: >= thresholdhuman-calibrated grounding judge: no significant regressionpaired quality win rate: candidate not worse than baselinelatency and token budget: within operational boundsIf the judge has a bad day, deterministic safety checks still stand. If retrieval collapses, a stylistic judge cannot hide it with a high prose score.
The evaluation pipeline should degrade gracefully when one metric is imperfect.
When an LLM judge is unnecessary
Structured extraction, exact classification, tool authorization, schema adherence, and many retrieval tasks have direct metrics.
Use them.
An LLM judge earns its cost when the product cares about semantic qualities that are difficult to express deterministically and when you have enough calibration data to understand what the judge gets wrong.
The useful mindset is not “the judge tells us which model is better.”
It is “the judge is one sensor in our test system.”
Sensors have bias, noise, drift, and calibration procedures. Treating an LLM judge that way makes it far more useful—and much less likely to become an automated source of false confidence.
KEEP READING
Related engineering notes
A Failover Route Is Not a Recovery Path: Proving Independence in AI Infrastructure
Two LLM providers can share the same failure domain. Build an evidence-backed recovery graph that checks cloud, networking, identity, control-plane and capacity dependencies before admitting fallback routes, then test correlated outages without weakening safety.
Read articleAn Eval Platform Sunset Can Erase Your Release Evidence: Build an Evidence-Escrow Migration Gate
When a hosted LLM evaluation platform retires, switching runners is not enough. Preserve the historical evidence, reconstruct grader semantics, validate scoring parity, and enforce a fail-closed release gate that survives the service shutdown.
Read articleWhen the Package Runs Before Your App: Quarantining AI Framework Releases
The 2026 agent-framework PyPI compromise exposed a blind spot in AI build pipelines: Python startup hooks execute before application imports. Design an artifact-quarantine gate, inspect wheels without installing them, separate credentials, and recover from suspected exposure.
Read article