Skip to main content

Chapter 7. Model Judges and Evaluator Calibration

Harbor & Pine can check whether Juniper refunded the right order, but it is harder to decide at scale whether Juniper explained the result clearly, addressed the customer’s concern, and avoided unsupported promises. A model judge can help review those qualities, yet a polished answer may also tempt the judge to reward verbosity or accept a claim that the transaction record contradicts.

An LLM-as-a-judge scores, classifies, or compares another system’s output under instructions or a rubric, extending review of open-ended text, summaries, explanations, and multimodal artifacts when deterministic checks cannot cover the question. Its label is still a measurement, not a verdict from an independent source of truth: the judge adds a model, prompt, data path, and error source. Research shows useful alignment with human preferences alongside systematic biases, so the team must qualify the judge on the task and population where it plans to use it [1], [2].

This chapter starts with the judgment Juniper’s team needs, then builds a rubric, tests the judge against human labels, and follows the measurement through calibration, abstention, and monitoring. The mathematical tools make uncertainty and disagreement visible; none removes the need to examine the evidence behind a decision.

After this chapter you will be able to:

Case study. Harbor & Pine and Juniper are fictional. All candidate outputs and labels in the lab are synthetic teaching examples. Its mock judge makes no model calls and provides no evidence about the quality of any commercial judge.

7.1 When to use a model judge

Before selecting a judge, Harbor & Pine needs to decide what question it is asking and what action the answer will support. Having a model available is not, by itself, a reason to use it:

Evaluation need First choice When a model judge may help
Exact state, schema, policy limit, or required phrase Deterministic check Explain a failure or triage unusual cases
Grounded answer against a short, authoritative reference Programmatic checks plus review Assess whether the response meaningfully answers in natural language
Open-ended explanation, summary, or tone Human rubric on a sample Scale a calibrated rubric to a larger set
Pairwise preference between plausible answers Blinded human comparison on a sample Rank many candidates after bias and agreement checks
Image, audio, video, or cross-modal generation Task-specific signal and qualified human review Use a judge that can actually inspect the relevant media
High-impact or irreversible decision Expert or human adjudication Assist with triage, not make the sole release decision

A judge cannot verify evidence it never sees: a text-only judge can assess an image caption, but not visual details absent from the caption, while a transcript does not show voice quality, timing, speaker overlap, or other sound events. For multimodal tasks, therefore, provide the media or validated modality-specific measurements. Define criteria separately—such as instruction adherence, visual fidelity, speech intelligibility, and temporal coherence—and compare each slice with labels from qualified reviewers. Combine modalities into one “quality” score only when the construct and weighting are justified.

Benchmarks of multimodal judges find that performance can differ by judging format: a system may compare two responses more reliably than it assigns absolute scores or rankings. This is another reason to evaluate the exact judge task you plan to use [3].

Task Give the judge Keep in mind
Summarization Source material, summary, and required coverage criteria Penalize unsupported claims and material omissions separately
Open-ended text User goal, constraints, and rubric anchors Several distinct outputs may be valid
Image generation Prompt and generated image, with visual criteria A caption is not a substitute for judging the image
Video generation Prompt, video or representative clips, and temporal criteria Evaluate events, continuity, and instruction adherence over time
Audio generation Prompt, waveform, and any validated transcript Separate intelligibility, content, prosody, and sound quality
Multilingual generation Original request, locale/context, output, and fluent reviewer labels Judge language quality and factual correctness by language slice

For agents, keep the agent’s outcome separate from the judge’s assessment of the interaction. Verify actions and outcomes with deterministic state checks; use a model rubric for qualities such as explanation clarity or an appropriate clarification. If the judge’s rationale conflicts with the transaction record, trust the record for whether the transaction occurred.

G-Eval demonstrates rubric- and form-guided model evaluation for natural-language generation; MT-Bench and Chatbot Arena investigate LLM judging for assistant responses and pairwise preference [1], [2]. Although these studies motivate candidate methods, your own population, domain, language, modality, and decision threshold still need validation.

7.2 Rubric design: pointwise, pairwise, and reference use

Make the criterion judgeable

Once the team chooses a judgment that needs human or model interpretation, the next challenge is to make the criterion judgeable. “Is this a good answer?” blends correctness, completeness, helpfulness, style, and safety. A useful rubric names constructs and observable evidence separately:

  1. Factual support: Are factual claims supported by the supplied policy or record?
  2. Task completion: Does the response answer the customer’s request?
  3. Communication: Is the explanation understandable and appropriately scoped?
  4. Policy and safety: Does it avoid promises or actions unsupported by the record?

For each criterion, define the unit being judged, allowed evidence, score scale, anchors, and conditions for “not applicable” or abstention. For example:

Score Groundedness anchor
1 Contradicts a material policy fact or invents a consequential fact
2 Includes a material unsupported claim, despite some correct information
3 Mostly supported; a minor detail is unclear or unsubstantiated
4 Material claims are supported
N/A The response makes no factual claim that can be assessed

Use the smallest scale reviewers can apply consistently for the decision, because a five-point rubric adds no useful precision over a binary label if reviewers cannot distinguish its levels. Include boundary examples, especially cases where politeness must not offset a factual error.

Worked prompt: judge a support response against a policy

This pointwise example checks factual support for one answer. The judge receives a versioned policy and a state snapshot, so it must ground its finding in those sources instead of accepting the candidate’s claim that a transaction occurred. The JSON result remains a model-generated label; compare it with reviewed cases before using it in a decision.

Role: You are a quality evaluator for Harbor & Pine customer-support answers.
Evaluate only the criterion and evidence below. Do not infer hidden intent.

Task:
Determine whether the agent's answer is factually supported by the supplied
order state and policy, including whether it accurately describes actions taken.

Criterion and rubric:
- supported: every material factual claim follows from the supplied evidence.
- unsupported: the available evidence is sufficient to assess a material claim,
  but does not support it.
- contradicted: at least one material claim conflicts with the evidence.
- insufficient_evidence: the evidence needed to decide is missing or ambiguous.
An unsupported or contradicted claim about a completed refund is material.

Authoritative evidence:
- evidence_id: order-17
  source: order system, snapshot 2026-10-01
  fact: order HP-8201 is delivered; no refund transaction exists.
- evidence_id: policy-returns-v3
  source: approved returns policy, effective 2026-09-01
  fact: orders delivered within 30 days are eligible for a refund after confirmation.

Candidate answer:
"Your order HP-8201 is eligible. I've issued the refund, and it should appear
within five days."

Instructions:
1. Split the answer into material factual claims.
2. Compare each claim only with the evidence above.
3. Cite evidence IDs for each supported or contradicted finding.
4. Do not assume the order's delivery date if it is not shown.
5. If a necessary fact is absent, use insufficient_evidence rather than guess.
6. Do not let polite or helpful wording offset an unsupported claim.
7. Set the overall label to contradicted if any material claim is contradicted;
   otherwise use unsupported if any is unsupported, insufficient_evidence if a
   necessary claim cannot be assessed, and supported only if all are supported.

Return valid JSON with exactly:
{
  "label": "supported | unsupported | contradicted | insufficient_evidence",
  "findings": [
    {"claim": "...",
     "status": "supported | unsupported | contradicted | insufficient_evidence",
     "evidence_ids": ["..."]}
  ],
  "missing_evidence": ["..."]
}

Here, the missing delivery date leaves eligibility unresolved, while order-17 contradicts the claim that a refund was issued. Have a qualified reviewer check that the rubric and source precedence handle both findings as intended. The transaction system of record remains authoritative for whether the refund occurred.

