Pre-launch hallucination test program
The program has six stages. Each stage produces an output that the next stage depends on, and the final stage hands remaining risk to runtime controls.
| Stage | What it covers |
|---|---|
| 1. Define | Categories and severity ratings |
| 2. Build | Representative, out-of-scope, and adversarial test sets |
| 3. Evaluate | Human review, automated checks, grounding verification |
| 4. Gate | Thresholds tied to business impact |
| 5. Record | Audit evidence and named risk acceptance |
| 6. Hand off | Runtime controls for residual risk |
Define hallucination categories before writing test cases
Start by defining the failure categories you need to detect, and assign each one a severity rating. Write down the rule for what counts as supported, so that every reviewer and every automated check scores a response the same way.
Build representative, out-of-scope, and adversarial test sets
A single test set cannot cover every failure. Build three kinds:
- Representative: cases that reflect what the chatbot is expected to handle.
- Out-of-scope: cases that fall outside what the approved source content supports.
- Adversarial: cases written to push the chatbot toward unsupported answers.
Version each test set and record its sources, authors, and reviewers.
Match evaluation methods to what they can actually detect
Score each response against approved source content. Human review, automated checks, and grounding verification each detect different failures, so use them in combination rather than relying on one.
Calibrate any automated judge against human review before you trust its scores, and keep the judge prompts and calibration results with the rest of the test record.
Choose metrics and set launch thresholds tied to business impact
Set launch thresholds by business impact, not by a single overall score. Report results by category and severity, so that the failures with the greatest consequences are visible and are not averaged away.
Record results as audit evidence
Keep a record of the test program that a reviewer could follow end to end. It should include:
- Category definitions, severity ratings, and the rule for what counts as supported
- Test set versions, sources, authors, and reviewers
- The configuration tested: model, prompts, retrieval index, and tool versions
- Judge prompts and the results of calibration against human labels
- Results by category and severity, with failed cases and the fixes applied
- The launch decision, the named risk owner, and the residual risk accepted
Where pre-launch testing stops and runtime governance begins
Testing bounds hallucination risk but does not remove it. The residual risk accepted at launch needs controls that operate while the chatbot is in use.