ChatGPT, Claude and Gemini all sit on the same idea, and it is simpler than most people assume. This post explains what a large language model actually computes, and — just as usefully — what it does not.
A large language model predicts the next token

Give it “The cat sat on the” and it produces a probability distribution across its entire vocabulary — roughly 100,000 possible tokens. “mat” scores high, “moon” low. One token is picked, appended to the text, and the whole thing runs again.
This is why responses stream in word by word: the words are not sitting in a buffer waiting to be sent. They are being computed as you watch.
Why “large”
Two things are large: the training data and the parameter count.
Nothing in the arithmetic differs from the small neural network covered earlier on this site. The weights are still learned by backpropagation and gradient descent. There is simply vastly more of everything.
How it is trained
Pre-training is the expensive stage. Take a huge amount of text, hide the next token, ask the model to predict it, and correct it when wrong — billions of times. The labels come free, because the text itself supplies the right answer. That is why so much text can be used: nobody has to annotate it.
What makes this interesting is that predicting text well requires learning a great deal incidentally. To finish “The capital of France is ___” you need a fact. To finish “The opposite of hot is ___” you need semantics. To close an open bracket correctly twenty lines later you need structure. None of it was taught directly; it was all absorbed in service of next-token prediction.
Fine-tuning and alignment come after. A raw pre-trained model simply continues text — ask a question and it might reply with more questions, because that is a plausible continuation. Instruction tuning and human feedback shape it into something that answers. See fine-tuning vs prompting vs RAG.
Temperature: why the same question gives different answers
🧪 Picking from the distribution
Temperature 0 — always take the highest-probability token. Deterministic and repetitive.
Temperature ~0.7 — sample proportionally. Varied, natural, the usual default.
Temperature 1.5 — flatten the distribution, making unlikely tokens more competitive. Creative, and increasingly incoherent.
Ask the same question twice and get different answers, and this is why: the model was identical, the sampling was not.
What a large language model cannot do
⚠️ The limits worth understanding
- It has no facts database. Information is spread across billions of weights, not stored in retrievable records. A confident, fluent, wrong answer is produced by the same mechanism as a right one — which is why hallucination is not a bug that can simply be patched out.
- It does not know what it does not know. Fluency and accuracy are separate things, and the model has no reliable internal signal for the difference.
- Its knowledge has a cutoff. Nothing after training exists to it unless you supply it in the prompt.
- Arithmetic is genuinely hard for it. It predicts plausible-looking digits rather than calculating. This is why models are given calculators as tools.
- Context is finite. Beyond the context window, earlier text is simply gone.
Does next-token prediction count as understanding?
This is genuinely contested, and it is worth being honest that nobody has settled it.
One view: it is sophisticated pattern-matching over text statistics, and the appearance of reasoning is a reflection of reasoning present in the training data.
The other: to predict text this well you must build internal representations of the things the text describes, and it is unclear what would distinguish that from understanding.
You do not need to resolve it to use these systems well. What matters practically is the behaviour: excellent at language, unreliable on facts, and worth verifying whenever the answer matters.
🔑 Key Takeaways
- A large language model outputs a probability for every possible next token — nothing more.
- Everything it appears to do emerges from doing that very well, repeatedly.
- Pre-training needs no labels, because the text supplies its own answers.
- Temperature controls how the next token is chosen, and explains varying answers.
- It has no facts database, so confident wrong answers come from the same mechanism as right ones.
Further reading
Andrej Karpathy’s Neural Networks: Zero to Hero builds a small language model from scratch in Python, and Attention Is All You Need is the 2017 paper that introduced the architecture every modern LLM uses.
Where to go next
- Tokenisation — the next post: how text becomes numbers
- What is a neural network? — the foundation underneath
- What is a transformer? — the architecture that made this possible
- Start Here — the full learning path