The four stages behind every AI chatbot.
The short answer
A very well-read guessing machine.
A large language model (LLM) is a computer program that has learned patterns in language by reading an enormous amount of text. When you type a question, it does not look the answer up the way a search engine does. It writes a reply by predicting, again and again, what text is most likely to come next.
ChatGPT, Claude, Gemini and Llama are all large language models. They are "large" because they contain billions of adjustable numbers, called parameters, that were tuned during training.
Words become tokens
Computers need numbers, not letters.
Before a model can work with text, the text is cut into small pieces called tokens. A token can be a whole word ("cat"), part of a word ("un" + "believ" + "able") or a punctuation mark. Each token is turned into a list of numbers, called an embedding, that captures something about its meaning. Words used in similar ways end up with similar numbers, which is how the model knows that "puppy" is closer to "dog" than to "volcano".
It learns by guessing the next token
Practice, mistakes and tiny corrections.
During training the model is shown a piece of text with the next token hidden. It guesses, the guess is compared with the real answer, and every parameter is nudged slightly so the next guess is a little better. Repeat that across a huge library of books, websites and code, and the model gradually picks up grammar, facts, styles of writing and even some reasoning patterns.
After this first stage, the model is good at continuing text but not yet good at being an assistant. So companies run a second stage where people write example conversations and rate the model's answers. This teaches it to follow instructions, say when it is unsure and refuse harmful requests.
The transformer: paying attention
The idea that made modern AI possible.
Almost every LLM today is built on a design called the transformer. Its key trick is attention: when the model reads a word, it looks back at every other word in the text and decides which ones matter most. In "The trophy did not fit in the suitcase because it was too big", attention helps the model work out that "it" means the trophy.
Students in our advanced track write a small transformer themselves, line by line. You can try one in your browser on our GPT from scratch project page.
Why it sometimes makes things up
Fluent is not the same as correct.
Because an LLM is built to produce likely-sounding text, it can write a confident answer that is simply wrong. This is called a hallucination. It happens most with exact facts, recent events, quotes, numbers and references.
Engineers reduce hallucinations by connecting the model to real documents (a technique called retrieval-augmented generation, or RAG) and by testing it carefully. Building and testing exactly that kind of system is a core part of our AI Foundations course.
How to explain it to your child
One idea, three ages.
The super autocomplete
"It is like the word suggestions on a phone keyboard, but it has read so much that it can finish whole stories."
The pattern spotter
"It learned patterns from millions of pages. It is very good at sounding right, so we still check if it is right."
The real mechanism
"Text becomes tokens, tokens become numbers, and a transformer predicts the next token using attention. Training adjusts billions of parameters to make better predictions."
Quick answers
What parents ask us most.
Is ChatGPT a large language model?
Yes. ChatGPT is an app built on top of large language models made by OpenAI. Claude (Anthropic), Gemini (Google) and Llama (Meta) are other well-known large language models.
Does a large language model understand what it says?
Not the way people do. It has learned very rich patterns in language, which lets it explain, summarise and reason surprisingly well, but it has no experiences of its own and can be confidently wrong, so its answers should be checked.
Can kids learn how large language models work?
Yes. Children from about age 10 can understand tokens, prediction and training through hands-on activities, and teens who know some Python can build a small language model themselves.
What is the difference between AI and a large language model?
AI is the whole field of making computers do things that normally need intelligence. A large language model is one type of AI, specialised in reading and writing text.
Want your child to go from using chatbots to understanding them? Book a free 45-minute trial class with a working AI engineer.