Skip to content

Auditing the judge

What is measured

For binary verdicts (pass or fail, correct or incorrect, safe or unsafe):

Quantity Definition Meaning
Sensitivity P(judge passes | truly passing) How rarely the judge rejects good answers
Specificity P(judge fails | truly failing) How rarely the judge accepts bad answers
Youden's index sensitivity + specificity - 1 0 for a coin flip, 1 for a perfect judge

A judge with high agreement can still be badly biased: if 90 % of answers are correct, a judge that passes everything agrees 90 % of the time and has a specificity of zero.

Building an audit

audit = vc.JudgeAudit.from_labels(human_labels, judge_labels)
audit = vc.JudgeAudit.from_counts(
    true_positive=190, false_negative=10, true_negative=160, false_positive=40
)

If audited answers come in groups (several answers per prompt), pass clusters=prompt_ids to from_labels; the variances then become cluster-robust.

Which answers to audit

Sensitivity and specificity are conditional on the true label, so the audit can be any random sample of answers from the same population as the evaluation, for example from the same model and benchmark. If the judge is used for several models, audit answers from each model or check consistency (below).

Planning the audit size

vc.audit_size(target_half_width=0.03, true_rate=0.7, sensitivity=0.9, specificity=0.8, n_items=5000)

returns the number of human labels that gives a margin of error of three percentage points for the corrected rate. vc.corrected_std_error gives the standard error for a given audit size, and vc.naive_bias shows how far the uncorrected rate is off.

Random or balanced?

The corrected rate depends on the sensitivity with weight \(\theta^2\) and on the specificity with weight \((1-\theta)^2\). A random audit already allocates labels roughly in this proportion, so a balanced audit (half passing, half failing) is usually less efficient.

Does the judge favour one model?

The correction assumes the judge's error rates are the same for every model it scores. Test this with one audit per model:

audits = vc.audit_by_group(human_labels, judge_labels, model_names)
print(vc.judge_consistency(audits))

A significant result means that each model needs its own audit and its own correction. A non-significant result with small audits is weak evidence of equality.