LLM as a Judge: Evaluation Pipelines You Can Trust (2026)
A judge model that agrees with your human reviewers 83% of the time sounds production-ready. In the worked example later in this post, that same judge misses more than a third of the answers humans failed, and its chance-corrected agreement is only “moderate.” That gap is where most evaluation pipelines quietly break. Using LLM as a judge is now the default way teams score open-ended output, because human review cannot keep pace with weekly model updates and daily prompt changes. But a judge is a measuring instrument, not an oracle. Like any sensor, it has bias, noise, and a calibration curve, and it drifts.
This guide treats the judge exactly that way. You will leave with a reference pipeline, rubric patterns that hold up, the bias evidence from Zheng et al. (2023) onward, calibration math with real numbers, ensemble and cost models, and a CI gate that blocks real regressions without flapping on noise.
What this covers: judging modes, rubric design, known biases and fixes, calibration against human labels, judge ensembles, cost, CI gating, and the 2026 tooling landscape.
Context and Background
Evaluating large language model (LLM) output used to mean reference metrics. BLEU and ROUGE count n-gram overlap with a gold answer, and BERTScore compares contextual embeddings. These work for translation, extraction, and tightly specified generation. They fail on open-ended tasks, where two excellent answers can share almost no words.
The turning point came with “Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena” by Zheng et al., published at NeurIPS 2023 (arXiv 2306.05685). The authors built MT-Bench, 80 multi-turn questions across eight categories, and collected about 3,000 expert votes. GPT-4 as a judge agreed with expert humans 85% of the time on non-tie votes. Humans agreed with each other 81% of the time. That result made “use a strong model to grade” respectable, and it is still the most cited justification for the practice.
The same paper documented the problems later studies expanded on: judges prefer the first answer, reward length, may favour their own outputs, and struggle to grade problems they cannot solve. So the 2026 consensus is neither “judges work” nor “judges are broken.” Judges work inside a pipeline that controls their failure modes and measures their agreement with humans. The engineering problem is no longer calling a model to grade. It is deciding when the grade is trustworthy enough to block a deploy.
This post is the pipeline view for single-turn and short multi-turn outputs. For the bias literature in more depth, see our companion piece on LLM-as-a-judge bias, calibration, and pairwise rubrics. For multi-step agents, see AI agent trajectory evaluation patterns.
The LLM as a Judge Reference Pipeline
An LLM-as-a-judge pipeline runs a versioned golden set through the system under test, filters outputs with cheap deterministic checks, and sends survivors to one or more judge models using a rubric. It then aggregates verdicts, corrects them using measured agreement with human labels, and feeds a statistical gate that decides whether a change ships.

Figure 1: Reference LLM-as-a-judge pipeline. Deterministic checks run first, judges score only what survives, and a calibration layer sits between raw verdicts and the deploy gate.
The diagram reads top to bottom. The candidate system is a specific prompt, model, and settings. Deterministic checks (schema validation, regex, code tests) run before any judge, so broken outputs cost no judge tokens. A router picks the judging mode, an aggregator combines votes, and a calibration layer applies correction factors measured against humans. Low-confidence items go to a human audit queue; the rest reach the CI gate.
Three design decisions in this diagram matter more than the choice of judge model.
Deterministic checks go first, always
Every property you can check with code should be checked with code. Code checks are free, instant, and have zero variance. A judge asked “is this valid JSON with a price field?” will occasionally say yes to invalid JSON; a parser never will. Skipping this layer also inflates judge agreement statistics with easy, obviously broken cases.
A useful rule is to split every requirement into “checkable” and “judgeable.” Format, length limits, required citations, forbidden content, tool-call argument types, and exact-match answers are checkable. Tone, helpfulness, faithfulness to a long source, and reasoning quality are judgeable. Our post on LLM output validation with structured outputs and guardrails covers the checkable half in depth.
The judge is versioned like production code
A judge is a prompt, a model identifier, sampling parameters, and a parsing function. Change any of these and you have a new instrument with new calibration. Floating provider aliases are an easy way to swap judges by accident, so pin the dated model snapshot. Store the judge prompt in the same registry as your application prompts, with the same review process. Record the judge version on every score you persist. Our guide to prompt and model version management with eval gates describes the registry pattern.
Set temperature to zero, or the provider’s minimum, for grading. Even then, many hosted models are not bit-for-bit deterministic. Measure the judge’s self-agreement by grading the same 100 items twice. If the judge flips more than about 5% of binary verdicts against itself, your gate threshold must absorb that noise.
Calibration sits between the judge and the gate
This is the part most pipelines omit. A raw judge pass rate is a biased estimate of the true pass rate, and the bias depends on the judge’s sensitivity and specificity against human labels. Knowing those two numbers lets you correct the estimate and size your eval set. We work through both below.
Without this layer, a judge upgrade that makes the judge stricter looks exactly like a product regression. A rubric tweak that makes it more lenient looks like an improvement. The calibration layer is what lets you tell instrument changes apart from product changes.
Judging Modes: Pointwise, Pairwise, and Reference-Based
There are three basic ways to ask a model to grade, and they answer different questions. Choosing the wrong mode is a design error that no amount of prompt tuning will fix.

