AI Hints
Home›Generative AI Tutorial›Trust, Verify and Use AI Well
Generative AI · Lesson 26 of 77

Hallucinations

When AI confidently gets things wrong.

⏱ 2 min read▶ Video at 1:02:55🎓 Free
Watch this lesson in the Generative AI courseWatch on YouTube ↗Full Generative AI course

Sometimes a model gives an answer that sounds perfect, but is completely made up. A fake quotation. A court case that never existed. A book that was never written. This is called a hallucination. In this lesson, you will learn why it happens, and how to protect yourself.

Hallucinations
From the video: Hallucinations
  • Confident, fluent, and wrong
  • Why it happens
  • How to protect yourself

Why models hallucinate

Remember the big idea. A model predicts the most likely next words. It is built to produce fluent, plausible text, and not to check facts. When it does not know something, it does not say so, unless it was trained to. It simply continues with words that sound right. A confident tone, and correct facts, are two different things.

  1. Goal: plausible textnot verified truth
  2. Gap in knowledgerare or recent facts
  3. Fills the gapwith likely-sounding words
  4. Sounds confidentbut may be wrong
Fluent does not mean correct
Why models hallucinate
From the video: Why models hallucinate

Where hallucinations are most likely

Some situations carry more risk. Very specific facts, like exact dates, numbers, and quotations. Obscure topics, with little training data. Recent events, after the model's training ended. Citations and references, which models often invent. And questions that contain a false assumption. When the topic is high stakes, like health, law, or money, always double check.

Exact numbers and quoteseasy to get subtly wrong
Obscure topicslittle data to learn from
Recent eventsafter the training cutoff
Citations and linksoften invented
High stakes topicshealth, law and money

How to reduce the risk

You can reduce the risk. Give the model the source material, and ask it to answer only from that text. This is the idea behind retrieval, which we will build later. Ask it to say, I do not know, when unsure. Ask for its reasoning, and sources, then check them. Use a lower temperature for factual tasks. And for anything important, verify with a trusted source.

Provide the source textanswer only from this
Allow I do not knowpermission to be unsure
Ask for reasoningthen check the steps
Lower the temperaturefor facts and numbers
Verify important claimswith a trusted source

Summary

Good. Hallucinations are fluent, confident, and wrong. They happen because models predict plausible text, and do not check facts. Be careful with numbers, quotes, citations, and recent events. Give sources, allow uncertainty, and verify. Next, how to judge the quality of an A I answer, in a fair and organised way.

Key takeaways
  • Hallucination = plausible but false
  • Riskiest: numbers, quotes, citations
  • Give sources, allow 'I don't know', verify
Next up: Evaluating Outputs — judging answers fairly