Hallucinations — AI Basics
AI BasicsHow chatbots work

Hallucinations

Sometimes a chatbot says something that sounds right but isn't. That's called a hallucination. It's like bluffing in an oral exam. If you don't know the answer, you say something that sounds good. Learn why it happens, and how to catch it.

Time 20 minutesChecked on 28-10-2026Read first Training and the knowledge cutoff
1/10

First, what do you think?

A chatbot gives you an answer with a name, a date and a book title. It sounds very sure. Is it right? Have a guess.

2/10

What is a hallucination?

The whole story in three sentences. A chatbot always predicts a next word. It doesn't stop to say "I don't know". So sometimes it predicts something that sounds right, but isn't.

Think of an oral exam. The teacher asks something you don't know. Saying "I don't know" gets you zero points. A good-sounding guess might score. So you bluff. Researchers say a language model is in the same spot.

A hallucination is that bluff: an answer that sounds right, but isn't true.

  • It sounds equally sure. A made-up fact has the same calm tone as a true one.
  • It loves details. Names, dates, numbers, titles, quotes. Those are exactly the parts to check.
  • It isn't lying. Lying means you know the truth and hide it. The predictor knows nothing. It predicts.
  • Every chatbot can do it. Google writes that predictions often contain mistakes.

A first small step: in every answer, pick one name or number. Look it up somewhere else.

3/10

What the predictor does

The predictor picks words that fit. Not words that are true. That's the rule.

Usually, words that fit are also true. "The capital of France is…" is followed by "Paris" in lots of text. But for rare facts, there's little in the pile. The predictor still predicts something that fits the pattern. A date looks like a date. A book title looks like a book title.

Researchers tested this. They asked a model for one researcher's birthday. It gave three answers: three different dates. All three were wrong. They also asked three well-known chatbots for the title of his dissertation. Each one gave a different title. None was right.

Why does it guess? The researchers point to how models are trained and tested. Most tests give no points for "I don't know". A guess sometimes scores. So guessing wins, like in a multiple-choice test. Their suggestion: stop rewarding guesses in those tests.

Remember

The predictor picks words that fit, not words that are true. The more specific the detail, the more you check.

4/10

Try it yourself

Three answers from a chatbot. Can you spot what to check, and how?

Everything runs in your browser. Nothing you type is sent anywhere.

Try it with a real chatbot

Use the free version of any chatbot. Don't type anything personal.

Ask a chatbot about someone who isn't famous. Your grandparent, a teacher, or a local shop:

Prompt
Who is [name] from [town]? Tell me their birthday and three facts about them.

What to expect. It may say it doesn't know. Or it may give facts that sound real.

What to look for. Ask the same question in a new chat. Do you get the same answer? Different answers to the same question are a warning sign.

5/10

In practice

Three people meet the bluffing student.

Case 1The book that doesn't exist

Situation

Lotte (15) prepares a talk about bees. A chatbot recommends a book, with author, year and page number. At the library, nobody can find it.

What most people do

Search longer, because the page number made it seem real.

Why that doesn't work

A page number makes it sound precise. Not true. The predictor can make up a title that fits the pattern.

What works better

Search the title and author before using it. Use sources you can open yourself.

Why that helps

If you can't find it, you don't build your talk on it.

Case 2The quote for the speech

Situation

Mark (45) writes a speech for a colleague's farewell. He asks a chatbot for a famous quote about teamwork. It gives one, with a name.

What most people do

Put it straight in the speech.

Why that doesn't work

Quotes and names are exactly the details the predictor can make up.

What works better

Search for the quote. Find a trusted source that shows who said it.

Why that helps

He knows it's real before he says it out loud.

Case 3"Are you sure?"

Situation

Ans (67) asks a chatbot when her favourite singer was born. She doubts the answer, and asks "Are you sure?". The chatbot apologises and gives another date.

What most people do

Pick the second answer, because it "corrected itself".

Why that doesn't work

"Are you sure?" gets a new prediction, not a check. A new date says nothing about which one is right.

What works better

Look it up in a trusted source, like an encyclopedia or the singer's own website.

Why that helps

Different answers to the same question mean: it's guessing. The source isn't.

6/10

By situation

Use a chatbot to explain and to give ideas. Don't copy names, dates, numbers or sources without checking them. Only cite sources you've opened yourself.

7/10

Myths and mistakes

ClaimTrue?Why
If it sounds sure, it's rightNoA made-up fact sounds as sure as a true one.
It lies on purposeNoIt doesn't know or want anything. It predicts words that fit.
"Are you sure?" makes it checkNoYou get a new prediction. That can be a different guess.
Only bad chatbots do thisNoIn one study, three well-known chatbots all gave a wrong title.
8/10

Related topics

Read first

Next

Related

9/10

Sources

  • researchKalai e.a. (2025). Why Language Models Hallucinate.Language models hallucinate because training and testing reward guessing over saying 'I don't know'. Like a student on a multiple-choice test, guessing scores better. Example: asked for one researcher's birthday, a model gave three different wrong dates. Three chatbots each made up a wrong title for his dissertation.
  • explainerGoogle for Developers. LLMs: What's a large language model?.A language model predicts the next token, like a very large autocomplete. A token can be a word, part of a word or one character. Training needs a huge amount of text. Predictions often contain mistakes.

All sources of this course →

10/10

Test

You get 5 questions about the whole page. Get 4 right, and you've mastered the topic.

About the tools in this course. Every tool is described in the same way, in alphabetical order, without a recommendation. Names, prices and features change often: the maker's own site is always right. This site was built with the help of Claude, one of the tools described here.