Skip to Content

LLMs predict the next token, not the next fact. Hallucinations are confident, fluent, plausible-but-wrong outputs.

Data Flow

  prompt                  model            answer
    |                       |                 |
    |  tokens -> |LLM| ->  tokens            |
                                       "ApJ was founded 1925 by H.G. Wells"
                                                ^ fake citation,
                                                but it sounds right

Why they happen

Layered defenses

  1. RAG grounding — retrieve and quote source docs.
  2. Structured outputs — constrain to JSON / schema.
  3. Self-verification — ask the model to cite or check itself.
  4. Confidence scoring — reject low-confidence answers.
  5. Human review — the only defence where the user is the auditor.

Pitfalls

Analogy

A persuasive but forgetful storyteller who fills in plot holes with made-up details rather than admitting they don’t know.

Interview tip: “Can we eliminate hallucinations?” — honestly: no, but we can reduce blast radius and detect them.

Advertisement