A hallucination is fluent but false content—cited papers that do not exist, wrong API names, invented refund policies.
Causes
- Parametric memory confabulation
- Weak or missing retrieval
- Pressure to always answer
Mitigations
- RAG with citations and INSUFFICIENT_CONTEXT exits
- Tool use: calculator, SQL, web search with verification
- Lower temperature for factual tasks
- Human-in-the-loop for high stakes
Evaluation
Track grounded answer rate on a labeled set; separate "style" quality from "fact" quality.
Important interview questions and answers
- Q: Can temperature zero eliminate hallucinations?
A: No—it reduces randomness but not wrong facts from bad context.
Self-check
- Define hallucination.
- Name two mitigations.
Pitfall: Forcing an answer on every query—explicit refusal reduces harm.
Interview prep
- Hallucination?
Fluent false statement not supported by sources or tools.
- Mitigations?
RAG with citations, tools, refusals, human review for high stakes.