πŸ’‘Tell Me About AI
← Course overview
πŸ€–

Lesson 2 of 8 Β· 10 min

How chatbots actually work

The next-word prediction trick, explained so it finally clicks.

It predicts the next word

Strip away the mystique and a chatbot like ChatGPT does one thing: it predicts the next word. Type 'The cat sat on the…' and it guesses 'mat', because after reading an enormous amount of text, 'mat' is the most likely thing to come next.

That's it. That one trick, repeated billions of times, is what produces the fluent, coherent, often-brilliant answers you see. It never 'understands' anything the way you do β€” it has learned the shape of language so precisely that its next-word guesses add up to real meaning.

Why it seems to think

Two extra pieces make it feel alive. First, it's been fine-tuned to be helpful β€” to answer the question you asked rather than just continue your sentence. Second, it re-reads your whole conversation each time, so it can 'remember' what you said a few messages ago.

But that memory has a limit (the 'context window'), and once a chat gets too long, older parts fall away. It's not a person with a memory β€” it's a very good next-word predictor with a notepad it keeps glancing at.

The consequence: it doesn't look things up

Here's the part that changes how you use it. When you ask a fact-based question, the model isn't searching a library β€” it's assembling the most probable answer from what it learned during training. That's why it can be exactly right and also confidently wrong, sometimes in the same sentence.

Treat every answer as a brilliant first draft from a very well-read assistant who sometimes has a vivid imagination. Use it for drafting and thinking; verify anything that matters before you act on it.

Key takeaway

A chatbot is a next-word predictor, not a mind with a memory. It doesn't look things up β€” it assembles the most probable answer. That single fact explains both its power and its errors.

πŸ•’ Try it now

  1. 1Ask an AI to write a haiku about a lamp. Watch it produce one instantly β€” that's prediction, not creativity.
  2. 2Then ask a niche factual question and fact-check the answer. Find the small error.
  3. 3Notice how confident it sounded even when wrong. Remember that tone.
← What AI actually isPrompting that actually works β†’