The full story
The episode's narration, word for word. Numbers link to the sources below; timestamps play that moment.
The question 0:00
Last time, we saw data, chips and better methods make AI suddenly good at recognising pictures. But a chatbot writes back whole sentences, in good grammar, on almost any topic. So what is it actually doing? The answer sounds far too simple. It guesses what comes next, then does it again, and again 1,2. Let's see why that trick goes so far, and where it breaks.
A guessing game 0:28
The idea is far older than chatbots. In 1951, the American mathematician Claude Shannon asked a person to guess a passage of text one letter at a time, guessing again after each miss 3. The passage began, there is no reverse on a motorcycle 3. Out of a hundred and two letters and spaces, the guesser got seventy-nine right on the very first try 3. Shannon's point was that anyone who speaks a language carries an enormous, unspoken knowledge of what tends to come next 3.
A machine made of books 1:03
Three years earlier, Shannon had run the game in reverse, to write text instead of guessing it 4. He opened a book at random, found a word, and wrote down the word that came after it. Then he opened another page, found that new word, and copied whatever followed, over and over 4. The result began: the head and in frontal attack on an English writer that the character of this point is therefore another method 4. Each little stretch sounds like English, but the whole is nonsense 4.
A tiny model you can check 1:36
We can build Shannon's machine in a few lines of code. Give it five short sentences about kookaburras, magpies and gum trees, and count which word followed which. After "the", it saw kookaburra three times, old twice, sun twice, and a few others once. Now write one word at a time, choosing each next word in proportion to those counts. Ours wrote: the old magpie laughed at the hot sun. That sentence is in none of the five. Run it again, and you might get: the sun sat in the kookaburra. Every pair of words is fine, but the whole is silly, just as Shannon found 4.
From counting to a network 2:20
Counting only works for short stretches 4. Look back ten words instead of one, and almost every stretch is new, so there's nothing to count 5. In 2003, Yoshua Bengio and colleagues called this the curse of dimensionality, and proposed a fix: train a neural network to predict the next word instead 5. That's the network from episodes three and four. Today's chatbots still do that same job, at vastly greater scale 1,6,7.
Not letters, not words 2:52
But a next what, exactly? Letters would make every text very long, and whole words can't cover every name, typo and new word 8,1. So language models use something in between, called tokens 8,1. A token is a chunk of text: often a whole common word, sometimes a piece of a word, sometimes a single character 9,7.
A real split 3:15
Here's a real tokenizer at work. This is the one OpenAI published with its GPT-2 model in 2019, run on a sentence of ours 1,10. It cuts the sentence into fourteen tokens. Common words like laughed and afternoon come whole, and so do Adelaide and unbelievably. But kookaburra, a rarer word, comes out in five pieces 8,10. Each token is really a number, and those numbers are all the network ever sees 10,7.
Where tokens come from 3:49
The method behind it was adapted in 2015 by Rico Sennrich, Barry Haddow and Alexandra Birch, for machine translation, from an old data-compression trick called byte pair encoding 8. GPT-2 borrowed it four years later 1. Start with single characters. Find the pair that sits side by side most often in a mountain of text, glue it into one new token, and repeat, tens of thousands of times 8,1. GPT-2 ended up with about fifty thousand tokens 1. Meta's Llama 3, in April 2024, used about a hundred and twenty-eight thousand 11. As of October 2026, Google and OpenAI both put a token at roughly four characters of English 12,9.
Scores for every token 4:41
Now the prediction itself. Feed in the tokens so far, and the network gives back a score for every token in its vocabulary 1. For GPT-2, that's about fifty thousand scores, every single time 1. A step called softmax turns those scores into probabilities that add up to one 13. Take: the kookaburra sat in the old gum. With made-up scores for five candidates, tree comes out at about seventy-seven per cent, trees at ten, and three others share the rest 13.
Pick one 5:16
So which does it write? The obvious choice is the top one, every time. That's called greedy decoding, and it tends to get stuck, repeating itself 2. One 2019 study called the result bland and strangely repetitive 14. The alternative is to sample: pick at random, but weighted by the probabilities, like a die with more faces for likelier tokens 2. Usually it lands on tree, but now and then on something else.
Temperature 5:48
How weighted is the die? That's set by a number called temperature. Before the softmax, every score is divided by it 13. A low temperature sharpens the differences. At nought point two, tree gets virtually every roll, and as it nears zero, it's the same as always picking the top token 2. A high temperature flattens them. At two, tree drops to about forty-nine per cent, and even stump gets more than eight 13. Ten rolls each: tree every time at the low end, a mix at the high end.
The dial in real products 6:24
Companies that sell these models describe the dial differently. Mistral's documentation suggests keeping it between nought and nought point seven 15. Google's says its newest Gemini models ignore custom temperatures altogether 6. And both Google and Anthropic warn that even at zero, the same question can still give slightly different answers 7,16. That's as of October 2026, and it changes often.
One token at a time 6:53
Now the loop. The chosen token is stuck on the end of the text. Then the whole thing, your question plus every token written so far, goes back through the model to get the next one 1,2. Pick, append, repeat, until it picks a token that means stop 10. So the answer isn't composed first and then typed out 1,2. It's built as it goes, which is why replies can appear a few words at a time, and companies even measure the time to the first token 7.
So what's a large language model? 7:25
A language model is anything that predicts the next token like this 1,5. Large means the network has a huge number of parameters, the adjustable numbers from episodes three and four, trained on a huge amount of text 17. There's no official cut-off 17. GPT-2, in 2019, had one and a half billion parameters 1. GPT-3, in 2020, had a hundred and seventy-five billion 18. Meta's largest Llama 3.1, in July 2024, had four hundred and five billion 19. The models behind chatbots such as ChatGPT, Gemini, Claude and DeepSeek, and open models such as Meta's Llama and Mistral's, are of this kind 17,9,15,7,11,20.
Why it's so powerful 8:14
The GPT-2 researchers' bet was that to predict the next token well across everything people write, a model would pick up grammar, facts, styles and formats along the way 1. In 2019, they found their model starting to answer questions and translate without being trained for either 1. In 2020, GPT-3 could do many tasks from just a few examples typed into the prompt 18.
Parrot, or something more? 8:41
Does that mean it understands? Researchers disagree 21,22. In 2021, the linguist Emily Bender, Timnit Gebru and colleagues called a language model a stochastic parrot, stitching together patterns of words it has seen, without any reference to meaning 21. In 2023, Kenneth Li and colleagues trained a model only to predict legal moves in the board game Othello 22. It was never shown the board, yet they found evidence it had built an inner picture of one anyway 22. That debate is still running.
No reverse gear 9:17
Now the limits. Remember Shannon's motorcycle: there's no reverse 3. In the basic loop, once a token is written, everything after is predicted from it, and nothing goes back to fix it 1,2. One workaround is to write the working out first 23. In 2022, researchers found that asking for intermediate steps improved reasoning in large models 23. Since then, some models have been trained to do it at length before answering: OpenAI's o1 series, in 2024, then DeepSeek's R1, in January 2025 20. And a likely sentence is not always a true one, but that's episode nine.
Tokens hide the letters 10:02
The tokens themselves cause trouble too. Typed on its own, strawberry reaches GPT-2 as three chunks; in the middle of a sentence, it's a single token 10. Either way, the model never directly sees the letters 10. In a December 2024 study, most of the language models tested couldn't count a letter that appears more than twice in a word, though researchers disagree on how much tokens are to blame 24,25. Numbers get chopped up as well, here into one-two-three, four-five, six-seven 10. In a 2024 study, just adding commas to numbers, so the chunks lined up properly, improved some of OpenAI's models' arithmetic a lot 26.
The part we skipped 10:47
So that's how a chatbot writes a sentence: tokens in, a probability for every possible next token, one weighted pick, and round again 1,2,13. But we treated the network itself as a closed box. Take this sentence: the trophy didn't fit in the suitcase because it was too big. To predict what comes next, a model has to work out what "it" refers to. How does it decide which earlier words matter? What is attention, and why did one 2017 paper change everything?
Sources
Every factual claim in the episode is tied to one of these. Spotted an error? Tell us.
- A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, I. Sutskever, "Language Models are… — cdn.openai.com
- P. von Platen, "How to generate text: using different decoding methods for language… — huggingface.co
- C. E. Shannon, "Prediction and Entropy of Printed English", Bell System Technical… — sites.socsci.uci.edu
- C. E. Shannon, "A Mathematical Theory of Communication", Bell System Technical… — people.math.harvard.edu
- Y. Bengio, R. Ducharme, P. Vincent, C. Jauvin, "A Neural Probabilistic Language… — jmlr.org
- Google AI for Developers, "Prompt design strategies" (Gemini API docs: temperature,… — ai.google.dev
- Anthropic, Claude Docs "Glossary": Pretraining, Temperature, Tokens, TTFT (read 15… — platform.claude.com
- R. Sennrich, B. Haddow, A. Birch, "Neural Machine Translation of Rare Words with… — arxiv.org
- Google AI for Developers, "Understand and count tokens" (Gemini API docs, last updated… — ai.google.dev
- OpenAI, gpt-2 repository: src/encoder.py (byte-level BPE) and the published 124M… — github.com
- Meta AI, "Introducing Meta Llama 3" (18 April 2024) — ai.meta.com
- OpenAI, tiktoken README (fast BPE tokeniser; lossless; about 4 bytes per token) — github.com
- G. Hinton, O. Vinyals, J. Dean, "Distilling the Knowledge in a Neural Network",… — arxiv.org
- A. Holtzman, J. Buys, L. Du, M. Forbes, Y. Choi, "The Curious Case of Neural Text… — arxiv.org
- Mistral AI, API reference: chat completion, temperature (read 15 October 2026) — docs.mistral.ai
- Google Cloud, Vertex AI "Content generation parameters" (temperature; last updated 15… — cloud.google.com
- W. X. Zhao et al., "A Survey of Large Language Models", arXiv:2303.18223 (v19, March 2026) — arxiv.org
- T. B. Brown et al., "Language Models are Few-Shot Learners" (GPT-3), arXiv:2005.14165… — arxiv.org
- Meta AI, "Introducing Llama 3.1" (23 July 2024) — ai.meta.com
- DeepSeek-AI, "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via… — arxiv.org
- E. M. Bender, T. Gebru, A. McMillan-Major, S. Shmitchell, "On the Dangers of… — doi.org
- K. Li, A. K. Hopkins, D. Bau, F. Viégas, H. Pfister, M. Wattenberg, "Emergent World… — arxiv.org
- J. Wei et al., "Chain-of-Thought Prompting Elicits Reasoning in Large Language… — arxiv.org
- T. Fu, R. Ferrando, J. Conde, C. Arriaga, P. Reviriego, "Why Do Large Language Models… — arxiv.org
- A. Cosma, S. Ruseti, E. Radoi, M. Dascalu, "The Strawberry Problem: Emergence of… — arxiv.org
- A. K. Singh, DJ Strouse, "Tokenization counts: the impact of tokenization on… — arxiv.org
Researched and scripted with AI assistance, fact-checked claim by claim, with synthetic narration and diagrams drawn in code. How we make episodes.