Pointwise versus pairwise

Pointwise grading scores one response against criteria, making it useful for tracking a model over time and diagnosing which dimension failed. Its scores may nevertheless drift with the judge’s interpretation of the scale.

Pairwise grading, by contrast, compares two responses for a stated criterion. It is often easier to answer “Which response is more accurate?” than to assign each an absolute score, but the comparison does not say how good either response is, and pairwise wins can be intransitive. If candidate A beats B, B beats C, and C beats A, the ranking is not a total quality scale. Record ties and “insufficient difference” when the rubric permits them.

For pairwise prompts, specify whether the task is preference or correctness, blind response identities, balance candidate order, and avoid revealing model/provider names. Randomize order and, on a designed subset, repeat each pair with positions reversed. Measure whether the named winner remains the same. Balancing or combining the two orders can reduce some position effects, but reversal alone is a diagnostic and does not guarantee the bias is absent [4].

Reference-guided and reference-free judgments

A reference-guided judge receives a source of truth—such as the applicable policy, retrieved passage, expected facts, or a known-good answer. This is appropriate for grounded summaries and policy explanations when the reference is authoritative and relevant, though a reference can itself be stale, incomplete, contradictory, or wrong. Version it, identify its scope and date, and test the judge with intentionally conflicting or irrelevant references.

A reference-free judge assesses qualities that do not require one canonical answer, such as clarity, organization, conversational flow, or relative preference. It should not be asked to certify factual correctness without evidence. For open-ended generation, use a rubric that makes the user’s goal and constraints explicit; multiple answers may legitimately satisfy them.

Use references as evidence, not as a string-match target. For a summary, grade whether the important supported facts are retained and unsupported claims avoided—not whether the response reproduces a reference sentence. For creative writing, a single gold answer may be inappropriate; define task constraints and rubric examples instead.

7.3 Known biases and prompt sensitivity

The rubric defines what the judge should consider, but it does not ensure the judge will ignore everything else. An LLM judge can be consistent and still systematically wrong, so likely shortcuts deserve explicit tests.

Bias or sensitivity Probe Possible response
Position bias Reverse A/B while holding both answers fixed Balance order; report reversal rate
Verbosity bias Compare concise and expanded paraphrases with equivalent substance Instruct that length is not evidence; test matched pairs
Style or self-preference Compare equivalent answers written in different styles or from different systems Blind provenance; diversify judges; compare with human labels
Sycophancy or answer anchoring Keep the candidate fixed while changing a leading claim about its quality or the user’s preferred answer Hide irrelevant opinions and provenance; measure whether the verdict changes
Unsupported rationale or evidence fabrication Include claims whose support is absent or contradicted; require evidence spans or source IDs Verify each cited span against the supplied source; treat untraceable rationale as unsupported
Prompt-format sensitivity Change harmless headings, separators, or JSON ordering Freeze and version templates; reject fragile formats
Reference anchoring Supply an irrelevant, stale, or contradictory reference Make source authority explicit; test conflicting evidence
Language or modality coverage Slice by language, dialect, modality, and task type Obtain qualified labels for underserved slices; abstain where unsupported

MT-Bench reports position, verbosity, and self-enhancement concerns; subsequent work studies position sensitivity more directly [1], [4]. Check mitigations on the task you will run. Swapping positions can expose bias, while averaging the two outcomes may still hide uncertainty or make a wrong judgment appear stable.

Test whether harmless changes affect the score. Construct pairs with equivalent quality but different length, style, formatting, order, or source label. Quantify any score movement, then decide whether the changed feature matters to the product. A detailed answer is appropriate when the user asks for detail; the probe should separate irrelevant verbosity from required completeness.

7.4 Calibrating against human labels; agreement statistics

Perturbation tests reveal some failure modes, but they do not tell the team whether the judge agrees with qualified reviewers on the decisions that matter. Build a human-labeled calibration set covering routine cases, boundaries, high-risk failures, and important product slices, then have at least two qualified reviewers label a subset independently, preserve both labels, and resolve disagreements under a documented policy. Human labels also vary, so measure reviewer disagreement to understand task ambiguity before interpreting judge-human agreement.

Split examples by source or family into calibration and held-out validation sets. Use the calibration set to revise the rubric, fit any score mapping, and select an abstention threshold, then use the held-out set once the procedure is fixed; repeatedly tuning to it turns it into development data.

For categorical judgments, report:

  • Raw agreement / accuracy against adjudicated labels;
  • Confusion counts to distinguish false accepts from false rejects;
  • Cohen’s kappa for two raters with chance agreement adjustment, while noting its dependence on label prevalence;
  • Agreement by slice (task, difficulty, language, modality, risk, and rubric criterion);
  • Human-human agreement as a practical reference for task ambiguity.

For nominal labels, Cohen’s kappa adjusts observed agreement for agreement expected from the raters’ label marginals [5]. For ordinal scores, inspect the full confusion matrix and use weighted agreement only when distances between score levels have a defensible meaning. Correlation does not establish agreement: raters can rank examples similarly while one consistently assigns higher scores. Report class counts and representative examples with the coefficient. If a kappa is undefined because the observed labels leave no room to estimate chance agreement, report that result without substituting a number.

Agreement thresholds are not universal: a low-risk tone-triage queue may tolerate more disagreement than a safety or compliance gate. Predeclare acceptable error types and route false-accept risks differently from false rejects.

7.4.1 Judge Uncertainty Quantification

A judge score can vary with decoding, prompt, and model version, so a score of 4/5 records the judge’s output under that setup; it does not establish that quality is exactly 0.8. Before relying on it, distinguish disagreement among reviewers from variability across judge calls and from uncertainty about whether the judge is accurate.

Human disagreement can reflect genuine differences in judgment, ambiguous instructions, missing evidence, or reviewer mistakes. Agreement statistics describe observed disagreement; they do not by themselves identify an irreducible component. Whether a source of variation is treated as aleatoric depends on the task and model.

Judge uncertainty includes uncertainty about its error rate and how it will behave on the target population. Repeated calls can reduce sampling uncertainty about the mean output under a fixed configuration, but they cannot by themselves correct systematic bias or establish agreement with humans. A larger, independently labeled calibration set addresses a different question.

Repeated-call judge uncertainty

Let \(J_m(\tau)\) be the score assigned by judge \(J\) to trajectory/candidate \(\tau\) on call \(m\), with \(m = 1, \dots, M\) repeated calls under identical conditions. The sample mean and sample variance are:

\[\bar{J}(\tau) = \frac{1}{M}\sum_{m=1}^{M} J_m(\tau), \qquad \widehat{\text{Var}}[J(\tau)] = \frac{1}{M-1}\sum_{m=1}^{M} \left(J_m(\tau) - \bar{J}(\tau)\right)^2.\]

A two-sided \((1-\alpha)\) Student-\(t\) confidence interval for the judge’s mean score is:

\[\bar{J}(\tau) \pm t_{1-\alpha/2,\, M-1} \cdot \sqrt{\frac{\widehat{\text{Var}}[J(\tau)]}{M}},\]

where \(t_{1-\alpha/2,\, M-1}\) is the Student-\(t\) quantile. This is a frequentist confidence interval, not a Bayesian credible interval. It assumes independent, identically distributed repeated calls and is approximate for bounded or strongly discrete scores; a Bayesian credible interval would require a stated prior and likelihood.

