AI from Zero
Track · Start hereGuide 00317 pages · 15 min readDecember 2, 2026

How chatbots work, and why they make things up

The plain-words guide to what is really happening when a chatbot answers you, and how to catch it when it is wrong.

By Arjun Jaggi, Applied AI Researcher

Download the PDFGet new guides free
AI from Zero
Guide 003
Track · Start here17 pages · 15 min

How chatbots work, and why they make things up

The plain-words guide to what is really happening when a chatbot answers you, and how to catch it when it is wrong.

1 · It reads
A vast amount of text
2 · It predicts
matsofamoon
The likely next word
3 · It writes
The cat sat on the mat.
Fluent, usually right, not always
By Arjun Jaggi, Applied AI Researcher · December 2, 2026Free at arjunjaggi.com/learn
Guide 003 · How chatbots workStart here
The 30 second answer

A chatbot does not look up your answer. It predicts it, one likely word at a time.

Unless it is given a search tool, a chatbot writes from patterns it learned in training. Likely words are usually true words, which is why it is so useful. When they are not, you get a fluent answer that is wrong.

What people think
Your question
It looks up the answer
A checked fact
What really happens
Your question
It predicts likely words
A fluent answer, usually right
RememberLikely is not the same as true. Smooth, confident writing tells you nothing about whether a fact is correct.
AI from Zero · Guide 0032
Guide 003 · How chatbots workContents

Inside this guide

When you finish, you can
Explain how a chatbot writes an answerSay why it sometimes makes things upCatch a made-up answer before it costs you
01The 30 second answer2
02How a chatbot is made4
03It reads in pieces5
04Watch a made-up answer happen6
05Why it makes things up7
06Where made-up answers hide8
07Myth or fact9
08Is this answer made up?10
09A weak question and a strong one11
10Six habits12
11Try it yourself13
12Practice14
13Quick quiz15
14Cheat sheet16
15Sources17
Reading the PDFThe game, flip cards, quiz and flowchart are interactive on the website, at arjunjaggi.com/learn/how-chatbots-work. In this PDF every answer is already shown.
AI from Zero · Guide 0033
Guide 003 · How chatbots workHow a chatbot is made

How a chatbot is made, in three stages

1
It readsIt is trained on an enormous amount of text, such as books, articles and websites, and learns which words tend to follow which.
2
It practises answeringIt is shown many examples of good questions and good answers, so it replies like a helpful assistant instead of just continuing text.
3
It learns from people’s ratingsPeople compare its answers and pick the better ones, and it is adjusted to give the kind of answers people prefer.
TipThe third stage matters. In one well known study, people preferred answers from a model trained this way over a model more than 100 times larger that was not [1, see page 17].
AI from Zero · Guide 0034
Guide 003 · How chatbots workIt reads in pieces

It reads in pieces, called tokens

A chatbot does not read whole words the way you do. It reads small pieces of text called tokens, and it learns patterns in how those pieces follow each other.

A tokenA whole word, or a piece of a word. Spaces and punctuation can be pieces too.
An exampleA long word like “unbelievable” may be split into pieces such as un, believ and able. Each chatbot splits text its own way.
Why piecesPieces let it handle new, rare or misspelled words by building them from parts.
What it seesPatterns in pieces of text. Not facts about the world, and not meaning the way you hold it.
Long chatsA chatbot can only hold so much text at once. In a very long chat, early details can get lost.
Why it mattersIt explains both the magic and the mistakes. Patterns can be brilliant, and patterns can mislead.
In plain wordsA chatbot is a pattern machine for text. Treat it as a brilliant writer, not a reference book.
AI from Zero · Guide 0035
Guide 003 · How chatbots workWatch a made-up answer happen

Watch a made-up answer happen

Press Next word to watch a chatbot build an answer, one likely word at a time.Read down the steps to see a chatbot build an answer, one likely word at a time.

The sentence so farThe first person to walk on Mars was Commander James Carter in 2031.
WORD 1
It picks “Commander”
Commander
Nobody
a robot
WORD 2
It picks “James”
James
Elena
Alex
WORD 3
It picks “Carter”
Carter
Reed
Hayes
WORD 4
It picks “in”
in
on
during
WORD 5
It picks “2031”
2031
2029
2035
THE CATCH
Nobody has walked on MarsThe name and the year are invented. Every word was likely, so the sentence sounds sure. That is how a chatbot makes things up.
Step 1
An illustration. The likelihoods are made up to show the idea, not taken from a real chatbot.
AI from Zero · Guide 0036
Guide 003 · How chatbots workWhy it makes things up

Five reasons chatbots make things up

1
It predicts, it does not checkIt picks words that fit, not facts it has verified.
2
There are gaps in what it readRare facts, small places and recent events may barely appear in its training, so it fills the gap with something likely.
3
It is rewarded for answeringResearchers argue training and testing reward a confident guess over an honest “I do not know” [2].
4
Your question assumed somethingAsk why someone won a prize they never won, and it may happily explain why.
5
The chat got very longIn a long conversation, details from early on can get lost.
TipResearchers call fluent but false output a hallucination [3]. In this guide we just call it a made-up answer.
AI from Zero · Guide 0037
Guide 003 · How chatbots workWhere made-up answers hide

Where made-up answers hide

Made-up answers cluster in predictable places. These are the details that look most convincing, and the easiest to invent.

QuotesWords put in a real person’s mouth that they never said.
Sources and linksBooks, studies or web pages that do not exist, or do not say what was claimed.
NamesPeople, places or companies mixed up, or invented to fill a gap.
Numbers and datesA precise figure or year that sounds right and is not.
Small and local thingsYour street, a tiny business, a local event. Little was written about them.
Very recent eventsAnything newer than its training, unless it can search.
A simple ruleThe more specific and checkable a detail is, the more it needs checking.
AI from Zero · Guide 0038
Guide 003 · How chatbots workMyth or fact