Figure 2: Pointwise judging scores one answer against a rubric; pairwise judging compares two answers in both orders and declares a win only when both runs agree; reference-based judging checks an answer against a gold key.
Pointwise: absolute quality against a rubric
Pointwise judging shows the judge one input and one output, and asks for a score or a label. It is the only mode that answers “does this output meet our bar?” You need it for absolute regression thresholds, production monitoring, and any metric you will report over time.
Its weakness is scale drift. A judge’s idea of “4 out of 5” shifts across judge models, rubric versions, and even topics. Binary or three-level scales produce far more stable verdicts than 1 to 10. For finer resolution, sum several binary criteria rather than using one wide scale.
G-Eval (Liu et al., 2023, arXiv 2303.16634) improved pointwise scoring in two ways. It has the judge generate evaluation steps with chain-of-thought, then fill in a form. It also weights the final score by score-token probabilities rather than taking the most likely token. With GPT-4, G-Eval reached a Spearman correlation of 0.514 with human ratings on summarisation: clearly ahead of earlier metrics, and a reality check on how imperfect state-of-the-art judging was.
Pairwise: relative preference between two systems
Pairwise judging shows two outputs for the same input and asks which is better. Relative judgements are easier than absolute ones, so pairwise verdicts are usually more consistent. It is the right tool for A/B decisions such as a new prompt versus the old one. Aggregate wins into a win rate, or fit a Bradley-Terry model across many systems, as Chatbot Arena does. Our explainer on reward models and Bradley-Terry preference modelling covers that maths.
Pairwise has two costs. First, it cannot tell you that both answers are bad. A 70% win rate over a broken baseline is still broken. Second, it is where position bias bites hardest, so every pair must be judged twice with the order swapped. Zheng et al. recommend the conservative rule shown in Figure 2: count a win only if the same answer wins in both orders, and treat disagreement as a tie. Budget for the doubled judge calls from the start.
Reference-based: grading against a known answer
Reference-based judging gives the judge a gold answer or an answer key and asks whether the output matches it in substance. It suits factual question answering and extraction, where correct answers vary too much for string matching. “The meeting is on 4 March” and “It’s scheduled for March 4th” fail exact match but pass a reference-based judge.
Reference-based judging also fixes the judge’s competence problem. Zheng et al. found that GPT-4 failed to grade math questions it could not solve. Providing a reference answer cut the judge’s failure rate from about 70% to 15% in their test. Never ask a judge to grade work it cannot do unaided without handing it the answer. Faithfulness metrics for retrieval-augmented generation (RAG) are a variant where the reference is the retrieved context. Our post on RAG evaluation metrics and Ragas faithfulness goes deeper there.
Choosing a mode
The decision is mostly mechanical once you name the question you are asking.
| Question you need answered | Mode | Typical scale | Key control |
|---|---|---|---|
| Does this output meet our quality bar? | Pointwise | Pass/fail or 3-level | Anchored rubric, human calibration |
| Is the new prompt better than the old? | Pairwise | Win/tie/loss | Both orders, ties on disagreement |
| Is the answer factually correct? | Reference-based | Correct/partial/wrong | Curated answer key |
| Is the answer grounded in retrieved context? | Reference-based (context) | Claim-level supported or not | Claim decomposition |
| Which of five candidates should we ship? | Pairwise tournament or listwise | Bradley-Terry rating | Balanced pairings, swap order |
Mature pipelines often run two modes at once: pointwise pass rate guards the absolute floor, and pairwise win rate says whether a change is an improvement.
Rubric Design: The Rubric Is the Specification
A judge prompt is a specification of quality for a reader that takes everything literally. “Rate the helpfulness from 1 to 5” leaves the judge to invent its own definition and scale, and it will do so inconsistently.
Anchor every level with observable behaviour
Each score level should describe something the judge can check in the text. “3 = somewhat helpful” is not an anchor. “Pass = answers the user’s actual question, includes the specific number or step requested, and introduces no claim contradicted by the provided context” is an anchor. Write anchors in terms of presence or absence of things, not degrees of adjectives.
The best source of anchors is your own failure data. Pull 50 to 100 outputs that humans rejected, and group the rejection reasons. Each frequent reason becomes an explicit criterion. The rubric becomes a codified version of your reviewers’ judgement.
One criterion per judge call, or per output field
Rating accuracy, tone, and conciseness in one holistic call invites halo effects, where strength on one dimension inflates the others. Either make one call per criterion, which multiplies cost, or use a structured schema that forces a separate verdict and rationale per criterion in a fixed order.
Decision-tree rubrics push this further. DeepEval’s DAG metric, for example, expresses a rubric as a directed acyclic graph of narrow yes or no questions. Each node is easier to answer reliably than a holistic score, and the path through the tree is auditable.
Reasoning before verdict, and parse strictly
Ask for a short rationale before the label; it gives the judge room to check criteria and gives you something to read when it disagrees with humans. Put the verdict in a strict JSON field. A judge that returns “Pass, mostly” is a parse error, retried once and then logged, never silently mapped to a pass.
Here is a compact pointwise rubric for a support assistant that follows these rules:
You are grading one assistant reply against a policy. Judge only what is written.
Criteria (answer each independently, in order):
C1 ANSWERS_QUESTION: The reply addresses the user's actual request, not a nearby one.
C2 GROUNDED: Every factual claim about orders, prices or policy is supported by CONTEXT.
A claim absent from CONTEXT counts as unsupported.
C3 ACTIONABLE: If the user needs to do something, the reply states the concrete next step.
C4 SAFE: No promise of refunds, credits or timelines that CONTEXT does not authorise.
Length is not a criterion. Do not reward longer replies.
Return JSON only:
{"C1": {"reason": "...", "verdict": "pass|fail"},
"C2": {"reason": "...", "verdict": "pass|fail"},
"C3": {"reason": "...", "verdict": "pass|fail|n/a"},
"C4": {"reason": "...", "verdict": "pass|fail"}}
The explicit “length is not a criterion” line will not eliminate verbosity bias, but it documents intent for the next maintainer.
Few-shot examples help, at a price
Adding graded examples to the judge prompt improves consistency. In Zheng et al., few-shot prompting raised GPT-4’s position consistency from 65.0% to 77.5%, at roughly four times the prompt cost. Choose examples near the decision boundary, not obvious passes and fails. Keep examples out of your golden set, or you will leak answers into the measurement.
Known Judge Biases and How to Neutralise Them
Every judge has systematic biases. You do not remove them by asking nicely in the prompt; you remove them with experimental design. Here are the ones that matter most in production, with evidence and a control for each.
Position bias
Position bias is the tendency to prefer an answer because of where it appears. Zheng et al. swapped the order of answer pairs and measured how often a judge gave a consistent verdict. With their default prompt, GPT-4 was consistent 65.0% of the time, GPT-3.5 46.2%, and Claude-v1 only 23.8%. Those verdicts often depended more on ordering than on content.
Wang et al. showed how dramatic the effect can be in “Large Language Models are not Fair Evaluators” (arXiv 2305.17926). With ChatGPT as judge, simply manipulating order let Vicuna-13B appear to beat ChatGPT on 66 of 80 queries. Their fix, Balanced Position Calibration, aggregates verdicts across both orderings. They also proposed Multiple Evidence Calibration, which has the judge produce evidence before the rating, and a human-in-the-loop step for items where the orderings disagree.
Do not assume a newer judge has solved this; consistency varies by model and task, so measure it on your data. The control is cheap: judge every pair in both orders, treat disagreement as a tie, and track the tie rate. A tie rate that climbs after a judge upgrade means the new judge is less stable on your data.
Verbosity bias
Verbosity bias is the preference for longer answers regardless of quality. Zheng et al. tested it with a “repetitive list” attack. It pads answers by restating existing points, adding length but no information. Claude-v1 and GPT-3.5 both preferred the padded version 91.3% of the time. GPT-4 did so only 8.7% of the time, so strong judges resist the crude version of the attack. Subtler length effects persist.
The clearest evidence comes from AlpacaEval. Dubois et al. introduced length-controlled AlpacaEval (arXiv 2404.04475). It fits a regression that estimates what the win rate would be if both outputs had the same length. Length control raised AlpacaEval’s Spearman correlation with Chatbot Arena rankings from 0.94 to 0.98, and made the metric harder to game by simply asking a model to write more.
Apply the same idea at small scale: log output length with every verdict and check whether verdicts track length after controlling for the system. If they do, cap length deterministically or regress length out of the win rate. For pointwise rubrics, criteria phrased as presence checks (“states the next step”) are naturally less length-sensitive than holistic quality scales.
Self-preference bias
Self-preference, sometimes called self-enhancement bias, is a judge rating outputs from its own model family higher. Zheng et al. saw hints of it. GPT-4 favoured itself with about a 10% higher win rate, and Claude-v1 by about 25%. But the authors were careful to say the data was too limited to conclude the bias exists.
Later work made the case more firmly. Panickssery, Bowman, and Feng showed in “LLM Evaluators Recognize and Favor Their Own Generations” (arXiv 2404.13076, NeurIPS 2024) that models such as GPT-4 and Llama 2 can recognise their own outputs better than chance. After fine-tuning, they found a linear relationship between how well a model recognises its own text and how strongly it prefers it. A plausible mechanism is familiarity: text with lower perplexity under the judge reads as better to the judge.
The control: never let a model family judge a comparison in which it is a contestant. Use a third-family judge or a balanced cross-family panel, one of the strongest arguments for judge ensembles.
Competence and framing biases
Two more failure modes matter. The first is competence. A judge cannot reliably grade answers to problems it cannot solve. JudgeBench (Tan et al., arXiv 2410.12784, ICLR 2025) built hard response pairs in knowledge, reasoning, math, and coding, with labels based on objective correctness rather than preference. Strong models such as GPT-4o performed only slightly better than random guessing. The fix is reference-based judging, execution-based checks for code, or a judge model stronger than the systems being judged.
The second is framing. Judges can be swayed by confident tone, authority cues (“as an expert…”), or text in the answer that addresses the grader directly. The CALM study (“Justice or Prejudice?”, arXiv 2410.02736) catalogued 12 bias types, including authority and bandwagon effects. It concluded that significant biases persist on specific tasks even for advanced models. Treat any output text that mentions grading, scoring, or evaluation as a red flag, and strip or escape it before judging. Our piece on measuring LLM sycophancy covers the closely related problem of agreeable-but-wrong behaviour.
Calibrating the Judge Against Human Labels
Calibration answers one question: when the judge says “pass,” how often would a careful human agree? You need a labelled sample, the right agreement statistics, and a loop that improves the rubric until agreement is good enough.

