An AI hallucination is an output generated by an artificial intelligence system that presents information as though it were accurate, relevant or grounded when the information is actually false, unsupported, fabricated or inconsistent with the available evidence. The term is especially associated with generative AI and large language models.
Examples include inventing a citation that does not exist, attributing a quotation to the wrong person, producing a nonexistent software function, stating an incorrect historical fact with confidence or fabricating details about a document. “Hallucination” is an informal but widely used term rather than a precise diagnosis applicable to every AI system. The important characteristic is the discrepancy between the system's output and the evidence or reality it is supposed to represent. A fluent response can therefore be hallucinated even when its grammar, style and apparent confidence are excellent.
AI hallucinations can take different forms. Factual hallucination occurs when a statement about the world is false. Fabricated citations occur when a model supplies references, papers, URLs or quotations that appear plausible but cannot be verified. Contextual hallucination occurs when a response contradicts information supplied in the prompt or source material. Entity hallucination can involve invented people, organisations, products or events.
Numerical hallucination can involve incorrect calculations or unsupported figures, particularly when the model generates arithmetic rather than using a reliable computational tool. Code hallucination can produce APIs, parameters or libraries that do not exist. In document summarisation, a model may introduce information absent from the source. These categories can overlap, and the same underlying generation process can produce different errors depending on the task and available evidence.
Large language models generate text by predicting tokens according to patterns learned from training data and subsequent optimisation. They do not inherently possess a database-like guarantee that every generated proposition corresponds to a verified fact. During generation, the model estimates plausible continuations based on its learned representations and the immediate context. If several continuations are linguistically plausible but only one is factually correct, the model can produce an incorrect one.
Training data can also contain errors, contradictions, outdated information and fictional material. Furthermore, optimisation for helpfulness and fluent completion can make a model produce an answer rather than explicitly state that it lacks sufficient information. The resulting output may sound authoritative even though the underlying proposition has weak evidential support. This distinction between linguistic plausibility and factual verification is fundamental to understanding hallucination.
Hallucinations can arise because the requested information is absent, ambiguous or poorly represented in the model's learned information. Rare entities, obscure technical details, recent events and highly specific factual questions can be difficult because the model may have limited reliable information about them. Long contexts can introduce additional challenges if relevant evidence is overlooked or conflicting information is present.
Prompt wording can also influence generation, and a user who presupposes a false premise may inadvertently encourage the system to continue that premise. Models can additionally make reasoning errors when combining individually familiar facts into an invalid conclusion. The existence of retrieval or tool access can reduce some errors but does not guarantee correctness, because retrieved sources can themselves be wrong, incomplete or misunderstood.
Hallucination should be distinguished from ordinary uncertainty, deliberate fictional generation and ordinary mistakes. If a user asks for a fictional story and the model invents characters, those inventions are not normally considered hallucinations because fabrication is the requested task. If a model explicitly says that it is uncertain and offers several possibilities, that is different from confidently asserting an unsupported claim.
A simple calculation error may be an ordinary reasoning or arithmetic mistake, although it can also be described broadly as hallucination in informal usage. The term is particularly useful when an AI system generates plausible but unsupported content, but it should not obscure the specific failure mechanism involved. Technical evaluation benefits from describing the exact error, its evidence, its cause and its consequences rather than relying solely on the general label.
Several techniques can reduce hallucinations. Retrieval-augmented generation can supply relevant documents so that the model has source material to use when answering. Tool use can delegate calculations, database lookups, code execution or other deterministic tasks to specialised systems. Structured outputs can constrain the form of responses, while citations and source attribution can make verification easier. Fine-tuning and reinforcement-learning methods can encourage models to refuse or express uncertainty in situations where evidence is inadequate.
System prompts and application-level instructions can require models to distinguish known information from assumptions. However, none of these methods eliminates hallucination completely. Retrieval can retrieve irrelevant documents, tools can fail, and models can misinterpret correct evidence. Robust systems therefore combine model behaviour with independent validation and appropriate human review.
The consequences of hallucination depend heavily on context. An invented detail in a creative-writing application may have little practical significance, while a fabricated medical claim, legal citation, financial figure, security instruction or engineering specification can have serious consequences. High-stakes systems therefore need stronger verification than casual conversational applications. Organisations can use source-grounded workflows, confidence or uncertainty indicators where meaningful, human review, automated consistency checks, domain-specific validation and audit trails. Users should also understand that confidence expressed through wording is not a reliable probability estimate unless the system has been specifically designed and calibrated for that purpose. A polished answer should consequently be treated as generated information rather than automatically verified fact.
An AI hallucination is best understood as a generation or reasoning failure in which an AI system produces content that lacks adequate grounding or conflicts with available evidence while presenting it as an answer. It is not evidence that an AI system is consciously imagining information, and the term should not be interpreted as implying human-like perception or mental experience.
The most effective response to hallucination is not simply to demand that a model “be accurate”, but to design systems around grounding, retrieval, tool use, verification, constrained generation, uncertainty handling and human oversight appropriate to the stakes. Understanding the difference between plausibility and truth is central: generative models are optimised to produce useful outputs, but factual reliability requires additional mechanisms when correctness matters.