What an LLM is — 101
Explain what a large language model is in plain language and how it differs from a search engine or a rules chatbot.
Sign in to track progress on this lesson.
01 — Main lesson
Full walk-through. · 4.9 MB
Spoken script — useful when names or terms sound ambiguous.
Let's start somewhere simple. You have probably used a large language model by now. Maybe you have asked one to draft an email, summarise a document, or explain a concept. But what is actually happening when you type a prompt and text comes back? That is what we are going to unpack on this walk, and I want you to walk away with a mental model you can trust and reuse.
At its core, a large language model is a model trained to predict the next token in text. That is the whole game. A token is a small chunk of text, roughly a word or part of a word. When you feed the model a sequence of tokens, it produces a probability distribution over what token should come next. You pick one, append it, and feed the extended sequence back in. Repeat. That is generation.
Now, that description sounds almost too simple, and it is. The simplicity hides two things that matter enormously. First, the scale. These models are trained on enormous amounts of text and have billions or trillions of parameters. Second, the behaviour that emerges at that scale. A model trained only to predict the next token ends up able to follow instructions, answer questions, translate, reason in limited ways, and write code. Nobody hand-coded those behaviours. They appeared because predicting the next token well, across enough diverse text, requires building internal representations of language, facts, and patterns of argument.
So here is your first mental model. Think of a large language model as a very strong autocomplete. You know the autocomplete on your phone, the one that suggests the next word when you type a message. A large language model is that same idea, scaled up dramatically and trained on far more data, to the point where it can autocomplete entire essays, code files, and conversations in a way that stays coherent over long stretches.
That autocomplete framing is useful, but it can mislead you if you take it too literally. Let me sharpen it. The model is not looking up a stored sentence and repeating it. It is generating new text, token by token, based on statistical patterns learned during training. When it writes something fluent and relevant, it is because those patterns are rich enough to produce language that fits the context you gave it. It is pattern completion at a very sophisticated level.
This is where people often get the wrong mental model, and I want to spend a moment fixing that. A large language model is not a database of facts. It does not have a table somewhere with the capital of France stored in a row. During training, it adjusted its parameters so that, given prompts about France and capitals, it tends to produce the token Paris. That looks like recall, and for common facts it usually works. But it is generation, not retrieval. This distinction matters because it explains why the model can be confidently wrong. There is no lookup step that fails cleanly. There is only generation, and generation can produce text that sounds right but is not.
A large language model is also not a guaranteed reasoning engine. It can do impressive reasoning-like behaviour, especially when prompted well, and we will get to chain of thought in a later lesson. But the underlying mechanism is still next-token prediction. It does not pause, run a proof, and then output the result. It produces tokens one at a time, and sometimes those tokens form a correct chain of reasoning, and sometimes they do not. Treat its reasoning as something to check, not something to trust blindly.
Let me give you a concrete example to carry with you. Suppose you type, The capital of France is. A keyword search engine would go and find pages that contain those words and return links. It would not complete the sentence. A large language model, by contrast, generates the next token. Given that input, the most likely next token is Paris. It writes Paris. It did not search the web. It did not open an encyclopaedia. It produced the token that, according to its training, best continues that sequence.
Now extend that example. Suppose instead you write, Explain to a twelve-year-old why the sky is blue, and keep it under one hundred words. A search engine cannot do this. It can find pages about Rayleigh scattering, but it cannot compose a fresh explanation tailored to a twelve-year-old in under one hundred words. A classical chatbot, the old kind built from hand-authored decision trees, could not do this either. Someone would have had to write a branch for sky questions, a branch for twelve-year-old reading level, and a pre-written answer. It would be rigid and narrow.
A large language model can do it because it has learned, across vast amounts of text, the patterns of explanation, the patterns of simple language, and the patterns of following constraints like word counts. It composes a new answer, token by token, that fits all of those patterns at once. That is genuinely powerful, and it is also why the output can be fluent and wrong at the same time. Fluency and correctness are different properties, and the model optimises for fluency and plausibility, not for truth.
Let me draw the contrast with a classical chatbot more sharply, because this is a common point of confusion. A classical chatbot is a system where engineers and content authors write rules. If the user says X, respond with Y. If the user mentions billing, route to the billing subtree. The behaviour is hand-authored. It is predictable, inspectable, and limited to what someone thought to write. A large language model is different. Its behaviour is learned from data during training. Nobody wrote a rule that says, when asked about the sky, explain Rayleigh scattering simply. The model acquired that capability by learning patterns across huge amounts of text. This is why it can handle questions its creators never anticipated, and also why it can surprise you in ways a rules chatbot never would.
The contrast with keyword search is equally important. Search retrieves. It finds documents that match your query and ranks them. It does not compose. A large language model composes. It produces new wording that may never have existed in its training data. That is the source of its flexibility, and also the source of its risk. When search returns a bad result, you can see the source and judge it. When a language model returns a fluent answer, the source is implicit in the parameters, and you have to judge the answer on its own merits.
So what should you carry in your head? Three things. First, a large language model is a next-token predictor trained at enormous scale, and that simple objective produces surprisingly rich behaviour. Second, it is not a database and not a reasoning engine. It generates fluent text by statistical pattern completion, which means it can be both impressive and wrong in the same breath. Third, it differs from search because it composes new text rather than retrieving existing pages, and it differs from classical chatbots because its behaviour is learned rather than hand-authored.
If you want one sentence to reuse when someone asks you what a large language model is, try this. A large language model is a very large statistical model trained to predict the next piece of text, which at sufficient scale learns to generate fluent, context-relevant language and follow instructions, but which is neither a store of verified facts nor a reliable reasoning engine. That is a mouthful, but it is honest, and it will keep you out of trouble.
On the next walk, we will look at tokens and context more closely, because understanding how the model sees your input as a sequence of tokens, and how much context it can hold, changes how you prompt it. For now, let the autocomplete framing settle. It is stronger than it sounds, and it will keep you grounded as we go deeper.
At its core, a large language model is a model trained to predict the next token in text. That is the whole game. A token is a small chunk of text, roughly a word or part of a word. When you feed the model a sequence of tokens, it produces a probability distribution over what token should come next. You pick one, append it, and feed the extended sequence back in. Repeat. That is generation.
Now, that description sounds almost too simple, and it is. The simplicity hides two things that matter enormously. First, the scale. These models are trained on enormous amounts of text and have billions or trillions of parameters. Second, the behaviour that emerges at that scale. A model trained only to predict the next token ends up able to follow instructions, answer questions, translate, reason in limited ways, and write code. Nobody hand-coded those behaviours. They appeared because predicting the next token well, across enough diverse text, requires building internal representations of language, facts, and patterns of argument.
So here is your first mental model. Think of a large language model as a very strong autocomplete. You know the autocomplete on your phone, the one that suggests the next word when you type a message. A large language model is that same idea, scaled up dramatically and trained on far more data, to the point where it can autocomplete entire essays, code files, and conversations in a way that stays coherent over long stretches.
That autocomplete framing is useful, but it can mislead you if you take it too literally. Let me sharpen it. The model is not looking up a stored sentence and repeating it. It is generating new text, token by token, based on statistical patterns learned during training. When it writes something fluent and relevant, it is because those patterns are rich enough to produce language that fits the context you gave it. It is pattern completion at a very sophisticated level.
This is where people often get the wrong mental model, and I want to spend a moment fixing that. A large language model is not a database of facts. It does not have a table somewhere with the capital of France stored in a row. During training, it adjusted its parameters so that, given prompts about France and capitals, it tends to produce the token Paris. That looks like recall, and for common facts it usually works. But it is generation, not retrieval. This distinction matters because it explains why the model can be confidently wrong. There is no lookup step that fails cleanly. There is only generation, and generation can produce text that sounds right but is not.
A large language model is also not a guaranteed reasoning engine. It can do impressive reasoning-like behaviour, especially when prompted well, and we will get to chain of thought in a later lesson. But the underlying mechanism is still next-token prediction. It does not pause, run a proof, and then output the result. It produces tokens one at a time, and sometimes those tokens form a correct chain of reasoning, and sometimes they do not. Treat its reasoning as something to check, not something to trust blindly.
Let me give you a concrete example to carry with you. Suppose you type, The capital of France is. A keyword search engine would go and find pages that contain those words and return links. It would not complete the sentence. A large language model, by contrast, generates the next token. Given that input, the most likely next token is Paris. It writes Paris. It did not search the web. It did not open an encyclopaedia. It produced the token that, according to its training, best continues that sequence.
Now extend that example. Suppose instead you write, Explain to a twelve-year-old why the sky is blue, and keep it under one hundred words. A search engine cannot do this. It can find pages about Rayleigh scattering, but it cannot compose a fresh explanation tailored to a twelve-year-old in under one hundred words. A classical chatbot, the old kind built from hand-authored decision trees, could not do this either. Someone would have had to write a branch for sky questions, a branch for twelve-year-old reading level, and a pre-written answer. It would be rigid and narrow.
A large language model can do it because it has learned, across vast amounts of text, the patterns of explanation, the patterns of simple language, and the patterns of following constraints like word counts. It composes a new answer, token by token, that fits all of those patterns at once. That is genuinely powerful, and it is also why the output can be fluent and wrong at the same time. Fluency and correctness are different properties, and the model optimises for fluency and plausibility, not for truth.
Let me draw the contrast with a classical chatbot more sharply, because this is a common point of confusion. A classical chatbot is a system where engineers and content authors write rules. If the user says X, respond with Y. If the user mentions billing, route to the billing subtree. The behaviour is hand-authored. It is predictable, inspectable, and limited to what someone thought to write. A large language model is different. Its behaviour is learned from data during training. Nobody wrote a rule that says, when asked about the sky, explain Rayleigh scattering simply. The model acquired that capability by learning patterns across huge amounts of text. This is why it can handle questions its creators never anticipated, and also why it can surprise you in ways a rules chatbot never would.
The contrast with keyword search is equally important. Search retrieves. It finds documents that match your query and ranks them. It does not compose. A large language model composes. It produces new wording that may never have existed in its training data. That is the source of its flexibility, and also the source of its risk. When search returns a bad result, you can see the source and judge it. When a language model returns a fluent answer, the source is implicit in the parameters, and you have to judge the answer on its own merits.
So what should you carry in your head? Three things. First, a large language model is a next-token predictor trained at enormous scale, and that simple objective produces surprisingly rich behaviour. Second, it is not a database and not a reasoning engine. It generates fluent text by statistical pattern completion, which means it can be both impressive and wrong in the same breath. Third, it differs from search because it composes new text rather than retrieving existing pages, and it differs from classical chatbots because its behaviour is learned rather than hand-authored.
If you want one sentence to reuse when someone asks you what a large language model is, try this. A large language model is a very large statistical model trained to predict the next piece of text, which at sufficient scale learns to generate fluent, context-relevant language and follow instructions, but which is neither a store of verified facts nor a reliable reasoning engine. That is a mouthful, but it is honest, and it will keep you out of trouble.
On the next walk, we will look at tokens and context more closely, because understanding how the model sees your input as a sequence of tokens, and how much context it can hold, changes how you prompt it. For now, let the autocomplete framing settle. It is stronger than it sounds, and it will keep you grounded as we go deeper.
02 — Refresh
Short recap. · 1.0 MB
Spoken script — useful when names or terms sound ambiguous.
Here is your quick recap of what a large language model actually is.
A large language model is a model trained to predict the next token in text, at enormous scale. A token is a small chunk of text, roughly a word or part of a word. The model takes a sequence of tokens, predicts what should come next, appends it, and repeats. That is generation.
The useful mental model is a very strong autocomplete. Like the autocomplete on your phone, but trained on vastly more data and at vastly larger scale, to the point where it can follow instructions, answer questions, and write code.
It is not a database of facts. It does not look things up in a table. It generates text based on statistical patterns learned during training. That is why it can be confidently wrong. There is no clean lookup failure, only generation that sometimes produces plausible but incorrect text.
It is also not a guaranteed reasoning engine. It can do reasoning-like behaviour, but the mechanism is still next-token prediction. Treat its reasoning as something to check, not something to trust blindly.
It differs from keyword search because it composes new wording rather than retrieving existing pages. It differs from classical chatbots because its behaviour is learned from data, not hand-authored as decision trees.
Your one-sentence definition to reuse: a large language model is a very large statistical model trained to predict the next piece of text, which at sufficient scale learns to generate fluent, context-relevant language and follow instructions, but which is neither a store of verified facts nor a reliable reasoning engine.
A large language model is a model trained to predict the next token in text, at enormous scale. A token is a small chunk of text, roughly a word or part of a word. The model takes a sequence of tokens, predicts what should come next, appends it, and repeats. That is generation.
The useful mental model is a very strong autocomplete. Like the autocomplete on your phone, but trained on vastly more data and at vastly larger scale, to the point where it can follow instructions, answer questions, and write code.
It is not a database of facts. It does not look things up in a table. It generates text based on statistical patterns learned during training. That is why it can be confidently wrong. There is no clean lookup failure, only generation that sometimes produces plausible but incorrect text.
It is also not a guaranteed reasoning engine. It can do reasoning-like behaviour, but the mechanism is still next-token prediction. Treat its reasoning as something to check, not something to trust blindly.
It differs from keyword search because it composes new wording rather than retrieving existing pages. It differs from classical chatbots because its behaviour is learned from data, not hand-authored as decision trees.
Your one-sentence definition to reuse: a large language model is a very large statistical model trained to predict the next piece of text, which at sufficient scale learns to generate fluent, context-relevant language and follow instructions, but which is neither a store of verified facts nor a reliable reasoning engine.