Skip to content

Lesson 3: How Does ChatGPT Work? Neural Networks and Tokens With No Maths

← Back to the course

You don’t need to understand how an engine works to drive a car. But knowing the basics of how AI works will make you much better at using it, and much less likely to be fooled by it. Three ideas, no maths.

Try this. Finish the sentence:

“I’d like a cup of hot …”

You probably thought “tea”, “coffee” or “chocolate”. Not “bicycle”. You didn’t look that up anywhere: you’ve just seen so much language that you know what usually comes next.

That’s the core of an LLM. It was trained by playing this game billions of times: take a piece of real text, hide the next word, guess it, check the answer, adjust, repeat. After enough rounds on enough text, it gets extremely good at guessing what comes next.

When you ask it a question, it writes the answer the same way: it guesses a good next word, adds it, then guesses the next one, and the next, until the answer is done. That’s why you see the text appear bit by bit.

The surprising part is that to get really good at this game, the model has to pick up a lot about the world: grammar, facts, how to explain things, even how to reason through a problem step by step. Nobody programmed those rules in. They emerged from the guessing.

Idea 2: a neural network is a giant panel of dials

Section titled “Idea 2: a neural network is a giant panel of dials”

How does the model “adjust” after a wrong guess? Inside, an LLM is a neural network: a huge maths structure loosely inspired by how brain cells connect.

The simplest way to picture it: imagine a mixing desk with billions of tiny dials. Text goes in one side, a guess comes out the other, and every dial slightly changes the result.

  • During training, every time the guess is wrong, a computer nudges all the dials a tiny bit in the direction that would have made the guess better.
  • After months of this on enormous computers, the dials end up set in a way that produces good guesses.
  • Once training is finished, the dials are fixed. When you chat with it, you’re using that finished set of dials.

That’s what “deep learning” means: learning by adjusting many layers of these dials. And it explains one important thing: the model doesn’t contain a list of facts. It contains dial settings that are good at producing likely text. Usually that text is right. Sometimes it’s confidently wrong (more on that in lesson 4).

Idea 3: it reads in “tokens”, not words

Section titled “Idea 3: it reads in “tokens”, not words”

LLMs don’t actually see words the way you do. They break text into small chunks called tokens. A token can be a whole short word, part of a longer word, a space or a punctuation mark.

For example, a sentence like “Unbelievable, isn’t it?” might be split into pieces like Un believ able , isn 't it ?. As a rough rule of thumb, in English one token is about three-quarters of a word.

Why should you care? Three reasons:

  1. Limits are counted in tokens. Each chatbot can only “keep in mind” a certain number of tokens at once, called its context window. In a very long conversation, the earliest parts can fall out of view, which is why it sometimes “forgets” what you said at the start.
  2. Prices are counted in tokens. If you ever pay for AI by usage, you pay per token.
  3. It explains some odd mistakes. Because it sees chunks, not letters, AI can be surprisingly bad at things like counting the letters in a word.

When you type a message:

  1. Your text is split into tokens.
  2. The neural network (the panel of dials) looks at all of them, plus the conversation so far.
  3. It guesses the most fitting next token, adds it, and repeats until the reply is complete.

That’s it. Everything impressive you’ve heard about AI is built on that loop, done incredibly fast by a very, very large set of dials.

Want the deeper version? Once you’re comfortable, the Blueprint’s Token Economics module goes into tokens properly.

Next: Lesson 4: Why your answer differs from mine →