By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
On a Tuesday, 30 conversations reach the Helio Assist escalation queue with one complaint: the assistant said a final-sale item could be returned. The on-call engineer opens the prompt file and starts adding rules. Two hours later the prompt mentions final sale in four places. The complaints continue.
The trace tells a different story. Retrieval returned a passage from the 2024 policy library, and the assistant quoted it accurately. The prompt was doing its job. The cause was a stale index, and a prompt patch could not fix it.
| Cause | What the trace shows | Cheapest test | Typical fix |
|---|---|---|---|
| Prompt failure | Right passage retrieved, wrong rule applied or instruction ignored | Replay the same passage with a revised instruction | Tighten the instruction or add one graded example |
| Retrieval failure | No passage, or a passage that does not contain the policy | Check recall on the same question set | Fix the index, filter, chunking or query |
| Hallucination | A specific claim with no supporting passage | Citation support check | Require citations and abstain when unsupported |
| Data problem | Passage is stale, wrong, or contradicts another source | Compare source document versions | Fix the source of truth, then reindex |
| Model mismatch | Passage and prompt are right; the model still fails the pattern | Run the same prompt on a stronger model tier | Change tier or split the task |
The order matters. Each cause carries a different cost, and the cheapest cause that explains the evidence is the one to test first. That is the same rule an architect applies to design: satisfy the constraint with the least expensive change.
A trace is the record of one request: what went in, what was retrieved, what the model was told, and what it returned. Without a trace you are guessing from the complaint text. With one, you can name a cause in minutes.
{
"trace_id": "c-88213",
"prompt_version": "v3.2",
"model": "claude-tier-b",
"question": "Can I return the jacket I bought on final sale?",
"retrieved": [
{"doc_id": "policy-returns-2024", "version": "2024-08", "score": 0.81},
{"doc_id": "policy-final-sale-2026", "version": "2026-02", "score": 0.42}
],
"tool_calls": [{"name": "get_order", "status": "ok"}],
"answer": "Final-sale items can be returned within 30 days.",
"claims": [{"text": "within 30 days", "cited": "policy-returns-2024"}],
"graded": {"eligibility_match": false, "severity": "high"}
}If your traces lack retrieval ids or a prompt version, fix that before you fix the model. You cannot diagnose what you did not record, and a review will ask for the record.
Measure them separately. A single hallucination rate blends three problems that three different teams own.
Model mismatch means the model cannot do the task at the chosen tier, however the prompt is worded. The tell is a pattern: the same failure repeats across paraphrases, the right passage is present, and a stronger tier passes the same cases. The fix is a tier change or a task split.
A graded example carries a label, a severity and a reason. Severity matters more than a pass rate: a wrong shipping estimate is a nuisance, an unauthorised refund is an incident. Sort the failing examples by severity before you plan the fix.
Attach two or three real examples to every claim you make in a review. A reviewer who can read the trace and the label will accept the diagnosis. A reviewer who sees only a percentage will ask for another round of analysis.
Trace A retrieved the current passage and skipped its exception clause. Trace B retrieved nothing above the threshold and invented a 14-day window. Trace C ranked the 2024 passage first and quoted it accurately. For each trace, name the cause, the cheapest test and the fix you would propose. Then say which one you fix first, and how severity decides the order.
Definition of done: three named causes, three tests, and one prioritisation sentence that mentions severity.
Key takeaways
The same wrong answer can come from prompt, retrieval, hallucination, data or model mismatch.
Read the trace first: retrieved ids, versions, cited passages, prompt version and model.
Test the cheapest cause that explains the evidence before changing anything expensive.
Split hallucination into fabrication, misgrounding and stale fact, each with a different owner.
Model mismatch repeats across paraphrases and disappears on a stronger tier.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.