Neurocourse
AI hallucinations: why models make things up and how to catch it

AI hallucinations: why models make things up and how to catch it

5 min read

In short: a hallucination is a confident, plausible, but invented AI answer. It's not a bug — it's how the technology works: the model predicts a likely text continuation, and when it doesn't know the answer, the "likely continuation" still looks like a real answer. Defence: verify what matters, give the model sources, enable web search.

Why models make things up

A language model doesn't "look up answers in a database" — it generates text token by token, picking the most likely continuation. It has no built-in "I don't know" flag: when facts run out, statistically likely text still gets produced — with dates, names and a confident tone.

Where the risk peaks

  • Links and sources — models easily invent plausible URLs and paper titles
  • Exact numbers, dates, quotes
  • Little-known people and events — little data, much fantasy
  • Legal and medical detail — where mistakes cost the most

4 defence techniques

  1. Verify what matters. Any number, quote or link something depends on — open the original source.
  2. Permit uncertainty. Add "if unsure — say so" to your prompt. It measurably reduces fabrication.
  3. Provide material. A model with a document answers from the document, not from memory.
  4. Enable web search — answers grounded in found pages can be checked by their links.

The one thing to remember

Plausible detail is not proof. A confident tone is not proof. The only proof is the original source you opened yourself.

Related topics

Half of hallucination defence is a well-built request: how to give the model material and let it admit uncertainty is covered in what a prompt is and how to write one. If you're just starting, begin with the beginner's guide to ChatGPT. And which data is even safe to trust a model with is in our article on privacy when working with AI.

🧠Go deeper — in the courseNeural networks for beginners

FAQ

Will hallucinations ever go away?

Models get more accurate, and search plus grounding reduce the risk — but the generative nature of LLMs makes fabrication inherently possible. Verification stays a core skill.

What is an AI hallucination in plain words?

It's a confident, plausible, but invented answer: the model states a non-existent fact, link or quote as calmly as a real one. You can't tell fabrication from truth by looks alone — only by verifying.

How do I tell the AI is making things up right now?

There's no reliable outward sign — that's the danger. Indirect signals: very precise numbers without a source, links that don't open, details about little-known people. Verify any critical detail against the original source.

Why doesn't the model just say 'I don't know'?

Because it doesn't look up an answer in a database — it completes the most likely continuation of the text. It has no built-in 'unknown' flag. But you can ask: add 'if unsure, say so' to your prompt, and fabrication drops.

Does web search remove fabrication completely?

Not completely, but it noticeably lowers the risk: the answer is grounded in found pages you can check via their links. The key is to open the source yourself rather than trust the model's retelling.

Where are hallucinations especially dangerous?

Where the cost of error is high: legal and medical detail, financial calculations, exact quotes and links, facts about specific people. In these areas AI is a draft and an assistant, not the final word.

How are hallucinations linked to prompt quality?

Directly. Give the model a source document and ask it to answer only from that, and the room for invention shrinks. How to build such requests is in our prompt article.