Judge Calibration and Meta-Evaluation › Thresholds and Decision Rules
Language AI HandbookAll chapters The toy uses fixed illustrative thresholds on a held-out half. The calibration split fits vote weights. In deployment set thresholds from downstream costs and a development split, then lock them before inspecting the test set.
- Agreement floor: minimum (or Krippendorff's ) below which the judge is not trusted for the current task.
- Bias ceilings. Use limits for paired position, length association, and Model B affinity.
- Coverage floor. Include the share with decisive outputs so a screen cannot improve by dropping too many comparisons.
For agreement, "correct" thresholds come from downstream cost: if a mis-judgment produces a user-visible error, set the floor based on the base rate of errors the product tolerates. For our synthetic example we choose illustrative values but emphasize that real thresholds should be set with respect to the decision they feed.
The screen first checks that all five required statistics are available and finite. An undefined statistic yields insufficient evidence. If all are finite, it reports every threshold that was missed.
PythonIn [22]Expand
THRESHOLDS = {
"coverage_min": 0.85,
"kappa_min": 0.35,
"position_bias_max": 0.10,
"length_pref_rho_max": 0.20,
"source_affinity_max": 0.08,
}
def decide(metrics):
required = (
"coverage",
"kappa",
"position_bias",
"length_pref_rho",
"source_affinity",
)
if any(m not in metrics or not np.isfinite(metrics[m]) for m in required):
return "insufficient evidence"
failures = [
label
for label, fails in (
("coverage", metrics["coverage"] < THRESHOLDS["coverage_min"]),
("agreement", metrics["kappa"] < THRESHOLDS["kappa_min"]),
(
"position",
abs(metrics["position_bias"]) > THRESHOLDS["position_bias_max"],
),
(
"length",
abs(metrics["length_pref_rho"])
> THRESHOLDS["length_pref_rho_max"],
),
(
"source",
abs(metrics["source_affinity"])
> THRESHOLDS["source_affinity_max"],
),
)
if fails
]
return (
"review: " + ", ".join(failures)
if failures
else "accept fixture screen"
)
holdout = fixture.loc[test_mask]
results = []
for name, col in (
("A", "judge_A"),
("B", "judge_B"),
("C", "judge_C"),
("majority", "ensemble_vote"),
("weighted", "weighted_vote"),
):
metrics = {
"coverage": float(holdout[col].notna().mean()),
"kappa": cohen_kappa(holdout["ref_majority"], holdout[col]),
"position_bias": position_bias(holdout, col),
"length_pref_rho": length_pref_correlation(holdout, col),
"source_affinity": source_affinity(holdout, col, "model_b"),
}
results.append({"judge": name, **metrics, "decision": decide(metrics)})
threshold_df = pd.DataFrame(results)ConsoleOut [23]Expand
judge coverage kappa position_bias length_pref_rho source_affinity decision
A 0.957 0.596 0.000 0.098 0.066 accept fixture screen
B 0.947 0.520 0.150 0.084 0.032 review: position
C 0.977 0.378 0.000 0.585 0.269 review: length, source
majority 0.980 0.571 0.039 0.186 0.126 review: source
weighted 1.000 0.573 0.053 0.160 0.112 review: sourceThe screen reports failed metrics and distinguishes an undefined required statistic from a pass. An acceptance qualifies only the stated fixture screen.
When a judge supplies confidence estimates, test whether they predict errors on data separate from the data used to select a referral threshold. A referral policy can send uncertain cases to a person or another judge. Report its held-out acceptance rate. This fixture does not implement confidence-based referral.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!