What is Hallucination?

A hallucination is a confident but false or fabricated output from an LLM, an invented fact, citation, API, or tool argument that looks plausible but has no basis in the model's input or in reality.

Hallucination is the failure mode where a language model produces content that is fluent and confident yet wrong or made up. It happens because LLMs generate the most probable next token given their training, not by looking up verified facts, so when the right answer is unknown, ambiguous, or absent from the prompt, the model will often fill the gap with something that merely sounds right. Typical examples include invented citations and URLs, non-existent function names or API parameters, fabricated quotes, and made-up IDs. In agentic systems hallucination is especially dangerous because the model may invent a tool call argument, a record ID, or a shard ID that does not exist, which is why robust pipelines validate every model-supplied identifier against the set the model was actually shown and strip anything it could not have known. The leading mitigation is grounding: retrieval-augmented generation supplies real source documents to answer from, MCP servers give the model live data and actions instead of relying on memory, and structured-output validation rejects responses that do not conform. Low temperature, asking the model to cite sources or say "I don't know," and human-in-the-loop review further reduce risk. Hallucination cannot be fully eliminated, so production systems treat model output as a claim to verify, not a fact to trust.