Skip to main content
AI Interview Question
All Questions
DEEP EXPLANATION

Types of LLM Hallucinations & Why RAG Isn't Enough (EXPLAINED)

Scenario BasedLLMsHard25 min read

Part 2 of the LLM hallucination handbook — factual, citation, reasoning, math, code, temporal, context, and tool-use hallucinations; decoding risks; RAG failure modes; production case study.

Types of LLM Hallucinations & Why RAG Isn't Enough
LLMs · Hallucinations

TL;DR — Quick Answer

Hallucinations take many forms — factual, citation, reasoning, mathematical, code, temporal, context, and tool-use — each needing different mitigations. They stem from next-token prediction, imperfect training data, missing context, and decoding strategies. Lower temperature reduces randomness but not factual error. RAG helps but fails with bad chunking, weak retrieval, missing docs, or models that ignore context. Production systems need layered defenses: retrieval quality, prompts, citations, guardrails, eval, and human review.

The Interview Question

Classify the main types of LLM hallucinations and explain their root causes. How do temperature and sampling affect hallucination risk, and why doesn't RAG completely eliminate hallucinations in production?

Deep Explanation

Sign in to unlock full answer

Get deep explanations, PDF export & all LLMs questions

  • 35 more sections of deep explanation
  • Architecture diagram
  • Real-world examples
  • Common mistakes
  • Interviewer expectations
  • Follow-up questions
HallucinationLLMsRAGTemperatureCitationProductionEvaluationOpenAIGoogleMetaAnthropicMicrosoftAmazon