Quick start¶
A model is evaluated on 3000 prompts. An LLM judge marks each answer as correct or incorrect. The release bar is 80 % correct answers.
1. Audit the judge¶
Humans label a random sample of answers that the judge has also scored:
import veracle as vc
audit = vc.JudgeAudit.from_labels(human_labels, judge_labels)
print(audit.summary())
The summary shows the judge's sensitivity (how often it accepts a correct
answer) and specificity (how often it rejects a wrong one), with exact
confidence intervals. Before collecting the audit, vc.audit_size tells
you how many labels you need.
2. Correct the pass rate¶
result = vc.correct_rate(audit, judge_verdicts)
print(result.summary())
result.naive is the judge's raw pass rate; result.estimate is the
corrected rate. The interval includes the uncertainty of the audit.
If the audited answers are a random subsample of the 3000 evaluated ones,
vc.ppi_rate is usually more precise:
human = np.full(3000, np.nan)
human[audited_positions] = human_labels
result = vc.ppi_rate(judge_verdicts, human)
3. Decide¶
decision = vc.threshold_decision(result, threshold=0.80, name="model-v2")
print(decision)
The verdict is pass, fail or inconclusive. The probability of a wrong
pass (or a wrong fail) is at most 5 %.
4. Command line¶
The same analysis from counts only:
veracle correct --items 3000 --judge-pass 2460 \
--tp 190 --fn 10 --tn 160 --fp 40 --threshold 0.8