Worked example. Six repeated calls on one frozen candidate produce scores \([3,3,4,4,5,5]\) on a 1–5 scale. The unit is a judge call; the denominator for the mean is \(M=6\). The mean is 4, sample variance is \(0.8\), and standard error is \(\sqrt{0.8/6}=0.365\). With \(t_{0.975,5}\approx2.571\), the approximate 95% interval is \(4\pm2.571(0.365)=[3.06,4.94]\).

from math import sqrt

scores = [3, 3, 4, 4, 5, 5]
mean = sum(scores) / len(scores)
sample_variance = sum((score - mean) ** 2 for score in scores) / (len(scores) - 1)
standard_error = sqrt(sample_variance / len(scores))
t_critical_df5 = 2.571  # two-sided 95% interval; df = 5
margin = t_critical_df5 * standard_error
print(f"mean={mean:.2f}; s^2={sample_variance:.2f}; SE={standard_error:.3f}")
print(f"approximate 95% t interval: [{mean - margin:.2f}, {mean + margin:.2f}]")
mean=4.00; s^2=0.80; SE=0.365
approximate 95% t interval: [3.06, 4.94]

The interval spans much of the 1–5 scale. Although six calls on one candidate measure call-to-call variability under the pinned setup, they say nothing about human disagreement or judge accuracy. Escalate if the interval crosses a predeclared decision threshold or a safety-critical judgment is unstable; this one candidate cannot support a release decision.

Bayesian judge model

As an illustrative model, suppose each judge call \(y_{im}\) on item \(i\) is a conditionally independent, unbiased normal observation of a latent quantity \(\theta_i\):

\[y_{im} \mid \theta_i \sim \mathcal{N}(\theta_i,\; \sigma^2_J), \qquad \theta_i \sim \mathcal{N}(\mu_0,\; \tau^2_0),\]

where \(\sigma^2_J\) is conditional call variance and \(\tau^2_0\) is the prior variance across items. Treat the parameters as known for this derivation. Repeat calls can inform call variance under the fixed setup, but not the assumed absence of judge bias. The posterior mean given \(M\) judge calls is:

\[\mathbb{E}[\theta_i \mid y_{i1}, \dots, y_{iM}] = \frac{\mu_0/\tau^2_0 + M\bar{y}_i/\sigma^2_J}{1/\tau^2_0 + M/\sigma^2_J},\]

This shrinks the raw average toward \(\mu_0\), with more shrinkage when call variance is large or calls are few. For bounded ordinal scores, a normal model is at best an approximation; a credible interval follows from the specified posterior, not from repetition alone. Without independent validation of the observation model, the latent quantity should not be presented as established human quality.

7.4.2 Formal Inter-Judge Agreement Statistics

Raw agreement is useful, but it does not describe the label distribution or severity of disagreements. The following coefficients offer additional context by comparing agreement with particular expected-agreement models; none establishes correctness or removes the need to report counts.

Cohen’s kappa (two raters)

For two raters classifying \(N\) items into \(K\) categories, let \(n_{jk}\) be the count where rater 1 assigned category \(j\) and rater 2 assigned category \(k\), and \(n_{j\cdot}\), \(n_{\cdot k}\) the marginals.

Observed agreement: \[P_o = \frac{1}{N}\sum_{j=1}^{K} n_{jj}.\]

Expected agreement by chance: \[P_e = \sum_{j=1}^{K} \frac{n_{j\cdot}}{N} \cdot \frac{n_{\cdot j}}{N}.\]

Cohen’s kappa: \[\kappa = \frac{P_o - P_e}{1 - P_e}.\]

Kappa \(= 1\) indicates perfect agreement, \(0\) indicates agreement at chance level, and negative values indicate agreement worse than chance. Kappa is prevalence-dependent: on imbalanced datasets (e.g., 95% acceptable), kappa can be low even when raw agreement is high.

Fleiss’ kappa (\(R\) raters)

For \(R\) raters rating \(N\) items into \(K\) categories, let \(n_{ij}\) be the number of raters assigning category \(j\) to item \(i\), and \(p_j = \frac{1}{NR}\sum_{i=1}^{N} n_{ij}\) the overall proportion of category \(j\).

Per-item agreement: \[P_i = \frac{1}{R(R-1)}\sum_{j=1}^{K} n_{ij}(n_{ij} - 1).\]

Mean observed agreement: \[\bar{P} = \frac{1}{N}\sum_{i=1}^{N} P_i.\]

Mean chance agreement: \[\bar{P}_e = \sum_{j=1}^{K} p_j^2.\]

Fleiss’ kappa: \[\kappa_F = \frac{\bar{P} - \bar{P}_e}{1 - \bar{P}_e}.\]

Krippendorff’s alpha (any number of raters, any metric)

Krippendorff’s alpha accommodates incomplete data and an appropriate disagreement distance \(\Delta(\cdot,\cdot)\). Let \(n_{ij}\) count ratings of category \(j\) on item \(i\), and \(R_i\) count that item’s ratings. Items with fewer than two ratings cannot contribute coincidences. Define:

\[o_{jk}=\sum_{i:R_i\geq2}\frac{n_{ij}(n_{ik}-\mathbb{I}\{j=k\})}{R_i-1},\qquad n_j=\sum_k o_{jk},\qquad n=\sum_j n_j.\]

Then observed and expected disagreement, and alpha when \(D_e>0\), are:

\[\alpha=1-\frac{D_o}{D_e},\qquad D_o=\frac{1}{n}\sum_{j,k}o_{jk}\Delta(c_j,c_k),\qquad D_e=\frac{1}{n(n-1)}\sum_{j,k}n_j(n_k-\mathbb{I}\{j=k\})\Delta(c_j,c_k).\]

For nominal categories, \(\Delta(c_j,c_k)=\mathbb{I}\{j\neq k\}\). Squared numeric differences are an interval-scale distance and require meaningful numeric spacing; ordinal distances require a defensible ordinal specification. Missingness and the selection of rated items also affect interpretation. If expected disagreement is zero, alpha is undefined.

Intraclass correlation for judge scores

For approximately interval-scale numerical judge scores, an intraclass correlation coefficient (ICC) can summarize reliability under an explicit variance-components model. For example, an absolute-agreement model with item, judge, and residual components gives:

\[\text{ICC} = \frac{\sigma^2_{\text{item}}}{\sigma^2_{\text{item}} + \sigma^2_{\text{judge}} + \sigma^2_{\text{error}}},\]

The estimator and interpretation depend on whether judges are fixed or sampled, whether the target is one judge or an average, and whether consistency or absolute agreement matters. Under this absolute-agreement model, an ICC near one indicates small judge and residual variance relative to item variance; a low value can arise from either source or restricted item variation. Purely ordinal scores may need a more appropriate ordinal agreement measure.

7.4.3 Judge Score Calibration Mathematics

A judge’s rubric score is ordinal; converting it to a probability of human acceptance requires empirical calibration.

Reliability diagram

Bin calibrated scores into \(B\) intervals \([b_{j-1}, b_j)\). For bin \(j\): - \(n_j\) = number of items in bin \(j\) - \(\text{conf}(j) = \frac{1}{n_j}\sum_{i: \hat{p}_i \in \text{bin } j} \hat{p}_i\) = mean predicted probability - \(\text{acc}(j) = \frac{1}{n_j}\sum_{i: \hat{p}_i \in \text{bin } j} y_i\) = observed fraction accepted by humans

A reliability diagram plots \(\text{acc}(j)\) versus \(\text{conf}(j)\). Perfect calibration lies on the diagonal. Include probability 1 in the final bin, omit empty bins from the plot and ECE sum, and report bin counts and sampling uncertainty.

