In this guide
An AI hallucination is an output that sounds plausible and confident but is false, invented or unsupported by the source material. Language models cause them because they generate likely text rather than retrieve checked facts. You cannot remove hallucinations entirely, but you can greatly reduce their impact by supplying source text, asking for evidence and verifying anything important.
What counts as a hallucination
The term covers several kinds of error:
- Invented facts. A date, statistic or event that never happened.
- Fake sources. Book titles, articles, court cases or web links that look real but do not exist.
- Wrong details attached to real things. A real person credited with a quote or role they never had.
- Unfaithful summaries. A summary that adds claims not in the original document.
- Made-up code or tools. Functions, settings or commands that do not exist.
The word "hallucination" is a metaphor. The model is not seeing things. It is producing fluent text that happens not to match reality.
Why language models hallucinate
A large language model is trained to predict plausible next tokens. Truth is not its direct objective. Several factors make errors more likely:
- Plausibility beats accuracy. If a fake citation fits the pattern of real citations, the model can produce it smoothly.
- Gaps in training data. For rare topics, recent events or private information, the model has little to draw on but still produces an answer.
- No built-in "I don't know". Models are often trained to be helpful, which can push them to answer instead of admitting uncertainty.
- Leading prompts. If your question assumes something false, the model may go along with it.
- Lost context. In long conversations, key details can fall outside the context window, and the model fills the gap with guesses.
- Ambiguity. A vague request invites the model to choose an interpretation and present it as fact.
High-risk situations
Take extra care when you ask for:
- Specific numbers, dates, names, quotes or references.
- Legal, medical, tax or financial guidance.
- Information about niche topics, small organisations or private individuals.
- Very recent events, unless the tool is clearly using live search.
- Long summaries of documents, where small additions are easy to miss.
How to reduce hallucinations
Provide the source
Paste the text you want the model to use and tell it to answer only from that text. Grounding the answer in supplied material is the single most effective step. At larger scale, systems do this automatically by fetching relevant documents first, as explained in what RAG is.
Give permission to say "I don't know"
Add a line such as: "If the answer is not in the text, say it is not stated. Do not guess." This does not guarantee compliance, but it helps.
Ask for evidence
Request quotes from the source, or ask the model to separate what it found in the document from what it is inferring. Then check the quotes yourself.
Be specific
Clear context, scope and format reduce guessing. The techniques in how to write good AI prompts apply directly.
Break tasks into steps
For complex questions, ask for a plan or intermediate reasoning, then review each step before moving on.
Use tools where they fit
Search, calculators and code execution can replace guessing with checking. Whether a tool is used, and how well, depends on the product, so check current documentation and review the sources the tool shows.
How to check an AI answer
Work through a short routine for anything that matters:
- Highlight each claim you would be embarrassed to get wrong.
- Search for it in a reliable primary source, such as an official website, a published paper or a regulator.
- Confirm every citation exists by opening it, not by trusting the title.
- Recalculate any figures yourself.
- When you cannot verify a claim, remove it or label it as unverified.
The full method is in how to fact-check AI answers in five steps.
Can hallucinations be fixed completely?
Not at present. Providers work to reduce them through better training, retrieval and tools, and the rate varies by model and task, but no honest source can promise zero errors. The safe approach is to design your workflow so that a human checks high-stakes output.
Building this checking habit is a core part of the practical exercises in the QAM.AI programme.
Key takeaways
- A hallucination is a confident output that is false, invented or unsupported.
- It happens because models generate plausible text, not verified facts.
- Risk rises with niche topics, exact figures, citations and long conversations.
- Supply source material, allow "I don't know" and ask for quotes you can check.
- Always verify important claims against reliable sources.
Frequently asked questions
Do all AI models hallucinate?
All current language models can, though how often depends on the model, the task and how it is used. Tasks grounded in text you provide usually produce fewer errors than open questions answered from memory.
Can I ask the AI whether its answer is correct?
You can, and it may catch some errors, but it can also confirm a wrong answer with the same confidence. Treat self-checking as a helpful extra step, not a replacement for independent verification.
Why does the AI invent references?
Citations follow a predictable pattern of authors, titles and years, so the model can produce a convincing one without any real source behind it. Always open the reference and confirm it exists and says what is claimed.
This guide is general educational information and is reviewed periodically. AI tools change quickly, so check each vendor's current documentation before relying on specific features or limits.