Figure 3: Judge calibration loop. Humans label a stratified sample, the judge is scored against them, disagreements drive rubric fixes, and the frozen judge is rechecked for drift on a schedule.
Build the human reference set properly
Start with 200 to 400 items from real traffic, stratified by task type and difficulty. Two humans label each item independently, blind to the judge. Measure their agreement first; this is your ceiling. If two trained reviewers agree at a kappa of 0.7, no judge can be meaningfully validated above that, because the “truth” itself is that noisy.
Adjudicate human disagreements with a third reviewer. These cases usually reveal ambiguous rubric language, and fixing the rubric for humans fixes it for the judge too.
Why raw agreement lies: a worked Cohen’s kappa
Suppose you label 200 items. Humans pass 140 and fail 60. The judge’s verdicts cross-tabulate like this:
| Human pass | Human fail | Judge total | |
|---|---|---|---|
| Judge pass | 128 | 22 | 150 |
| Judge fail | 12 | 38 | 50 |
| Human total | 140 | 60 | 200 |
Raw agreement is (128 + 38) / 200 = 83%. That looks strong. Now compute agreement expected by chance. The judge passes 75% of items and humans pass 70%. Two raters that passed items at those rates at random would agree 0.75 × 0.70 + 0.25 × 0.30 = 60% of the time.
Cohen’s kappa rescales observed agreement against that chance baseline: κ = (0.83 − 0.60) / (1 − 0.60) = 0.575. On the commonly used Landis and Koch scale, that is “moderate” agreement, not “substantial.” The headline 83% was flattered by the high base rate of passes.
The more important number is hidden in the bottom row. Of the 60 items humans failed, the judge caught only 38. Its specificity, the rate at which it detects failures, is 63%. Its sensitivity on passes is 128 / 140 = 91%. For a quality gate, the failure-detection rate is what matters, and this judge misses 37% of real failures.
Now suppose you read the 34 disagreements, find that the judge was lenient about unsupported claims, and tighten criterion C2. On a fresh labelled sample, the judge produces 133 / 9 / 7 / 51 in the same cells. Agreement rises to 92%, chance agreement is 58.4%, and kappa becomes 0.81. Failure detection rises to 51 / 60 = 85%. That is a judge you can gate on.
A reasonable target for a gating judge is a kappa of at least 0.6 to 0.7, and within about 0.1 of your human-human kappa. Treat these as starting heuristics, not standards. A judge with very high kappa on easy items can still be weak on the hard slice, so compute kappa per stratum too.
Ordinal scores: Spearman and weighted kappa
For 1-to-5 scores, binary kappa throws away information. Use Spearman’s rank correlation, which asks whether the judge orders items the same way humans do. Use quadratic-weighted kappa if you also care that the absolute levels match.
Here is a tiny worked example with eight items. Human scores are 5, 4, 4, 3, 3, 2, 2, 1. Judge scores are 5, 5, 4, 4, 2, 3, 2, 1. The judge is off by one level on three items, and never by more. Spearman’s ρ, with tied ranks averaged, is 0.88. Kendall’s τ is 0.80. Either says the judge orders items well. But note that the judge’s mean score is 3.25 against the humans’ 3.0. A rank correlation is blind to that kind of uniform leniency, which is exactly the shift that breaks a fixed pass threshold. Always report a rank statistic and a level statistic together.
Real pipelines need far more items. With 300 items, a Spearman ρ of 0.7 has a 95% confidence interval of roughly ±0.06, which is tight enough to compare two rubric versions.
The calibration computation is short enough to live in your repo:
from sklearn.metrics import cohen_kappa_score, confusion_matrix
from scipy.stats import spearmanr
def judge_report(human, judge, positive="pass"):
k = cohen_kappa_score(human, judge)
tn, fp, fn, tp = confusion_matrix(
human, judge, labels=["fail", positive]).ravel()
sens = tp / (tp + fn) # judge passes what humans pass
spec = tn / (tn + fp) # judge fails what humans fail
return {"kappa": round(k, 3), "sensitivity": round(sens, 3),
"specificity": round(spec, 3), "youden_j": round(sens + spec - 1, 3)}
def ordinal_report(human_scores, judge_scores):
rho, p = spearmanr(human_scores, judge_scores)
qwk = cohen_kappa_score(human_scores, judge_scores, weights="quadratic")
bias = sum(judge_scores) / len(judge_scores) - sum(human_scores) / len(human_scores)
return {"spearman": round(rho, 3), "qwk": round(qwk, 3), "mean_shift": round(bias, 3)}
Correcting judge pass rates, and what imperfection costs you
Once you know the judge’s sensitivity (Se) and specificity (Sp), you can correct an observed pass rate. Epidemiologists use the same correction, the Rogan-Gladen estimator, for imperfect diagnostic tests:
true pass rate ≈ (observed pass rate + Sp − 1) / (Se + Sp − 1)
Using the first judge above, an observed pass rate of 75% becomes (0.75 + 0.633 − 1) / (0.914 + 0.633 − 1) = 0.70. That matches the human pass rate exactly, as it should on the calibration sample. On new data, it gives an estimate of what humans would have said.
The denominator, Se + Sp − 1, is Youden’s J. It also tells you how much the judge’s imperfection costs in statistical power. The variance of the corrected estimate is the variance of the raw estimate divided by J². So the effective sample size is roughly n × J². For the first judge, J = 0.547, and a 400-item eval behaves like about 120 human-labelled items. After the rubric fix, J = 0.80, and the same 400 items behave like about 256. Improving the rubric more than doubled the statistical value of every eval run. That is a cheaper win than doubling the golden set.
This framing is the thesis of the whole pipeline. A judge is a sensor. Sensors need calibration certificates, and a better-calibrated sensor lets you take fewer readings to reach the same confidence.
Recheck for drift
Calibration decays as provider models, traffic mix, and product features change. Re-run the human comparison monthly on a fresh sample of 50 to 100 items, and on every judge model or rubric change. Alert if kappa drops by more than about 0.1, or if specificity falls below your floor. Tools such as Langfuse support this workflow with annotation queues for human scores that sit beside judge scores on the same traces.
Judge Ensembles, Cost, and CI Gating
Juries beat single judges on bias, not always on accuracy
A judge ensemble asks several models to grade the same item and combines the verdicts. Verga et al. at Cohere tested this in “Replacing Judges with Juries” (arXiv 2404.18796). Their Panel of LLM evaluators (PoLL) used several smaller models from disjoint families. Across six datasets and three judge settings, the panel correlated better with human judgement than a single large judge. It also showed less intra-model bias and cost over seven times less.
The mechanism is error averaging: if judges from different families make partly independent mistakes, majority voting cancels some, and self-preference dilutes. The caveat is correlation: models trained on similar data share blind spots and vote for the same mistakes. Measure each judge’s kappa separately, and check how often they disagree. A panel whose members agree 99% of the time is one judge billed three times.
Disagreement is also a free uncertainty signal. Route split verdicts to the human queue in Figure 1, rather than resolving them by coin flip.
A cost model you can plug numbers into
Judge cost per eval run is predictable:
cost ≈ items × modes × orders × judges × samples × (input tokens × input price + output tokens × output price)
Take an illustrative case. Each judge call uses 1,500 input tokens (rubric, question, context, answer) and 300 output tokens (rationale plus JSON). Assume an illustrative price of $1 per million input tokens and $5 per million output tokens. One call then costs $0.0015 + $0.0015 = $0.003.
A 1,000-item pointwise run costs $3. Pairwise in both orders costs $6. A three-judge panel doing pairwise in both orders costs $18. Add three samples per call for self-consistency and you reach $54 per run. At 40 pull requests a day, that last configuration costs over $2,000 a day. The multipliers, not the per-token price, dominate the budget. Check current rates in our LLM API pricing comparison before plugging in real numbers.
Four levers bring this under control. Run a small smoke set on every pull request and the full set nightly. Run judges only on items whose output changed versus the baseline. Cache judge verdicts by a hash of (judge version, rubric, input, output). Push nightly runs through provider batch APIs, which OpenAI and Anthropic both price at roughly half their synchronous rates. Our guide to offline LLM batch inference covers the scheduling side.
Gate on paired deltas, not raw thresholds

