Module 21 · How Chatbots Work

Why did the chatbot invent a book?

Lesson 21.4 · Foundation Models and Made-Up Answers

Felix · Rosa

It knew what a citation looks like. It did not know what a book is.

Felix asked for sources.

The model has read millions of citations, and it knows exactly what one looks like: author, title, publisher, year.

So it produced one that looked right. Nothing in the loop checks whether the book exists. The teacher checked.

The short answer

Because Felix asked for a citation and a citation is a shape the model knows well. It filled the shape with likely words. No step in the loop asked whether the words pointed at anything real. Felix rewrote the essay with library books. The teacher, to her credit, used it as a lesson for the whole class.

Try it yourself

Each round is a chatbot answer with one made-up fact in it. Find the fake.

Round 1: “Here are some facts for your geography essay.”

What you just did has a name

Foundation models and hallucination

A foundation model is one enormous network trained on a huge slice of the internet to predict text, then tuned with human feedback so its replies are helpful and polite.

When it produces a confident, fluent statement that isn’t true, that’s called a hallucination. It isn’t lying.

It’s doing exactly what it was trained to do: produce likely text.

A few more things

Likely isn’t the same as true

A citation that looks like thousands of real citations is very likely text. Whether that book exists is a different question the model was never trained to answer. Fluency and accuracy are separate skills, and only one of them is next-token prediction.

Tuning made it nicer, not truer

The human-feedback step teaches the model which replies people rate highly. Confident, well-organized answers rate highly. That pressure can make hallucinations more convincing, not rarer.

Check anything you’d be embarrassed to be wrong about

Names, dates, numbers, quotes, sources, anything about a specific person. Ask the chatbot for the source, then go look at the source. If it can’t be found, it doesn’t exist.

Go deeper

The longer version, if you want it.

What the tuning actually does

Pretraining produces a model that continues text. Left there, it will happily continue a question with more questions. Instruction tuning shows it examples of question-and-answer pairs so it learns to answer. Then reinforcement learning from human feedback (Module 14’s third kind) trains it toward replies that raters prefer. Each stage shapes behavior. None of them adds a fact-checker.

Newer systems bolt on tools: web search, calculators, a database of real citations the model must quote from. Those reduce hallucination where they’re used. The core model, asked cold, still has no idea whether Dr. Ellen Marsh exists.

Quick check

A chatbot tells you your town’s library opened in 1912 and names the architect. You can’t find either fact anywhere. What most likely happened?

Let’s take it slower

Picture a very well-read improv actor. Ask for a citation and it performs a citation, flawlessly, because it has seen a million of them and knows the rhythm. Ask for a date and it performs a date. The performance is what it was trained for and what the raters rewarded. Nothing in the act stops to ask whether the book is on a shelf. So when a fluent answer names a specific thing, a title, a number, a person, treat it as a scene until you’ve checked the props.

More examples

1

The legal brief with fake cases

A lawyer filed a court brief written with a chatbot, citing six earlier cases to back him up. The judge went looking: none of them existed, and the lawyer was fined. The cases had the right names, the right courts and the right format, which is the shape, filled with likely words.

2

The recipe that sounds right

Ask a chatbot for your grandmother’s regional dish and it will hand you a confident recipe with quantities and a cooking time. It may be a plausible average of similar dishes, not the real one. Fluent, specific and possibly wrong: the same failure as the citation, at lower stakes.

Back to the question

So why did it invent a book?

Show the answer

Because Felix asked for a citation and a citation is a shape the model knows well. It filled the shape with likely words. No step in the loop asked whether the words pointed at anything real. Felix rewrote the essay with library books. The teacher, to her credit, used it as a lesson for the whole class.

More on this: How does ChatGPT work?

One last question

A chatbot gives you a confident answer with a source. What do you do?

Talk Card

Talk Card · 21.4

A chatbot produces likely text, and a fake citation is very likely text. Nothing in it checks the world, so anything you’d be embarrassed to get wrong, you check.

Data to AI · pettigrewlab.com/learn

Next lesson