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.
The Refract 2×2 matrix is the fastest way to see whether your AI leaks, your guardrail overblocks, or both. Each probe produces two verdicts: what the model did and what the filter allowed.
Refract pairs every adversarial probe with a benign control and records two signals. The model either leaks or completes safely; the guardrail either alerts or stays quiet. That gives four outcomes.
A 90% catch rate can look good while the guardrail blocks 20% of safe users. A low false-positive rate can hide a serious silent breach. Refract keeps the cells separate so both risks are visible.
refract matrix --scan scan-a1b2c3d4 --db ./runs.sqlite --intervals
In CI, fail the build when the matrix crosses a risk threshold.
refract gate --scan scan-a1b2c3d4 --db ./runs.sqlite --max-fn 0 --max-fp-rate 0.05 --min-mcc 0.70
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 uses McNemar's test on paired adversarial and benign verdicts to show whether a prompt or guardrail change really moved the 2×2 matrix.
How Refract detects AI silent breaches, canary leaks that a guardrail misses, using synthetic high-entropy canaries, benign controls, and SARIF 2.1.0 CI gating.