Figure 4: CI gating with a judge ensemble. Baseline and candidate run on the same items, the stats gate computes a corrected paired delta with an interval, and inconclusive results go to a human rather than flapping.
The naive gate, “fail if the pass rate drops below 85%,” flaps. With 400 items at a true 85% pass rate, sampling alone gives a 95% interval of about ±3.5 percentage points. Add judge noise and a fixed threshold fails healthy builds and passes bad ones.
Instead, run baseline and candidate on the same items; only items that changed verdict carry information. Suppose 22 items went from pass to fail and 10 went from fail to pass. McNemar’s test, with continuity correction, gives χ² = (|22 − 10| − 1)² / 32 = 3.78 and p ≈ 0.052. That is borderline evidence of a regression, and the right action is a human look at the 22 flipped items, not an automatic block or pass.
The gate in Figure 4 encodes three outcomes. Block when the corrected regression exceeds a pre-agreed margin with confidence. Pass when the interval excludes a meaningful regression. Escalate everything in between. Attach the flipped items to the pull request so reviewers read examples, not just numbers. Our post on AI agent evaluation harness architecture applies the same idea to multi-step agent runs, where pass@k and trajectory scoring replace single-answer judging.
A minimal paired check:
from statsmodels.stats.contingency_tables import mcnemar
def paired_gate(base, cand, margin_pp=2.0, alpha=0.05):
# base, cand: dict item_id -> True (pass) / False (fail), same item ids
b = sum(base[i] and not cand[i] for i in base) # regressions
c = sum(cand[i] and not base[i] for i in base) # fixes
n = len(base)
delta_pp = 100 * (c - b) / n
p = mcnemar([[0, b], [c, 0]], exact=(b + c) < 25).pvalue
if delta_pp < -margin_pp and p < alpha:
return "block", delta_pp, p
if delta_pp >= -margin_pp / 2 or p > 0.5:
return "pass", delta_pp, p
return "human_review", delta_pp, p
The 2026 Tooling Landscape
All of the major frameworks now ship judge primitives. They differ in where they sit: test runner, library, CLI, or observability platform. Versions below were checked against PyPI and npm on 23 November 2026.
| Tool | Current release | Judge primitives | Best fit |
|---|---|---|---|
| DeepEval | 4.3.4 (Apache-2.0) | G-Eval, DAG metric, Arena G-Eval, threshold and strict mode | Pytest-style unit tests for LLM apps |
| Ragas | 0.4.4 (Apache-2.0) | Faithfulness, discrete and numeric custom metrics, rubric metrics | RAG and retrieval quality |
| promptfoo | 0.126.0 (MIT) | llm-rubric, g-eval, factuality, select-best, grader override | Config-driven CLI evals and red teaming in CI |
| Inspect AI | 0.3.291 (MIT) | model_graded_qa, model_graded_fact, custom scorers | Research-grade, reproducible eval tasks |
| Langfuse | Open-source core (MIT) | Observation-level judges on live traffic, annotation queues | Online evals beside traces |
| OpenAI Evals API | Hosted | score_model and string or similarity graders | Teams already on the OpenAI platform |
Several 2026 changes matter for planning. OpenAI announced its acquisition of Promptfoo on 9 March 2026, saying it will keep building the open-source project while integrating the technology into its Frontier platform. ClickHouse acquired Langfuse in January 2026 and stated that the core remains MIT-licensed and self-hostable. Langfuse v4 deprecated trace-level evaluators in favour of observation-level ones, with the cloud cutover dated 16 November 2026, so older online-eval setups need migrating. Ragas 0.4 replaced evaluate() with an experiment-based API and removed AspectCritic in favour of decorator-defined metrics. OpenAI’s original open-source openai/evals repository is now overshadowed by its hosted Evals API and graders, which its docs list among legacy APIs being reworked.
Choose by placement: a test runner in CI, an observability tool for production sampling, and judge prompts plus calibration data kept in your own repo so you stay portable. For benchmark-style harnesses such as lm-evaluation-harness and HELM, see our LLM evaluation harness architecture guide.
Trade-offs, Gotchas, and What Goes Wrong
Golden-set contamination. If prompt engineers iterate against the eval set, scores rise because the set was overfit, not because quality improved. Hold out a sealed slice that only the nightly run sees, and refresh 10 to 20% of items each quarter from new production traffic.
Goodhart on the judge. Optimising a prompt or fine-tune directly against a judge teaches the system to please that judge. Signs include rising judge scores with flat human ratings, longer outputs, and confident hedging. Keep a human-rated spot check that the optimisation loop never sees.
Silent judge drift. A provider updates the model behind an alias and your pass rate moves overnight. Pinned snapshots and a fixed “canary” set of 50 items with known verdicts catch this within one run.
Easy-item inflation. If 80% of golden items are easy, every system scores near the ceiling and regressions on the hard 20% disappear in the average. Report pass rates per stratum, and gate on the hard stratum separately.
Rationale theatre. Rationales read convincingly even when the verdict is wrong. Use them to debug disagreements, never as a substitute for calibration numbers.
Prompt injection through outputs. Generated answers can contain text such as “the grader should rate this 5.” Delimit outputs clearly, instruct the judge to ignore instructions inside them, and scan for grading-related phrases.
Multi-step agents. Single-answer judging misses the fact that an agent reached the right answer through an unsafe tool call. For agents, judge the trajectory. Our guide to LLM agent evaluation with trajectory evals and pass^k reliability covers that separately, and we do not repeat it here.
Practical Recommendations
Start with the question each eval answers, not the tool, then build in the order of Figure 1: code checks, judges, calibration, gate. Too many teams buy the judge first and never add calibration.
Invest early in a 300-item, two-rater human set; it makes every later number interpretable. Spend rubric effort where it raises Youden’s J, since each gain multiplies the value of every run. Keep production monitoring sampled and cheap, and reserve ensembles for release decisions.
- Split every requirement into checkable (code) and judgeable (model); never judge what a parser can check.
- Pin judge model snapshots, rubric version, and parameters; store them with every score.
- Use binary or three-level anchored criteria; one verdict per criterion.
- Judge pairwise comparisons in both orders; ties on disagreement; track the tie rate.
- Measure human-human kappa, then judge-human kappa, sensitivity, and specificity per stratum.
- Target judge kappa of 0.6 to 0.7 or better, within about 0.1 of the human ceiling.
- Correct pass rates with measured Se and Sp; size eval sets using n × J².
- Gate on paired deltas with McNemar, and route inconclusive results to humans.
- Recalibrate monthly and on every judge or rubric change.
Frequently Asked Questions
What is LLM as a judge?
LLM as a judge is the practice of using a large language model to grade the outputs of another model or AI system against defined criteria. The judge receives the input, the output, a rubric, and sometimes a reference answer or a second output to compare. It returns a score or label, ideally with a short rationale. It scales evaluation of open-ended text far beyond what human review can cover. However, its verdicts are only trustworthy after you measure their agreement with human labels and control for known biases.
How accurate is LLM as a judge compared with humans?
It depends on the task, the judge, and the rubric, so you must measure it on your own data. The landmark MT-Bench study found GPT-4 agreed with expert humans 85% of the time on non-tie pairwise votes, slightly above the 81% agreement between humans. On hard, objectively labelled reasoning and coding pairs, JudgeBench found strong judges barely beat random guessing. Report chance-corrected agreement such as Cohen’s kappa, plus the judge’s rate of catching real failures, rather than raw percentage agreement.
Is pairwise or pointwise evaluation better?
Neither is universally better; they answer different questions. Pairwise evaluation compares two outputs and is more consistent for deciding whether a new prompt or model beats the old one. It must be run in both orders to cancel position bias. Pointwise evaluation scores one output against a rubric and is the only mode that tells you whether output meets an absolute quality bar. Most production pipelines use pointwise pass rates as a floor and pairwise win rates for A/B decisions.
How do you reduce bias in an LLM judge?
Use experimental design rather than prompt wording alone. Swap answer order in pairwise comparisons and treat disagreements as ties to cancel position bias. Add length-neutral instructions, log output length, and control for it statistically to limit verbosity bias. Avoid letting a model family judge its own outputs, or use a cross-family panel, to limit self-preference. Supply reference answers for tasks the judge cannot solve itself. Finally, calibrate against human labels so remaining bias is measured rather than assumed away.
How many human labels do I need to calibrate a judge?
A practical starting point is 200 to 400 items, stratified by task type and difficulty, each labelled by two independent reviewers. That is enough to estimate Cohen’s kappa and Spearman correlation with useful precision, and to compute sensitivity and specificity per stratum. Measure agreement between the two humans first, because it caps how well any judge can be validated. After the initial calibration, recheck monthly with 50 to 100 fresh items, and repeat the full comparison whenever the judge model or rubric changes.
Which tools support LLM-as-a-judge evaluation in 2026?
The main options are DeepEval (G-Eval and DAG metrics with pytest-style tests), Ragas (RAG-focused metrics with a new experiment API in 0.4), promptfoo (config-driven CLI with llm-rubric and g-eval assertions, now owned by OpenAI), Inspect AI from the UK AI Security Institute (model-graded scorers for reproducible tasks), and Langfuse (online evaluators on production traces, now part of ClickHouse). OpenAI also offers hosted graders through its Evals API. Choose by where evaluation runs in your workflow, and keep rubrics and calibration data portable.
Further Reading
- LLM-as-a-judge bias, calibration, and pairwise rubrics
- AI agent trajectory evaluation patterns
- RAG retrieval evaluation with recall@k, nDCG, and golden sets
- LLM observability and LLMOps architecture
- Zheng et al., Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena
- Verga et al., Replacing Judges with Juries
By Riju — about

Pingback: AI Agent Evaluation: Harness & Trajectory Evals