Hallucination in LLMs: why it happens and how to reduce it

A language model is, at its core, a machine for guessing the most likely continuation of text — not a fact engine. When the exact answer is not in its training knowledge, instead of saying "I don’t know" it produces the most plausible shape of a correct answer; sometimes that output is an invented citation with a convincing author name.
Three modern defense layers: first, RAG — instead of relying on memory, real documents are retrieved and given to the model to ground its answer. Second, reasoning models that build a chain of thought before answering and fall back to fast guessing less often. Third, requiring a checkable citation for every claim.
But the most important layer is the user: ask the model to be explicit about uncertainty, review answers containing statistics and references, and for high-stakes decisions cross-check against the primary source. Hallucination never reaches zero — it becomes manageable.