Why AI Hallucinates and How to Use It Safely
In 2023, two New York lawyers filed a court brief that cited earlier cases to support their argument. Six of those cases did not exist. ChatGPT had produced them, with realistic names and quotations, and the judge fined the lawyers and their firm $5,000. To understand why AI hallucinates, the key point is that nothing broke inside the model. It did exactly what it was built to do.
What a hallucination is, and why it happens
A hallucination is when an AI model states something false or made up as if it were true. The word is borrowed loosely; the model is not seeing things. It is producing plausible text without any check against reality.
As you saw in What Is an LLM?, the model is trained to produce likely-sounding text, one token at a time. Nothing in that loop looks up a source of verified facts. For common facts, "likely" and "true" usually overlap, because the truth appeared many times in its training text. For rare facts, they come apart: the model still writes the most likely-sounding answer, and that answer can be wrong.
Training can also reward guessing. In 2025, researchers at OpenAI argued that common ways of training and scoring models favour a confident guess over "I don't know", much like an exam where a blank scores zero but a guess might earn a mark. That is the quiz-show contestant again.
Where hallucinations are most likely
Some kinds of question are far riskier than others. Obscure facts come first: a small company, a local event or a little-known person has little training text behind it, so the model has weak patterns to draw on.
Exact numbers, dates and quotations are next. "Roughly right" is not right for these, and the model reproduces their shape well: a plausible year, a sentence that sounds like a quote.
Links, citations and book references are a classic trap. The model knows exactly what a reference looks like, with an author, a year, a title and a web address, so it can assemble a convincing one that leads nowhere.
Recent events after the model's knowledge cutoff are another, as are details that fell out of a long chat's context window. Finally, watch for false-premise questions. Ask "Why did Einstein win the Nobel Prize for relativity?" and a model may explain, when in fact his 1921 prize was mainly for explaining the photoelectric effect.
When confident text causes real harm
The court case above is one example. The invented cases had realistic names and citations, which is exactly why a busy professional believed them.
In 2024, a Canadian tribunal ordered Air Canada to compensate a customer after the chatbot on its website described a refund rule for bereavement fares that the airline did not actually have. The airline argued it was not responsible for what its chatbot said. The tribunal disagreed.
In 2025, a summer reading list printed in some US newspapers recommended several books that do not exist, credited to real, well-known authors. The writer had used AI to help draft the list and had not checked it.
The lesson from all three: a confident tone is not evidence. Polished, fluent writing costs a language model nothing, whether the content is true or not.
How to use AI safely
Ask for sources, then check them. Open every link and confirm that the page exists and actually says what the answer claims. A reference that looks real is not proof that it is.
Give the model the facts. Paste in the document, policy or data and say "answer only from this text, and if the answer is not in it, say so". This is called grounding: tying the answer to a source you supplied, as the context part of a good brief does.
Invite uncertainty. Add "tell me if you are unsure" to your prompt. It helps, but a model's sense of its own certainty is imperfect, so do not rely on this alone.
Cross-check numbers by redoing the sums or comparing with a second source. And for medical, legal, financial or safety decisions, have a qualified person review the result before anyone acts on it.
Why the problem shrinks but does not vanish
Many tools now look things up before answering, by searching the web or a company's documents and placing the results in the prompt. A later section of this course explains how. Answers grounded this way are much less likely to invent facts.
They are still not guaranteed to be right. The search can return the wrong page, the source itself can be outdated or wrong, and the model can misread it or blend in its own guesses. Newer models also admit uncertainty more often, but generation is still prediction, and no setting makes the error rate zero.
That is why people stay in the loop for high-stakes work. Let the AI draft, summarise and suggest; let a person verify and own the decision.
Check yourself
Why can an LLM produce a convincing but fake citation?
It has learned what citations look like and writes a likely-looking one; nothing checks that the source exists.
Which answer needs more checking: "What is photosynthesis?" or "What did a small town's mayor say on 3 May?"
The second: it is obscure, exact and quoted, with little training text behind it, so the model is far more likely to guess.
You paste a policy and tell the model to answer only from it. Is the answer now guaranteed correct?
No. Invention becomes much less likely, but the model can still misread the text, and the policy itself may be outdated.