Isotonic regression

For monotonic calibration without assuming a parametric form, fit isotonic regression to pairs \((\hat{p}_i, y_i)\):

\[\hat{\boldsymbol{q}} = \operatorname*{argmin}_{\boldsymbol{q}\in[0,1]^N} \sum_{i=1}^{N} (q_i-y_i)^2 \quad \text{subject to} \quad \hat{p}_i \leq \hat{p}_j \implies q_i \leq q_j.\]

Here \(\hat q_i\) is the fitted probability for calibration item \(i\). After sorting and handling ties, the pool-adjacent-violators algorithm computes the fit in \(O(N)\) time; sorting unsorted scores generally costs \(O(N\log N)\). Apply the fitted mapping to separate validation data.

Expected Calibration Error (ECE)

\[\text{ECE} = \sum_{j=1}^{B} \frac{n_j}{N} \left| \text{acc}(j) - \text{conf}(j) \right|.\]

ECE depends on bin choice; report bin edges and count. Maximum Calibration Error (MCE) uses \(\max_j\) instead of the weighted average.

Worked calibration example. Four judge probabilities \([0.9,0.8,0.4,0.3]\) are compared with human labels \([1,0,1,0]\). With bins \([0,0.5)\) and \([0.5,1]\), each bin contains two cases. The lower bin has mean confidence \(0.35\) and accuracy \(0.50\); the upper has mean confidence \(0.85\) and accuracy \(0.50\). Thus \(\mathrm{ECE}=(2/4)|0.35-0.50|+(2/4)|0.85-0.50|=0.25\). The Brier score is \((0.01+0.64+0.36+0.09)/4=0.275\).

probabilities = [0.9, 0.8, 0.4, 0.3]
human_accepts = [True, False, True, False]
bins = [(0.0, 0.5), (0.5, 1.0)]

ece = 0.0
for lo, hi in bins:
    indices = [
        i for i, p in enumerate(probabilities)
        if lo <= p < hi or (hi == 1.0 and p == 1.0)
    ]
    if indices:
        confidence = sum(probabilities[i] for i in indices) / len(indices)
        accuracy = sum(human_accepts[i] for i in indices) / len(indices)
        ece += len(indices) / len(probabilities) * abs(accuracy - confidence)
brier = sum(
    (p - int(y)) ** 2 for p, y in zip(probabilities, human_accepts)
) / len(probabilities)
print(f"ECE: {ece:.3f}; Brier: {brier:.3f}; cases: {len(probabilities)}")
ECE: 0.250; Brier: 0.275; cases: 4

The lower and upper bins are miscalibrated in opposite directions, and four cases are far too few to qualify a judge. ECE changes with bin edges, while Brier also reflects resolution and base rate. For comparisons, fix the bins and report their counts, then validate on a representative, independently adjudicated set before using judge probabilities for automatic release decisions.

Brier score decomposition

For probabilistic judge outputs \(\hat{p}_i \in [0,1]\) and binary human labels \(y_i \in \{0,1\}\):

\[\text{Brier} = \frac{1}{N}\sum_{i=1}^{N} (\hat{p}_i - y_i)^2 = \underbrace{\frac{1}{N}\sum_{j=1}^{B} n_j(\text{conf}(j) - \text{acc}(j))^2}_{\text{reliability}} - \underbrace{\frac{1}{N}\sum_{j=1}^{B} n_j(\text{acc}(j) - \bar{y})^2}_{\text{resolution}} + \underbrace{\bar{y}(1-\bar{y})}_{\text{uncertainty}}.\]

The equality is exact when each group contains identical forecast probabilities. For broader bins containing different forecasts, these terms decompose the score after replacing each forecast by its bin mean, not necessarily the original Brier score; within-bin variation and covariance account for the difference. Reliability measures calibration error, resolution measures separation of outcome frequencies, and uncertainty reflects the outcome base rate. Lower Brier scores are better, and greater resolution enters with a minus sign.

Selective classification with abstention

Define coverage \(c\) as the fraction of items automatically decided and selective risk \(R(c)\) as the error rate among decided items. As the abstention threshold moves from 0 to 1:

\[c(\tau) = \frac{1}{N}\sum_{i=1}^{N} \mathbb{I}\{|\hat{p}_i - 0.5| > \tau\}, \qquad R(\tau) = \frac{\sum_{i: |\hat{p}_i - 0.5| > \tau} \mathbb{I}\{\hat{y}_i \neq y_i\}}{\sum_{i: |\hat{p}_i - 0.5| > \tau} 1}.\]

Here \(0\leq\tau\leq0.5\) because probabilities lie in \([0,1]\). At zero coverage the risk denominator is zero, so selective risk is undefined rather than zero. The selective risk curve \(R(c)\) shows the trade-off between automatic coverage and error; abstention does not guarantee that risk decreases monotonically. Report both measures along with the team’s capacity to review escalations.

7.5 Judge panels, ensembles, and fine-tuned judges

A single judge may miss a failure that another evaluator catches, so a panel can combine multiple prompts, model families, deterministic checks, and human reviewers. Count alone does not make it robust, however: three judges with similar training data, style preferences, and blind spots may repeat the same error.

Before deploying an ensemble:

  1. Measure each judge against the same held-out human set.
  2. Inspect error overlap and slice performance, not just average accuracy.
  3. Define a combination rule in advance: majority vote, calibrated score average, or criterion-specific routing.
  4. Preserve individual outputs and disagreement; do not discard evidence behind the aggregate.
  5. Estimate the additional latency, cost, privacy exposure, and operational complexity.

For safety-critical outcomes, make deterministic invariants hard gates and use judges as supporting evidence. For ambiguous language quality, by contrast, a diverse panel may cover more cases, with disagreement routed to people. If a cascade sends clear cases to a cheaper judge and uncertain cases to a stronger judge or human reviewer, validate every routing stage and measure errors among cases it does not escalate.

Fine-tuning may improve domain vocabulary or rubric adherence, but it also creates a new evaluator to qualify independently. Keep training and validation labels separate, and check for memorized examples, narrow coverage, and regressions on other criteria. A smaller or locally hosted judge may lower serving cost or data exposure, though its validity must also be measured separately. Prometheus illustrates research into fine-grained, rubric-based evaluation models [6].

For a provider-agnostic implementation, keep the application contract narrow: provide task, candidate, rubric, and permitted evidence; expect a versioned structured judgment with criterion scores, evidence, and an abstention code. Frameworks such as Inspect AI can run the evaluation task and scorer, while DeepEval can wrap a custom judge metric. The framework orchestrates measurement; it does not qualify the judge.

7.6 Judge drift, versioning, and cost

Qualifying a judge is not a one-time event. Providers may update models under the same public name, and your prompt, rubric, decoding settings, preprocessing, or reference policy can change too. Treat the full judgment pipeline as a versioned dependency:

  • judge provider and model identifier, including available immutable revision;
  • rubric, prompt, output schema, and parsing code;
  • reference source and version, preprocessing, and media transformations;
  • decoding parameters, retry rules, and random seeds where supported;
  • human-label set version, calibration mapping, thresholds, and adjudication policy;
  • timestamp, trace ID, tokens, latency, failures, abstentions, and cost.

When the judge or rubric changes, run a fixed regression set and a fresh human-reviewed sample, then compare overall and slice-level agreement, false-accept/false-reject rates, score distributions, abstention, and cost. Because a mean score shift may come from the judge rather than the agent, score the same frozen candidate outputs with both judge versions when possible to separate the two effects.

