Hallucination: Definition and Examples
A hallucination refers to a response generated by an AI model that appears plausible and is stated with confidence, but is factually incorrect, invented, or has no basis in the training data.
Full definition
In artificial intelligence, a hallucination occurs when a language model generates information that does not exist, is factually incorrect, or does not correspond to any reliable source. The term is borrowed from psychiatry, where it denotes a perception without a real object. In the AI context, it describes the tendency of models to 'invent' facts with an appearance of certainty.
Hallucinations arise because language models (LLMs) operate by statistical prediction of the next word. They do not 'know' in the human sense: they generate probable text based on learned patterns. When the model lacks information on a topic or the question is ambiguous, it may produce a response that is linguistically coherent but factually wrong — invented citations, fictitious statistics, events that never occurred.
The main danger of hallucinations lies in their appearance of credibility. Unlike a search engine that displays 'no results,' an LLM will almost always produce a response, even when it should admit ignorance. This can lead to the spread of misinformation, especially when the user does not verify sources.
Several techniques can reduce hallucinations: Retrieval-Augmented Generation (RAG) which anchors responses in verified documents, prompting with source requests, lowering generation temperature, or explicit instructions asking the model to say 'I don't know' rather than invent. Understanding this phenomenon is a central challenge of modern prompt engineering.
Etymology
The term 'hallucination' is borrowed from medical and psychiatric vocabulary, where it refers to a sensory perception without an actual external stimulus (from Latin hallucinari, 'to wander in mind'). Its adoption in AI dates to the early 2020s with the rise of large language models, to describe by analogy the generation of content without grounding in reality.
Concrete examples
Asking for bibliographic references from an LLM
List 3 scientific studies published after 2020 on the impact of sleep on memory. IMPORTANT: only cite real studies with their DOIs. If you are not certain that a reference exists, clearly indicate it.
Verifying historical facts generated by AI
What is the exact date of the signing of the Treaty of Westphalia? Only answer if you are certain of the date. If you have any doubt, say so.
Reducing hallucinations with provided context (RAG)
Based ONLY on the document below, answer the question. If the answer is not found in the document, respond 'Information not available in the provided document.'
[Document: ...]
Question: What is the company's 2024 revenue?
Practical usage
In prompt engineering, combating hallucinations involves explicit instructions: ask the model to cite sources, indicate its level of certainty, or respond 'I don't know' when information is lacking. Providing relevant context directly in the prompt (RAG technique) and lowering the generation temperature are also effective levers for obtaining more reliable responses.
Related concepts
FAQ
Why do AI models hallucinate?
How can I detect a hallucination in an AI response?
Can hallucinations be completely eliminated?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- Replace the bracketed variables with your details, then refine the result.
About Prompt Guide
Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.
More definitions
Human In The Loop: Definition and Examples
Approach where a human actively intervenes in the decision-making process of an artificial intelligence system, supervising, validating, or correcting its outputs before they are applied.
Human On The Loop: Definition and Examples
A supervision approach where a human monitors and can intervene in the actions of an autonomous AI system, without validating each decision individually.
Inference: Definition and Examples
Inference refers to the process by which an AI model generates a response or prediction from a given input, leveraging the knowledge acquired during its training.
Jailbreak: Definition and Examples
Technique aimed at bypassing the guardrails and security restrictions of a generative AI model to make it produce content that is normally prohibited
Long Context Model: Definition and Examples
A Long Context Model is a language model capable of processing and reasoning over very large amounts of text in a single interaction, with a window...
MCP Model Context Protocol: Definition and Examples
The Model Context Protocol (MCP) is an open standard that allows AI models to connect to external data sources, tools, and services.
Get new prompts every week
Join our newsletter.