How chatbots really work

Chatbots write answers by predicting one likely word at a time. Here's how that works, and why they can sound sure while being wrong.

3 min readLast fact-checked: Oct 17, 2026Sources ↓

The short answer

A chatbot like ChatGPT learns by finding patterns in huge amounts of text. When it answers you, it predicts the next most likely word, one word at a time. [1]

That’s why it can sound sure and still be wrong. Likely is not the same as true.

How it builds an answer

Try this. Finish each sentence with the first word that pops into your head:

  • “Peanut butter and ___”
  • “Instead of turning left, she turned ___”
  • “My favorite food is ___”

The first two have one very popular answer. The last one doesn’t. Your brain just did a tiny version of what a chatbot does: it picked a likely next word from patterns it has seen before.

The second sentence is OpenAI’s own example. Early in training, the model’s guesses are mostly random. With practice, it learns that “right” is a likely next word. [1]

1You type a question
2It predicts a likely next word
3It repeats, word by word
4You check the facts
A chatbot builds its answer one likely word at a time. Likely is not the same as true.

It doesn’t look things up

Two things follow from how it works:

  • It doesn’t look answers up in a stored copy of its training text. OpenAI says its models don’t keep copies of the data they learn from and don’t “copy and paste” from it. [1]
  • There is some randomness. The same question can get different answers on different tries. [1]

Why it makes things up

A hallucination is OpenAI’s word for “plausible but false statements” made by a language model. [2] In plain English: a made-up answer that sounds right.

Why does it happen? OpenAI explains that predicting words from patterns works well for things that follow steady patterns, like spelling. But rare, one-off facts (like a pet’s birthday) can’t be learned from patterns alone. [2]

On top of that, the way models are often tested rewards guessing over saying “I don’t know.” OpenAI compares it to a multiple-choice test: leave a question blank and you get zero, but a lucky guess might score a point. [2]

OpenAI also warns that ChatGPT can make up quotes, studies, citations and sources that don’t exist. It “might sound confident—even when it’s wrong,” so people should check important facts with reliable sources. [3]

How to use this

  • Treat a chatbot’s fact as a starting point. Check anything important on a reliable website.
  • Open any source it gives you. Make sure the source really exists and says the same thing.
  • Ask a real person (a teacher or librarian) when the fact really matters, like for schoolwork.
  • Count “I don’t know” as a good answer. It beats a confident guess.
Watch out

A neat answer with a source attached can still be made up. Before you use a chatbot’s fact for schoolwork, find it somewhere reliable yourself.

Try it yourself

Ask a chatbot to describe itself, and compare its answer with what you just read. Check the app’s age rules first. ChatGPT’s terms, for example, say users must be at least 13 and need a parent’s or guardian’s permission if they are under 18. [4]

Explain how you write your answers, in three short sentences a 13-year-old could understand. Then tell me one kind of question you're likely to get wrong.

You've got this
  • Chatbots predict likely next words, one at a time, based on patterns they learned.
  • They don’t look answers up, and the same question can get different answers.
  • A hallucination is a made-up answer that sounds right, and it can include fake sources.
  • Confident is not the same as correct, so check important facts.

Teaching this?

Using this lesson with a class or your own teen? Here’s a ready-to-run plan.

At a glance

  • Time: 20–30 minutes
  • Ages: 13–17
  • You’ll need: a board or chart paper, sticky notes, and (optional) one device with a chatbot you can project
  • Goals. Students will be able to:
    • explain in one sentence how a chatbot builds an answer
    • describe what a “hallucination” is and why it happens
    • name one habit for checking a chatbot’s answer

The lesson works with or without devices. If you use a chatbot, check its age rules (see the note in Try it yourself above) and your school’s rules first.

Run the lesson

  1. Hook (3 minutes). Ask: “When a chatbot answers you, where do you think the answer comes from?” Write a few guesses on the board. Don’t correct them yet.
  2. Finish the sentence (7 minutes, no devices). Read out the three sentence starters from “How it builds an answer” one at a time. Students write the next word on a sticky note. Stick the notes on the board and group matching answers. Point out that the first two have one very popular answer, and the last one doesn’t.
  3. Explain (5 minutes). Tell students: “That’s roughly what a chatbot does. It has learned patterns from huge amounts of text, and it picks a likely next word, over and over.” Then ask: “Was the most popular answer always the true answer for you?” Introduce the word hallucination: an answer that sounds right but is false.
  4. Catch the chatbot (8 minutes, main activity).
    • With a device: As a class, invent something that doesn’t exist, such as a made-up book title and author. Search for it first to be sure it isn’t real. Then ask the chatbot to summarize it and list sources. Students watch for invented details and check whether any listed sources really exist. If the chatbot says it can’t find the book, that’s a win too. Talk about why “I don’t know” is a good answer.
    • Unplugged: In pairs, one student asks a question about a made-up topic, and the other must answer in a confident, expert voice with no pauses. Swap. Then ask: “How could a listener tell which parts were invented?”
    • Tip: Don’t promise students that the chatbot will always make something up. It may say it doesn’t know, and the same question can get different answers each time. [1] Either result is a useful talking point.
  5. Wrap up (2 minutes). Return to the board guesses from step 1 and update them together.

Discussion questions

  1. Why might an answer that sounds confident still be wrong?
  2. If a chatbot predicts likely words, what kinds of questions might it be good at? Which might trip it up?
  3. Why might asking the same question twice give two different answers?
  4. Is “I don’t know” a sign of a bad chatbot or a good one? Why?
  5. What’s one thing you’ll do next time a chatbot gives you a fact for schoolwork?

Student handout

Key ideas

  • A chatbot learns patterns from lots of text.
  • It writes answers by predicting a likely next word, one word at a time.
  • Likely is not the same as true.
  • A hallucination is an answer that sounds right but is false. It can include fake quotes, fake facts or fake sources.
  • Sounding confident doesn’t make an answer correct.

Before you trust a chatbot’s fact, check:

  • Can I find the same fact on a reliable website?
  • If it gave a source, does that source really exist, and does it say the same thing?
  • Is this fact important enough that I should ask a teacher or librarian?
Next in this path · Lesson 2Prompting like a pro: get better answers from AIKeep going
Was this page helpful?

Sources

  1. OpenAI — How ChatGPT and our foundation models are developed— accessed Oct 17, 2026
  2. OpenAI — Why language models hallucinate (Sep 2025)— accessed Oct 17, 2026
  3. OpenAI Help Center — Does ChatGPT tell the truth?— accessed Oct 17, 2026
  4. OpenAI — Terms of Use— accessed Oct 17, 2026

What changed

Oct 18, 2026: Rewritten for readers, with a teaching plan at the end.

Oct 17, 2026: First published.