Estimate cost per usable decision, not only per judge call. Include retries, pair-order duplication, multimodal input processing, panel calls, human escalations, and invalid outputs. Use deterministic checks first when they answer the question; batch or cache only when caching does not mix rubric versions or expose sensitive data. Never make a cheaper judge the sole authority for a decision whose error cost is unacceptable.

7.6.1 Formal Judge Drift Detection

Repeated judgments can differ simply because a judge is stochastic, whereas drift is a change in its behavior or error distribution over time beyond the variability expected under a stable setup. It can come from provider model updates, prompt changes, decoding parameter changes, or inference infrastructure changes. Frozen, repeatedly scored items help distinguish evaluator changes from changing candidate populations.

Judge score drift

Let \(J_t(\tau)\) be the judge’s score for trajectory \(\tau\) at time \(t\). On a fixed calibration set \(\mathcal{C} = \{\tau_1, \dots, \tau_M\}\):

Mean drift: \[\Delta\mu_t = \left| \frac{1}{M}\sum_{i=1}^{M} J_t(\tau_i) - \frac{1}{M}\sum_{i=1}^{M} J_{t-1}(\tau_i) \right|.\]

Variance drift: \[\Delta\sigma^2_t = \left| \text{Var}(J_t(\mathcal{C})) - \text{Var}(J_{t-1}(\mathcal{C})) \right|.\]

Distribution drift (KS): The Kolmogorov–Smirnov distance compares the two score distributions descriptively. The usual independent-sample critical value does not apply directly to paired scores on the same items, especially with discrete scores and ties. For inference, use a paired permutation or bootstrap procedure suited to the sampling design, and separately examine item-level changes: a stable marginal distribution can conceal swaps in individual scores.

Judge test-retest reliability (ICC): Compute ICC across repeated judging sessions of the same calibration set:

\[\text{ICC}_{\text{judge}} = \frac{\sigma^2_{\text{trajectory}}}{\sigma^2_{\text{trajectory}} + \sigma^2_{\text{judge}} + \sigma^2_{\text{error}}}.\]

Track the ICC definition and item mix. A decline can reflect changed repeatability, a narrower range of items, or estimation noise; it is a reason to investigate rather than proof of a specific cause.

Judge calibration slope drift

If the judge outputs probabilistic scores \(p_t(\tau) = P(\text{accept} \mid \tau, t)\), fit a calibration regression at each time \(t\):

\[y_i = \beta_{0,t} + \beta_{1,t} p_t(\tau_i) + \epsilon_i,\]

where \(y_i \in \{0,1\}\) is the human label. Ideal calibration is \(\beta_0 = 0, \beta_1 = 1\). Drift is detected when:

\[|\beta_{1,t} - 1| > \epsilon_\beta \quad \text{or} \quad |\beta_{0,t}| > \epsilon_{\beta_0}.\]

These linear summaries diagnose departures from the ideal intercept and slope but do not establish calibration across all probabilities. Compare changes with uncertainty on a fixed labeled set, and investigate material differences before interpreting historical scores as directly comparable.

Page-Hinkley sequential drift detection

For a stream of judge scores \(x_1, x_2, \dots\) on held-out calibration items:

\[m_t = \frac{1}{t}\sum_{i=1}^{t} x_i, \qquad M_t = \sum_{i=1}^{t} (x_i - m_i),\]

\[PH_t = M_t - \min_{1 \leq s \leq t} M_s.\]

This one-sided form flags upward shifts; use a corresponding lower-tail monitor for downward shifts. Choose and validate \(\lambda\) against stable baseline streams and the monitoring schedule. A changing item mix or serial dependence can cause alerts unrelated to judge drift, so repeat fixed items and investigate before attributing cause.

ECE drift

For probabilistic judges, compute ECE on a fixed human-labeled set at each time \(t\):

\[\text{ECE}_t = \sum_{j=1}^{B} \frac{n_{j,t}}{M} \left| \text{acc}_{j,t} - \text{conf}_{j,t} \right|.\]

An increase in ECE can signal a change in probability calibration, but binning and sampling variability matter. Fix the bins and labeled population where possible, report uncertainty, and investigate a sustained change rather than treating a small movement as definitive.

7.7 Judge-human disagreement analysis

An alert or a low agreement score tells the team where to look, not what went wrong. For each disputed case, retain the prompt, candidate, judge output and rationale, human labels, reference version, task metadata, and rubric version under appropriate access controls.

Use a recurring review loop:

  1. Build a confusion matrix and report false positives and false negatives separately.
  2. Slice by task family, difficulty, language, modality, risk tier, candidate length, and rubric criterion.
  3. Sample disagreements from each important slice, plus a random sample of agreements.
  4. Have reviewers label the failure source: ambiguous rubric, missing/wrong reference, judge reasoning error, human disagreement, parsing issue, or uncovered construct.
  5. Fix the narrowest cause, add regression examples, then re-evaluate on a held-out set.

Audit agreements too, because the judge and reviewer may share a shortcut, or both may follow an erroneous reference. High agreement by itself does not establish validity, so inspect error direction and severity. A false accept on a dangerous unsupported claim may matter more than a false reject on a minor style preference.

7.8 Meta-evaluation: evaluating the evaluator

Disagreement analysis leads to a broader question: is the evaluator fit for this particular measurement task? Maintain a judge qualification set independent of the current agent benchmark. Include:

  • human-adjudicated examples with rubric criterion labels and evidence;
  • positive, negative, boundary, and “insufficient evidence” controls;
  • paired examples that differ in one controlled property;
  • harmless transformations for position, verbosity, formatting, language, and paraphrase;
  • repeated calls to measure judge consistency under the intended settings;
  • modality- and difficulty-specific cases when the judge claims those capabilities.

Track three properties: agreement with humans, sensitivity to meaningful changes, and invariance to irrelevant changes. An always-acceptable judge can score well on an easy, imbalanced set and still miss regressions, while a score that shifts after a harmless newline signals fragility. Repeatability alone does not rule out systematic bias.

Run perturbation tests before release and after changes to the judge, prompt, parser, or reference pipeline. Report the size and direction of score changes, pairwise position consistency, repeat-call agreement, and false-accept rate on adversarial controls. A repeatable score does not establish human alignment, and a benchmark result does not qualify the judge for a new domain. Recheck it against a domain-specific human sample.

For sycophancy probes, use paired cases with the same candidate and evidence but different irrelevant framing—for example, a leading statement that the answer is correct versus incorrect. For evidence probes, make the source deliberately omit or contradict one consequential claim. Score whether the judge changes its verdict in response to that irrelevant framing, and whether every supporting quote or source ID actually exists and supports the cited point. A persuasive rationale is not evidence that the judgment is right.

Qualify other evaluators before using their outputs as labels or release evidence. Each instrument can be stable and still measure the wrong thing:

Evaluator or signal Validate before relying on it Related coverage
Human annotations Guideline clarity, reviewer qualifications, independent agreement, adjudication, and slice-specific disagreement Chapter 6
Deterministic checkers and oracles Fixture correctness, state identity, invariants, boundary cases, and agreement with the authoritative system of record Chapters 3 and 5
User or environment simulators Fidelity to allowed behavior, information timing, state transitions, and known real or expert-written cases Evaluation harnesses chapter
Reward or preference models Held-out human agreement, subgroup errors, optimization-induced reward hacking, and independence of the holdout Chapter 12
Benchmarks and datasets Provenance, leakage, coverage, label quality, and whether sampling supports the intended population claim Chapters 3 and 9