Four things people get wrong

Read the myth, guess, then tap the card to see the fact.Read the myth, guess, then read the fact under it.

AI from Zero · Guide 0039
Guide 003 · How chatbots workIs this answer made up?

Is this answer made up?

Answer three questions, top to bottom. Tap Yes or No.Answer three questions, top to bottom, and follow the arrows.

Yes do what the box on the right saysNo go down to the next question
1Does it include a name, number, date, quote or link?
Yes
Check each one in a source you trust.
No
2Is it about something recent, rare or very local?
Yes
Be extra careful. This is where guesses hide.
No
3Did my question assume something?
Yes
Ask again without the assumption, and compare.
No
Read it with care, and ask, “How sure are you, and why?”
AI from Zero · Guide 00310
Guide 003 · How chatbots workA weak question and a strong one

A weak question and a strong one

WEAK
Tell me about the history of my town, Millbrook.
You get a confident history. Some of it may be invented, and you cannot tell which part.
STRONG
Tell me what you know about the history of Millbrook, and say clearly which parts you are unsure about. If you do not know, say so. Then list what I should check.
You get an answer that shows its weak spots, and a checklist of what to verify.
The formula
AskWhat you want to know
AllowPermission to say I do not know
CheckWhat it thinks you should verify
AI from Zero · Guide 00311
Guide 003 · How chatbots workSix habits

Six habits that catch made-up answers

1
Let it say “I do not know”Add a line like “If you are not sure, say so.” It removes the pressure to guess.
2
Ask how sure it is, and whyThe answer is not proof, but it often reveals the weak spots.
3
Open every source it givesA link that does not work, or a page that does not say what was claimed, is a warning sign.
4
Give it the documentPaste the text you care about and ask it to answer only from that.
5
Ask twice, in two new chatsIf the two answers disagree on a fact, check that fact.
6
Never trust a quote or number aloneFind the original before you repeat it.
TipYou do not need all six every time. Match the effort to what it would cost you to be wrong.
AI from Zero · Guide 00312
Guide 003 · How chatbots workTry it yourself

Try to catch a chatbot

Open any free AI chatbot, start a new chat, and paste this. The speech in it does not exist.

Tell me about the famous 1987 speech by the Mayor of Millbrook about public libraries. Include two quotes from it.
SAMPLE ANSWER · YOURS WILL DIFFER
Your AI chatbot
Tell me about the famous 1987 speech by the Mayor of Millbrook...

A made-up answer looks like this. In his 1987 address, the Mayor of Millbrook called public libraries “the living rooms of a free town” and urged residents to “read together, so we can disagree well.”

The speech, the quotes and the setting are all invented. It reads well, and none of it is true.

A good answer looks like this. I cannot find any record of a famous 1987 speech by the Mayor of Millbrook. If you have a copy or a source, I can help you read it.

You got it right ifIf it gave you quotes, it made them up. If it said it could not find the speech, that is the answer you want.
AI from Zero · Guide 00313
Guide 003 · How chatbots workPractice

Try it three ways

Same skill, harder each time. Write what happened in the space under each one.

EasySpot the guess
Ask a chatbot about your own street or a small local business. Mark every detail you know is wrong.
MediumSame question, two chats
Ask the same factual question in two new chats. Circle every fact where the answers differ.
StretchCatch a fake source
Ask for three sources on a topic you care about, then try to open each one. Note any that do not exist.
AI from Zero · Guide 00314
Guide 003 · How chatbots workQuick quiz

Five questions. How did you do?

Tap an answer to check it.Circle one answer for each question. The answers are at the bottom of the page.

1. How does a chatbot write an answer?
2. Why can a chatbot make things up?
3. Which detail most needs checking?
4. What helps a chatbot avoid guessing?
5. You ask the same question twice and get two answers. Why?
Answers. 1 B · 2 B · 3 B · 4 A · 5 A
AI from Zero · Guide 00315
Cheat sheet · save this pageGuide 003

How chatbots work, on one page

In one lineIt predicts likely words. It does not look up facts unless given a tool.
Why it makes things upLikely-sounding is not the same as true.
Best habitTell it, “If you are not sure, say so.”
Most often made upQuotes, sources, links, names, numbers and dates.
Before you trust itOpen the source. Check every name, number and quote.
Watch forQuestions that assume something that is not true.
Next, guide 004. Your first conversation with AIGet it free on Substack
AI from Zero · Guide 003 · arjunjaggi.com/learn16
Guide 003 · How chatbots workSources

The research behind this guide

Three research papers support the specific claims in this guide. Everything else explains how chatbots work in plain words, without statistics.

  • [1] Long Ouyang and others, “Training language models to follow instructions with human feedback,” NeurIPS 2022. Supports page 4, people preferring answers from a model trained on people’s ratings over a model more than 100 times larger. arxiv.org/abs/2203.02155
  • [2] Adam Tauman Kalai, Ofir Nachum, Santosh S. Vempala and Edwin Zhang, “Why Language Models Hallucinate,” 2025. Supports page 7, training and testing rewarding a confident guess over “I do not know”. arxiv.org/abs/2509.04664
  • [3] Ziwei Ji and others, “Survey of Hallucination in Natural Language Generation,” ACM Computing Surveys, 2023. Supports page 7, the term hallucination for fluent but false output. doi.org/10.1145/3571730
How we checkEvery source here was checked to be real, to say what we say it says, and to have a working link.
AI from Zero · Guide 00317
Next · Guide 004Your first conversation with AIGet each new guide free, on Substack.