A hallucination in a chat assistant is embarrassing. A hallucination in an operations answer — an invented figure, a fabricated trend, a recommendation with no evidence behind it — ends up in a board pack. The controls that prevent it are engineering controls, not prompt tricks.
1. Why hallucination happens in analytics
Language models generate the most plausible continuation, not the most verifiable one. When the retrieved context does not contain the answer, a well-formed guess is still the most plausible continuation — so the model produces one, in the same confident register as a correct answer.
Three conditions make it far more likely: thin retrieval, ambiguous questions, and pressure to produce a specific number when the data only supports a range.
2. Ground every answer in retrieved records
Grounding is the single highest-leverage control. The model should be answering from records placed in its context, not from parametric memory about how businesses generally behave.
Retrieve before generating. Pull the relevant records for the question and pass them explicitly, with identifiers.
Say when there is nothing. An explicit ’the connected data does not cover this’ instruction, plus an empty-context path that returns exactly that.
Bound the scope. Restrict each module to the entities it is meant to reason over, so unrelated context cannot be borrowed to fill a gap.
Cap context sensibly. Overstuffed context degrades retrieval precision; relevance beats volume.
3. Enforce citations mechanically
Asking a model to cite is a suggestion. Enforcing citations is a control. Require a source marker on every factual claim, then parse the output and remove claims whose markers do not resolve to a record that was actually retrieved.
Parse, do not trust. Extract markers from the response and validate each against the retrieved set.
Strip unresolved claims. A claim citing a record that was never retrieved is removed before display, not flagged in small print.
Audit citation integrity. Track the share of claims that resolved, per module, over time. A falling ratio is an early warning.
Make evidence one click away. Users should be able to expand any claim and see the underlying rows and field paths.
4. Verify, then gate on confidence
After generation, score the answer against the evidence: how many claims resolved, how fresh the sources were, how much of the question the context covered. Turn that into a verdict — verified, partial, unverified — and route on it.
- 1
1. Score the output
Citation resolution rate, evidence freshness and coverage of the asked question.
- 2
2. Assign a verdict
Verified, partial or unverified, displayed on the answer rather than buried in a log.
- 3
3. Route weak answers
Below the module’s threshold, send it to an approval queue instead of to an automated action.
- 4
4. Never auto-execute unverified
Any downstream action — an alert, an email, a workflow — requires a verified verdict as a precondition.
5. Calibrate confidence against outcomes
A confidence score is only useful if it predicts correctness. Compare stated confidence with verified outcomes over time using calibration metrics, and tune the thresholds from that evidence rather than from intuition.
Measure calibration error. Expected calibration error and Brier score, tracked per module and per tenant.
Tune within guardrails. Cap how far thresholds can move per tuning run and block any change that regresses measured accuracy.
Watch for drift. Model updates and data shifts both decalibrate. Nightly drift checks catch it before users do.
Keep a rollback point. Always retain the last known-good threshold set.
6. Report coverage honestly
The final control is organisational. Publish which surfaces are grounded and verified and which are not, rather than implying uniform trustworthiness. Users calibrate their own scepticism accurately when they can see where the guarantees stop — and that trust is what makes the verified surfaces genuinely useful.
See grounded answers on your own data
Every claim cites the record behind it, and unverified answers never trigger automated actions.
Start Free Trial