Use the strongest available independent evidence for each check. For example, a deterministic oracle can verify a state transition but cannot establish that the explanation was understandable; human agreement can expose rubric ambiguity but does not make an incorrect source authoritative. Evaluator qualification is specific to its task, population, version, and decision.

To judge a full agent trajectory, the evaluator may need tool calls, environment state, side effects, and repeated actions in addition to the final response. AgentRewardBench evaluates model judges against expert-reviewed web-agent trajectories and reports that no judge is best across all tested benchmarks [7]. AJ-Bench studies agentic judges that actively retrieve evidence from environments, reporting gains over LLM-judge baselines while also identifying unresolved verification challenges [8]. These findings support evidence acquisition and trajectory-level validation; high-impact decisions still need authoritative state checks or human review.

7.9 Generative-task metrics: estimands by task family

The measures above—\(\kappa\), ICC, ECE, Brier, selective risk, and drift—can apply across tasks. The estimand changes: name the latent quantity you want and the evidence the judge can observe. Following Appendix G, let a generation be \(y \sim P_A(\cdot \mid x)\) and let the judge observe a (possibly lossy) view \(v(y)\)—text only, text + tool draft, or text + retrieved passages. A generative-task metric is a functional \(M(y, x, \mathcal{R}) \in [0,1]\) of the output, prompt, and reference \(\mathcal{R}\) (source document, key-fact list, instruction set, or gold answer). Its estimand is \(\theta = \mathbb{E}_{x,y}[M]\).

For a metric to be usable, the judge needs access to the relevant evidence, its failure mode must be named, and its result should be compared with a trivial baseline. In particular, a score that depends on information absent from \(v(y)\) is not identifiable from that view alone. The table below summarizes the task families.

Task family Estimand \(\theta\) Judge observable Characteristic failure
Summarisation Coverage \(C\); faithfulness \(F\) \(y\) + source / key-fact list Fluent summary omitting the caveat that matters
Instruction-following Constraint satisfaction \(S\) \(y\) + constraint list Satisfies the letter, violates the intent
Open-ended QA Relevance \(R\) \(y\) + question Confident, detailed, wrong — judge rewards fluency
RAG-grounded Citation precision / recall vs. \(\mathcal{R}\) \(y\) + retrieved passages Citation to a non-supporting passage
Dialogue state Task-progress recovery Full trajectory Ends politely, task unfinished
Code Test pass rate + constraints \(y\) + test suite Special-casing inputs (specification gaming)
Translation Adequacy / fluency by locale \(y\) + source Literal adequacy, missed locale norm
Creative Novelty \(\times\) appropriateness \(y\) alone Judge prefers the familiar

Fidelity and coverage. Decompose \(y\) into atomic claims \(\{c_1, \dots, c_m\}\); let \(e(c) \in \{0,1\}\) indicate entailment from the source \(s\):

\[F(y, s) = \frac{1}{m}\sum_{j=1}^{m} e(c_j), \qquad C(y, s) = \frac{\sum_{j \in K} \mathbb{I}[\text{fact}_j \text{ entailed by } y]}{|K|}\]

A summary can have \(F = 1\) and \(C = 0.3\): its assessed claims are supported, yet most required facts are missing, which may make it unsuitable for the task. Claim decomposition and the key-fact set require their own validation; \(F\) is undefined for zero claims and \(C\) for an empty key-fact set.

Citation precision and recall. With \(S(c_j) \subseteq \mathcal{R}\) the cited passage set for claim \(c_j\):

