Overnight, the hallucination rate on our customer's support bot spiked. Walk me through how you debug it.
Answer it out loud first, then compare. That's what makes it stick.
First I confirm the signal: is the hallucination metric real, or did the grader, sampling or logging change? Then I find the exact onset and line it up with deploys, a model or prompt change, retrieval index updates and the customer's data. I slice by intent and document source, read a few dozen failing traces to find the first thing that went wrong, usually retrieval returning nothing useful, and mitigate fast with a rollback or a safer fallback before fixing the root cause.
- Confirm the signal is real
- Find onset; list what changed
- Slice by intent, source, segment
- Read traces: retrieval or generation?
- Mitigate first, then root-cause and add a test
A hallucination spike is rarely the model suddenly 'getting worse'. Treat it as a change-detection problem.
1. Confirm the signal
- Which eval raised the alert: an LLM judge, user thumbs-down, or a citation check? Re-score last week's traffic with the current grader. If old traffic also scores worse, the instrument moved.
- Check sample size and confidence. A jump on 30 conversations can be noise.
2. Find the onset and list changes
- Plot the metric hourly, not daily. A step change points at a deploy or data change; a slow ramp points at drift or traffic mix.
- Suspects: prompt or code deploy, model alias or version change, retrieval index rebuild or failed ingestion, a customer policy document that was updated or deleted, a new tool or API error shape.
3. Slice
- By intent, language, channel, customer tenant and document source. A spike concentrated in one tenant usually means their data; spread evenly usually means model or prompt.
4. Split the pipeline
- For 30-50 bad traces, ask: did retrieval return the right passage? If no, it is a retrieval bug (empty results, stale index, permission filter dropping documents) and the model is just filling the gap. If yes and the answer still contradicts it, it is a generation or prompt problem.
5. Mitigate before you perfect
- Roll back the last change, pin the previous model version, raise the retrieval threshold so the bot says 'I'm not sure, here is a human' instead of guessing, or route the affected intent to agents.
6. Close the loop
- Add the failing cases to the regression set, add an alert on retrieval-empty rate and citation-coverage as leading indicators, and tell the customer what happened with before/after numbers.
Numbers to cite: hourly granularity, 30-50 traces per slice, and the retrieval-empty rate as the cheapest early warning.
- The retrieval looks fine and the model still invents answers. What next?
- How do you decide between rollback and a forward fix at 2am?
- Which leading indicator would have caught this before customers did?
- Incident response interview bank (production) (prep, unknown) An incident-response question bank that opens with a hallucination spike overnight and starts by confirming the signal.
- Production troubleshooting and debugging cheat sheet for ML, GenAI, RAG, agentic AI (prep, unknown) A troubleshooting checklist for GenAI and RAG systems covering retrieval versus generation faults.
- Inside the LLM Call: GenAI Observability with OpenTelemetry (docs, 2026) Shows the per-call traces and attributes you need to separate retrieval from generation when debugging.