Evaluation: Grounding and Hallucination Detection
Automated checks that every factual claim in an answer is supported by a cited source that actually entails it — catching both missing and misleading citations.
Measuring grounding directly
Grounding is the property that every factual claim is supported by a real, cited source. The evaluation measures it in two dimensions: coverage (does every factual claim carry a citation) and entailment (does the cited source actually support the claim). A claim with no citation, or with a citation that does not entail it, is a grounding defect — the operational definition of a hallucination in this system.
The two checks
grounding_eval(answer, trace):
claims = extract_factual_claims(answer)
coverage = mean(has_citation(c) for c in claims)
entail = mean(entails(cite(c), c) for c in claims if has_citation(c))
# entailment judged by NLI model + physics/canon rule checks
score = harmonic_mean(coverage, entail)
flag any claim where cite exists but entailment fails # worst case
return score, flagged_claims
Entailment for physical claims
Entailment for engineering prose uses a natural-language-inference model, but physical and canonical claims get a stricter, rule-based check. A claim that states a canonical number (Q_sci 3.076, 85.0 MW, 26.49 T plug) must cite the frozen canon and match it exactly; a numeric claim about a shot must match the cited twin run or record within tolerance. This prevents a plausible-but-wrong number from passing an NLI check that only sees surface similarity.
- Coverage: fraction of factual claims that carry any citation
- Entailment: fraction of cited claims the source actually supports
- Canonical-number rule check: exact match to frozen canon
- Numeric-fact tolerance check against the cited run or record
- Worst-case flagging: a wrong-citation claim is worse than an uncited one
A citation that looks authoritative but does not support its claim is more dangerous than an obviously unsupported statement, because it defeats the operator's spot-check. The harness therefore treats mis-citation as the most severe grounding defect and blocks release on any occurrence in the safety-relevant golden set. The economics prohibition is checked here too: any monetary figure or market framing in an output is an automatic failure.
Grounding scores are tracked per copilot and per task type over time, so a slow degradation from a model or embedding change is caught early. The check builds directly on the citation-grounding contract and runs inside the regression suite.