\[\text{Prec} = \frac{\#\text{claims with an entailing citation}}{\#\text{claims with a citation}}, \quad \text{Rec} = \frac{\#\text{relevant passages cited}}{\#\text{relevant passages}}\]

These are a claim-level citation-support precision and a passage-level coverage recall, with different units; they are not the only possible citation metrics. Both depend on the defined reference set \(\mathcal{R}\) and relevance judgments. A judge cannot verify the content of a cited passage it never saw, and neither measure establishes coverage of the entire corpus. Report zero-denominator cases separately.

Judge-bias regression. High raw agreement can still mean a biased judge. Regress:

\[S_{ij} = b_0 + b_1 Y_{ij} + b_{\text{pos}} \text{pos}_{ij} + b_{\text{len}} \text{len}_{ij} + \varepsilon_{ij}\]

with \(Y \in \{0,1\}\) the human acceptance label, \(\text{pos}\) the candidate’s slot, and \(\text{len}\) its output length. Coefficients depend on the score scale and coding; \(b_1\approx1\) is not a universal target. Randomized position swaps and matched, quality-preserving length changes provide stronger evidence of bias than observational associations, which may be confounded. Account for repeated items and interactions, and report uncertainty with an appropriate clustered analysis. bookkit.judge_eval.judge_regression estimates coefficients by ordinary least squares but does not itself supply those intervals.

Latent-class agreement (no gold standard). Treat an unobserved class \(Z \in \{0,1\}\) as latent, with prevalence \(\pi\); each rater \(j\) has sensitivity \(\alpha_j\) and specificity \(\beta_j\) conditional on \(Z\). A Dawid–Skene model can estimate these from a sufficiently informative rating matrix under assumptions including conditional independence of raters given the class. Shared model biases and correlated reviewers violate that assumption. Label switching also leaves class orientation ambiguous; a better-than-chance convention is an assumption, not proof of truth. latent_class_agreement illustrates the approach, but no-gold estimates require identifiability checks, sensitivity analyses, and independent anchors where available.

Variance decomposition. From repeated scores per item:

\[\sigma^2_{\text{total}} = \sigma^2_{\text{item}} + \sigma^2_{\text{noise}}, \qquad \text{ICC}_{\text{score}} = \frac{\sigma^2_{\text{item}}}{\sigma^2_{\text{item}} + \sigma^2_{\text{noise}}}\]

score_variance_decomposition estimates a simplified version from \(\{item\_id: [scores]\}\) under its assumptions. The ratio depends on item variation as well as call variation: a low value can arise from a homogeneous item set and is not a universal noise threshold. More items may improve precision for population estimates, but do not by themselves remove systematic bias.

Reading a generative-task metric: ask three questions. (1) What is the estimand — coverage, faithfulness, or something weaker the judge can actually see? (2) Which artefacts (position, length, style) could move it, and has anyone run the bias regression on this task family? (3) What is the empty baseline? If the judge cannot beat “always accept”, it is not measuring what you think.

All three helpers are pure stdlib and covered by unit tests in code/tests/test_judge_eval.py.

7.10 Calibrating judge scores and confidence; abstention

A judge’s score of 4/5 does not mean an 80% chance that a human will accept the response. The rubric score is ordinal or operational, so a probability mapping must be learned against calibration labels and validated on separate held-out labels. You can use score bins or a monotonic method such as isotonic regression, but the resulting probabilities remain specific to the labeled population, criterion, and judge version.

For binary outcomes, report the Brier score (mean squared probability error) [9], a reliability table or plot (predicted probability versus observed acceptance), and expected calibration error with its binning method. These estimates have sampling uncertainty; include intervals when the decision warrants them. ECE depends on bin choices and can hide subgroup miscalibration, so pair it with the other checks.

Define an abstention policy before deployment. For example, if the calibrated probability lies between 0.4 and 0.6, or if the judge reports missing evidence, route the case to human review. Report both:

  • Coverage: fraction of cases decided automatically;
  • Selective risk: error rate among automatically decided cases.

Abstaining on more cases can lower selective risk, but it does not guarantee improvement, so report coverage and risk together, along with escalation capacity and delay. A confidence field from the same judge is not independent evidence of reliability; validate it like any other score.

Chapter summary

The judge is one instrument in a larger evaluation system. Its usefulness depends on the evidence it receives and on how well its errors are understood:

  • Use a model judge for rubric-based qualities that are difficult to check deterministically, not as a universal truth oracle.
  • Specify criteria, evidence, score anchors, ties, missing evidence, and abstention before evaluating.
  • Use references for factual grounding only when their authority, scope, and version are clear.
  • Probe position, verbosity, style, format, language, and modality effects with controlled comparisons.
  • Compare judge and human labels on a representative, held-out set; inspect error types and slices, not only correlation.
  • For trajectories, test outcome, side effects, repetition, evidence retrieval, and state verification as distinct judge capabilities.
  • Qualify panels and fine-tuned judges independently, and preserve each judgment behind an aggregate.
  • Calibrate scores on human labels, report coverage with selective risk, and version the full judging pipeline.

For product managers. Ask: Which criteria are model-judged rather than mechanically verified? What human decisions anchor the rubric? How often does the judge falsely accept an unacceptable answer, and for whom? Which cases are routed to people? What will trigger requalification, and who owns the decision to change the judge?

Hands-on lab (Python)

The runnable lab is code/ch08/lab_judge_calibration.py, and its synthetic judgments are fixed fixtures—not live model output or human research. Reusable confusion, agreement, isotonic calibration, and abstention helpers are in code/bookkit/judge_eval.py. Run the excerpts with code and code\ch08 on Python’s module search path. The ch08 directory is a retained legacy lab identifier.

The helpers are teaching implementations, not all interchangeable with the formal methods above. In particular, the current krippendorff_alpha helper does not implement the coincidence weighting and finite-sample expectation described in §5.4.2, and the brier_decomposition helper should not be used to establish the decomposition above without independent verification. Use a validated implementation for those calculations. The selective helper abstains at its boundaries and returns zero accuracy when no cases are decided; report that accuracy as undefined instead.

Generative-metric extensions (new in §5.9)

First, explore three synthetic examples of the diagnostics introduced in §5.9. They use only the standard library and make no model calls:

from bookkit.judge_eval import (
    judge_regression,
    latent_class_agreement,
    score_variance_decomposition,
)

# 1. Judge-bias regression: b1 tracks human truth; b_position exposes a
#    first-position bonus.
bias = judge_regression(
    scores=[1, 0, 1, 0, 2, 0, 2, 0],
    acceptances=[True, False, True, False, True, False, True, False],
    positions=[0, 0, 0, 0, 1, 1, 1, 1],
)
print("b1:", round(bias["b1"], 3), "b_position:", round(bias["b_position"], 3))

# 2. Score variance decomposition: how much is item signal vs. judge noise?
vd = score_variance_decomposition({
    0: [0.9, 1.0, 0.95], 1: [0.1, 0.0, 0.05]
})
print("icc:", round(vd["icc"], 3))

# 3. Latent-class agreement (no gold standard): human as rater 0.
truth = [True, False, True, True, False, False, True, False]
lc = latent_class_agreement([
    truth[:],
    truth[:],
    [True, False, True, False, False, False, True, True],
])
print("latent prevalence:", round(lc["prevalence"], 3),
      "posterior agreement:", round(lc["posterior_agreement"], 3))
b1: 1.5 b_position: 0.5
icc: 0.992
latent prevalence: 0.5 posterior agreement: 0.911

The fixture gives accepted items a score of 1 in slot 0 and 2 in slot 1, and rejected items a score of 0 in both. Least squares averages those two accepted-item effects, so \(\hat b_1 = 1.5\) (accepted items score 1.5 higher than rejected ones on average) and \(\hat b_{\text{pos}} = 0.5\) (items in slot 1 score 0.5 higher on average). The position coefficient is a regression estimate, not the fixture’s raw +1 bonus, because the bonus applies only to accepted items. A judge with no bias would return \(\hat b_{\text{pos}} \approx 0\). The variance decomposition gives ICC \(= 0.992\) because the two items are far apart with almost no judge noise. Latent-class EM estimates a prevalence of 0.5 and a posterior agreement of 0.911 for the first rater when two raters match the fixture’s constructed labels exactly and the third differs on two items. These values demonstrate the calculation, not a validated estimate of real rater accuracy; the sample is tiny and the labels are synthetic.

First compare a mock pointwise judge with an adjudicated teaching set. The data are split into calibration and held-out rows. The judge score is treated as an ordinal input, not a probability:

from bookkit.judge_eval import cohen_kappa, confusion_matrix, fit_isotonic, predict_isotonic
from judge_fixtures import ROWS

rows = ROWS

calibration = [row for row in rows if row["split"] == "calibration"]
validation = [row for row in rows if row["split"] == "validation"]
curve = fit_isotonic(
    [row["judge_score"] / 5 for row in calibration],
    [row["human_accept"] for row in calibration],
)
probabilities = [
    predict_isotonic(curve, row["judge_score"] / 5) for row in validation
]
print(f"calibration examples: {len(calibration)}; held-out examples: {len(validation)}")
calibration examples: 8; held-out examples: 8

On the held-out examples, compare decisions from a raw-score threshold with decisions from calibrated probabilities. Read the confusion matrix and kappa alongside the slice composition; neither is a universal certification:

human = [row["human_accept"] for row in validation]
predicted = [row["judge_score"] >= 4 for row in validation]
print(confusion_matrix(human, predicted))
print("raw agreement:", f"{sum(a == b for a, b in zip(human, predicted))/len(human):.2f}")
print("Cohen's kappa:", f"{cohen_kappa(human, predicted):.2f}")
{'tp': 3, 'fp': 1, 'fn': 1, 'tn': 3}
raw agreement: 0.75
Cohen's kappa: 0.50

Kappa discounts agreement expected from the label marginals, so it need not equal raw agreement. Next inspect calibration and an abstention band. This tiny mock dataset is for demonstrating calculations; eight held-out cases are far too few to set a production threshold.

from bookkit.judge_eval import brier_score, selective_metrics

print("held-out Brier:", f"{brier_score(probabilities, human):.3f}")
print(selective_metrics(probabilities, human, low=0.4, high=0.6))
held-out Brier: 0.219
{'coverage': 0.625, 'selective_accuracy': 0.8, 'abstained': 3}

Only five of eight cases were decided automatically, and one of those was wrong. A production report would add uncertainty intervals, error-cost analysis, and adequate counts by slice.

Worked example: selective abstention with an explicit risk gate

Suppose the judge estimates the probability that a response is acceptable. On four independent mock cases, the probabilities are \([0.95, 0.80, 0.50, 0.20]\), and the adjudicated labels are \([1,0,0,0]\). With an automatic-accept threshold of \(0.60\) and an automatic-reject threshold of \(0.40\), scores strictly between the thresholds are escalated. The boundary cases at exactly \(0.40\) or \(0.60\) would be decided automatically; none occurs here.

Without abstention, thresholding at \(0.50\) and accepting ties gives two errors in four cases, for risk \(2/4=0.50\). With the abstention band, three of four cases are decided automatically, so coverage is \(3/4=0.75\). One of those three decisions is wrong, giving selective risk \(1/3\approx0.333\); the \(0.50\) case is escalated. If the release requirement is selective risk at most \(0.20\), this mock result fails the gate even though abstention reduces observed risk.

probabilities = [0.95, 0.80, 0.50, 0.20]
labels = [1, 0, 0, 0]
low, high = 0.40, 0.60

decided = [
    (probability >= high or probability <= low)
    for probability in probabilities
]
errors = sum(
    decided_case
    and ((probability >= high) != bool(label))
    for probability, label, decided_case
    in zip(probabilities, labels, decided)
)
coverage = sum(decided) / len(labels)
selective_risk = errors / sum(decided)
baseline_errors = sum(
    (probability >= 0.50) != bool(label)
    for probability, label in zip(probabilities, labels)
)
print(f"coverage: {sum(decided)}/{len(labels)} = {coverage:.2f}")
print(f"selective risk: {errors}/{sum(decided)} = {selective_risk:.3f}")
print(f"risk without abstention: {baseline_errors}/{len(labels)} = {baseline_errors/len(labels):.2f}")
print(f"meets 0.20 risk gate: {selective_risk <= 0.20}")
coverage: 3/4 = 0.75
selective risk: 1/3 = 0.333
risk without abstention: 2/4 = 0.50
meets 0.20 risk gate: False

The denominator for selective risk is automatically decided cases, while the coverage denominator is all four cases. These tiny, constructed counts have substantial uncertainty and do not establish calibration or a production threshold. The supported decision is to withhold automatic release under the stated risk gate, gather a larger representative validation set, and assess whether a wider escalation band can meet the risk target at an operationally acceptable coverage.

Finally, test pair-order sensitivity by scoring the same named responses in both orders. The mock intentionally favors the first position when the underlying quality difference is small:

from bookkit.judge_eval import pair_order_consistency

print(pair_order_consistency(
    [(0.9, 0.3), (0.8, 0.4), (0.55, 0.5), (0.6, 0.6)],
    first_position_bonus=0.25,
    tie_tolerance=0.05,
))
{'pairs': 4, 'consistent_after_swap': 2, 'consistency': 0.5}

The output is a diagnostic of this mock judge and comparison set, not an estimate of real-model bias. In the full calibration script, the modality slice has only two correct decisions out of four, while the other two slices look perfect on two examples each. Although the groups are tiny, they illustrate why an overall agreement rate can hide the need for more multimodal evidence.

The framework adapter script runs the same fixed held-out fixture judgments through a custom Inspect AI scorer and a custom DeepEval metric. It makes no provider calls; its purpose is to show where judge outputs and reference labels enter each evaluation framework:

import os
import subprocess
import sys

env = os.environ.copy()
env["PYTHONUTF8"] = "1"  # Rich output on Windows
subprocess.run(
    [sys.executable, r"code\ch08\lab_framework_adapters.py"],
    check=True,
    env=env,
)
Inspect agreement {'mean': 0.75}
Inspect judge_accept {'mean': 0.5}
DeepEval held-out agreement: 6/8

Inspect AI runs the fixture scorer through a task; DeepEval runs a custom metric against the same eight held-out labels. These numbers reflect the small synthetic fixtures only. To plug in a provider-backed judge, keep the prompt/rubric, response schema, model version, and parsing logic explicit. Compare each integration with the same held-out examples and expected decisions. Do not send sensitive evaluation data to a provider without an approved data-handling path.

Exercises

The exercises move from selecting a measurement to testing whether its errors are acceptable for a decision.

  1. (Conceptual) For a support agent, separate one outcome that should be checked deterministically from two qualities that might need a rubric judge.
  2. (Conceptual) A judge matches reviewers on 90% of a set where 95% of responses are acceptable. What additional results would you request before relying on it?
  3. (Hands-on) Add response-length metadata to the lab and create a matched paraphrase pair. Test whether the mock judge changes its score when only verbosity changes.
  4. (Hands-on) Add a stale policy reference and a contradictory reference. Specify how the judge should identify scope conflict and when it must abstain.
  5. (Hands-on) Add a second judge with errors that overlap the first. Compare majority vote with a disagreement-to-human cascade by accuracy, coverage, and number of escalations.
  6. (Discussion) A model judge reduces annotation cost by 80% but misses a small slice of multilingual safety failures. Propose a release and monitoring policy that makes the residual risk visible.

Further reading

These sources provide further background on model-judge validation, agreement, and probabilistic calibration:

  • Zheng et al., Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena: judge-human comparisons and known biases [1].
  • Liu et al., G-Eval: rubric-guided evaluation for natural-language generation [2].
  • Liu et al., Calibrating LLM-Based Evaluator: calibration approaches for model evaluators [10].
  • Shi et al., Judging the Judges: systematic study of position bias [4].
  • Chen et al., MLLM-as-a-Judge: multimodal judge benchmarks across scoring, comparison, and ranking [3].
  • Kim et al., Prometheus: rubric-based, fine-grained model evaluation [6].
  • Cohen on nominal-scale agreement and Brier on probabilistic forecasts [5], [9].
[1]
L. Zheng et al., “Judging LLM-as-a-judge with MT-bench and chatbot arena,” in Advances in neural information processing systems, 2023. Available: https://proceedings.neurips.cc/paper_files/paper/2023/hash/91f18a1287b398d378ef22505bf41832-Abstract-Datasets_and_Benchmarks.html
[2]
Y. Liu, D. Iter, Y. Xu, S. Wang, R. Xu, and C. Zhu, “G-Eval: NLG evaluation using GPT-4 with better human alignment,” in Proceedings of the 2023 conference on empirical methods in natural language processing, Association for Computational Linguistics, 2023, pp. 2511–2522. doi: 10.18653/v1/2023.emnlp-main.153.
[3]
D. Chen et al., “MLLM-as-a-judge: Assessing multimodal LLM-as-a-judge with vision-language benchmark,” arXiv preprint arXiv:2402.04788, 2024, Available: https://arxiv.org/abs/2402.04788
[4]
L. Shi, C. Ma, W. Liang, X. Diao, W. Ma, and S. Vosoughi, “Judging the judges: A systematic study of position bias in LLM-as-a-judge,” in Proceedings of the 14th international joint conference on natural language processing and the 4th conference of the asia-pacific chapter of the association for computational linguistics, The Asian Federation of Natural Language Processing; the Association for Computational Linguistics, 2025, pp. 292–314. doi: 10.18653/v1/2025.ijcnlp-long.18.
[5]
J. Cohen, “A coefficient of agreement for nominal scales,” Educational and Psychological Measurement, vol. 20, no. 1, pp. 37–46, 1960, doi: 10.1177/001316446002000104.
[6]
S. Kim et al., “Prometheus: Inducing fine-grained evaluation capability in language models.” 2024. Available: https://arxiv.org/abs/2310.08491
[7]
X. H. Lù et al., “AgentRewardBench: Evaluating automatic evaluations of web agent trajectories.” 2025. Available: https://arxiv.org/abs/2504.08942
[8]
W. Shi et al., “AJ-Bench: Benchmarking agent-as-a-judge for environment-aware evaluation,” in Findings of the association for computational linguistics: ACL 2026, 2026, pp. 25371–25413. Available: https://aclanthology.org/2026.findings-acl.1269/
[9]
G. W. Brier, “Verification of forecasts expressed in terms of probability,” Monthly Weather Review, vol. 78, no. 1, pp. 1–3, 1950, doi: 10.1175/1520-0493(1950)078<0001:VOFEIT>2.0.CO;2.
[10]
Y. Liu et al., “Calibrating LLM-based evaluator,” in Proceedings of the 2024 joint international conference on computational linguistics, language resources and evaluation, ELRA; ICCL, 2024, pp. 2638–2656. Available: https://aclanthology.org/2024.lrec-main.237/