Refract 2×2 Matrix: Detect vs Complete Explained
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.
When the same probes are scored before and after a prompt change, McNemar's test tells you whether the change is real or just noise from paired disagreements.
Refract runs the same canary and benign pack against baseline and candidate targets. Paired verdicts remove between-probe variability and isolate what the prompt or filter edit changed.
Use McNemar when one cell, usually silent breaches or false positives, moves in opposite directions across the two runs. It tests whether the disagreement pattern is statistically meaningful.
refract diff pairs the two runs probe by probe and reports the exact McNemar p-value automatically; there is no extra flag.
refract diff --baseline scan-a1b2c3d4 --candidate scan-z9y8x7w6 --db ./runs.sqlite
McNemar answers whether a change is significant; Wilson intervals show the plausible range of the new rate. Report both before shipping.
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 Refract uses Wilson 95% confidence intervals to keep small AI safety samples honest and how to read catch-rate and false-positive bounds.
How to gate AI releases with refract gate thresholds for silent breaches, false-positive rate, and MCC, plus a minimal GitHub Actions workflow.