Developers: a 2025 USENIX Security study across 576,000 code samples found language models hallucinated 19.7% of the package names they recommended — invented libraries that don't exist. Check anything a model suggests before you install it. Full breakdown on Dev.to. Follow Paragon AI MAG.
Watch the video version: https://youtu.be/hou7ejHHscQ
Why Does AI Hallucinate?
By Paragon AI MAG — Series 7, Episode 4
ChatGPT gets factual questions wrong almost half the time — and sounds completely sure about it. Lawyers have been fined for submitting court cases it invented. An airline paid for a refund rule its chatbot made up. And nearly a billion people now lean on these systems every week.
If you use AI for anything that matters, you need to understand what is actually happening behind the screen when you hit enter.
It guesses. It does not look things up.
A chatbot does not check facts against an internal encyclopedia before it answers. It predicts the next word — token by token — based on statistical patterns in its training data. When it hits a gap, it fills it with a plausible invention, stated with total confidence.
Psychologists have a word for this: confabulation. Filling gaps in recall with plausible inventions, stated as if they were certain.
Why so confident? Because the training rewards helpful, decisive answers — and trains out admissions of uncertainty. Confidence in an AI answer is a style, not a measure of accuracy.
The scale of the gamble
In October 2026, OpenAI reported that ChatGPT had reached 900 million weekly users. A February 2026 Pew survey found that 42% of US adults now use AI chatbots specifically to search for factual information. People are treating a guessing machine like an encyclopedia.
The hard numbers
The failure rate is not one number. It changes with the task, the model, and whether the model can search the web. Here is what independent audits and the companies' own system cards show:
General trivia. On OpenAI's SimpleQA test of short factual questions, GPT-5 got 47% of its attempted answers wrong without web search. With search switched on, the claim error rate fell to 9.6% — and to 4.5% in the extended reasoning mode. Search cuts errors roughly fivefold. (OpenAI GPT-5 system card, August 2025.)
News answers. When the BBC and the European Broadcasting Union tested AI assistants on news questions in 2025, 45% of the answers had a significant issue — a wrong fact, a wrong number, or a distorted quote.
Academic citations. Walters and Wilder (2023) found GPT-3.5 invented 55% of the 222 references it generated for literature reviews. GPT-4 invented 18% of 414.
Law. A late-2023 Stanford RegLab study found GPT-4 hallucinated 58% of the time on questions about specific federal court decisions. GPT-3.5 hallucinated 69% of the time.
Health. In a 2026 BMJ Open audit of 50 consumer health questions, 52% of ChatGPT's answers were rated problematic by clinical experts. Over half.
Coding. A 2025 USENIX Security study of 576,000 code samples found that code models hallucinated 19.7% of the software packages they suggested — libraries that do not exist, which creates real supply-chain security risks.
Grounded summaries. The picture is not all bad. When GPT-4o summarises documents it can actually read, its hallucination rate drops to about 1.5% (Vectara's grounded summarisation benchmark). The model is far more reliable when it has the source in front of it than when it answers from memory alone.
Three real cases, three real price tags
Google Bard, February 2023. In its launch advert, Bard claimed the James Webb Space Telescope took the first picture of an exoplanet outside our solar system. That picture was taken in 2004 by the Very Large Telescope. Alphabet lost over $100 billion in market value in a single day.
Mata v. Avianca, June 2023. Two lawyers submitted a court brief citing six cases ChatGPT had invented, including a wholly fictitious 'Varghese v. China Southern Airlines'. Judge P. Kevin Castel fined them $5,000. One lawyer testified that he believed ChatGPT worked like a search engine that could not invent citations.
Moffatt v. Air Canada, February 2024. Passenger Jake Moffatt asked Air Canada's chatbot about bereavement travel. It told him he could buy regular tickets and claim a refund within 90 days. That rule did not exist. The British Columbia Civil Resolution Tribunal rejected the airline's argument that the chatbot was a separate legal entity, and ordered Air Canada to pay C$812.02.
The same trick writes poetry
Here is the counterpoint. The exact same guessing mechanism that invents a fake court case is what writes beautiful poetry and drafts brilliant code. Creativity and fabrication come from the same mathematics. The model is not broken when it invents — it is doing what it was built to do. The problem is only that we treat its output as fact.
What actually works
Telling the model to 'be careful' or 'only write true facts' barely helps: clever prompting cuts hallucination rates by only 5–15%. What works is grounding — connecting the model to real documents or live web results before it answers. Grounding cuts hallucination by 75–90%.
The 3-step check
A 30-second habit, for anything that matters:
- Ask for sources — and open them. A link is not enough if it is broken, and a real link is not enough if it does not say what the AI claimed.
- Verify the key claim elsewhere. Never copy a date, a statistic, a quote, or a legal or medical claim into serious work without checking it through an independent, trusted source.
- Switch on web search. For factual questions, always use search-grounded mode. OpenAI's own numbers show it cuts claim errors roughly fivefold, from 47% to 9.6%.
AI doesn't lie. It guesses. Check anything that matters.
Paragon AI MAG publishes one plain-words AI explainer every day — one video and one podcast episode. Follow Paragon AI MAG so you never miss one.
Top comments (0)