Wilson Score Intervals in Refract
How Refract uses Wilson 95% confidence intervals to keep small AI safety samples honest and how to read catch-rate and false-positive bounds.
Before a large scan, use refract power to estimate how many probes you need for a useful Wilson margin around the expected catch rate.
A small battery can produce a wide Wilson interval, so a passing scan may not mean much. Power analysis tells you how many canaries and benign controls to run.
For a ±4-point Wilson margin around an expected 90% catch rate, refract asks for 219 probes:
refract power --target-half-width 0.04 --p-est 0.90 --confidence 0.95
Wider target margins are cheaper but less convincing. For high-risk guardrails, plan for a narrow margin around the silent-breach and false-positive rates.
Use --budget-tokens N to stop dispatching probes once the estimated token count reaches N, so a broad battery cannot surprise your invoice.
refract scan --target anthropic:claude-opus-5-5 --battery baseline --budget-tokens 120000 --sarif refract.sarif
How Refract uses Wilson 95% confidence intervals to keep small AI safety samples honest and how to read catch-rate and false-positive bounds.
How Refract's 2×2 detect-vs-complete matrix separates AI model leaks from guardrail false alarms, and how to read TP, FP, TN, and FN in a safety-filter evaluation.
How to gate AI releases with refract gate thresholds for silent breaches, false-positive rate, and MCC, plus a minimal GitHub Actions workflow.