ResourceInformation

Articles › AI Explained

How Does ChatGPT Actually Work? (Explained Simply)

By Resource Information · 6 November 2026 · 3 min read

How Does ChatGPT Actually Work? (Explained Simply)
▶ Prefer watching? This is also a 3:19 animated video.Subscribe on YouTube

You type a question, and a few seconds later ChatGPT writes back a clear, friendly answer. It feels like talking to a person. But there is no person, and no giant database of ready-made answers either. Here is what is really happening, in six simple steps.

1. Your words become numbers

Computers can't read words the way we do, so the first thing ChatGPT does is cut your message into small pieces called tokens. A token can be a whole word ("sky"), part of a word ("un" + "believable") or even a space or punctuation mark. Each token is then turned into a number. From this point on, everything ChatGPT does is maths on numbers, not reading in the human sense.

2. It learned by reading a huge amount of text

Before you ever chatted with it, the model was trained on an enormous collection of text: books, websites, articles and code. Training is a guessing game played billions of times. The model is shown a sentence with the next word hidden, such as "The cat sat on the ___", and it has to guess. If the guess is wrong, its internal settings are nudged slightly so the right answer becomes a little more likely next time.

Repeat that over and over, and the model slowly picks up grammar, facts, styles of writing and even some reasoning patterns. That's where the name comes from: GPT stands for Generative Pre-trained Transformer, meaning it generates text, it was trained in advance, and it uses a design called a transformer.

3. A giant network of tiny "knobs"

Everything the model learned is stored in parameters, which you can picture as tiny adjustable knobs. GPT-3, released in 2020, had about 175 billion of them. Newer models are larger still.

The transformer design has a clever trick called attention. It lets the model work out which words relate to each other. In the sentence "I put the cake in the oven because it was ready to bake", attention helps the model understand that "it" means the cake, not the oven.

4. People taught it to be helpful

A model that only predicts the next word isn't automatically a good assistant. So after the main training, people wrote example answers and rated different replies from best to worst. The model was then fine-tuned to prefer the kind of answers people liked: clear, useful and safe. This step is a big reason ChatGPT sounds polite and follows instructions.

5. It writes the answer one piece at a time

When you ask a question, ChatGPT doesn't look up a stored answer. It looks at everything in the conversation so far and scores every possible next token. It picks one, adds it to the reply, and then does the whole thing again for the next token, and the next, until the answer is finished. That's why you see the text appear word by word.

Because it re-reads the whole conversation each time, it can "remember" what you said earlier in the same chat, up to a certain length.

6. Why it can sound sure and still be wrong

ChatGPT predicts what sounds right, not what has been checked to be true. Most of the time those are the same thing, but sometimes it produces a confident answer that is simply made up. These mistakes are called hallucinations.

A few habits help:

  • Double-check important facts, numbers and dates.
  • Ask for sources, and then open them yourself.
  • Give clear details in your question, so it has less to guess.

In short

ChatGPT turns your words into numbers, uses patterns it learned from a vast amount of text, and writes its reply one token at a time, guided by human feedback. It's an incredibly good predictor of language, which makes it very useful, as long as you remember it's predicting, not knowing.

Sources

Like learning this way?

New animated explainers every week on YouTube and Facebook.