Skip to main content
PreparationZone Logo
PrepZone

Handle Hallucinations in LLM Applications

Why fluent answers can be false, and how RAG, citations, decoding, judges, and tools reduce the damage.

Pass checkpoint below

Why this matters

  • PolicyDesk once added a carry-forward rule that was fluent, specific, and absent from the handbook. Users trusted it because it sounded like the rest of the answer.
  • This is the failure mode RAG exists to reduce, and the failure mode RAG still produces when retrieval or the prompt is weak.
  • Interviewers want causes and a layered mitigation, not the slogan "use RAG."
  • Different mitigations trade different things: creativity, latency, or operational complexity.

What counts

The model generated a claim that is factually wrong or that the provided context does not support. That includes invented numbers, fake document titles, events that did not happen, and API parameters that do not exist. It also includes a true fact the model was not allowed to use, if your product's contract is "only the handbook." For PolicyDesk, an accurate national default that is not Northline's rule is still a product failure.

The model is predicting a likely continuation. It is not checking a database unless you built the check. Ambiguous questions ("what about leave?") and empty retrieval make invention more likely, because a complete sentence is an easier pattern than a refusal.

How to recognize one

  • It is fluent. Grammar is not evidence.
  • It often appears when the prompt has no relevant chunk, or when the chunk is related but does not contain the number.
  • It is more common on open-ended and long answers, where the model has more room to continue past the evidence.
  • Citations can be hallucinated too: a real-looking title and page that were not in the retrieval set.

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 3 sections

  • What to do about it
  • The path inside PolicyDesk
  • What each approach costs

Test yourself

Answer these before moving on — recall is what makes it stick.