Next-token prediction trains a language model to guess the next word or token from the sequence that precedes it. This makes the model an extremely capable autocomplete: it continues text according to the patterns and probabilities learned from its training data. section 16.3.1
Prompting changes the likely continuation
A short prompt such as “A piece of advice” produces a vague continuation. A prompt beginning “The following brownie recipe is easy to make in just a few steps. You can start by” leads to instructions about melting butter and sugar, because a recipe is the more likely continuation. The model is not interpreting the request conversationally; it is selecting a probable continuation of the supplied text. section 16.3.1
Next-token prediction explains several practical properties of language models:
- It can produce coherent text without guaranteeing useful or intentional answers. section 16.3.1
- Longer prompts and explicit role or format instructions can steer the distribution of likely continuations. section 16.3.1
- It can reproduce familiar patterns while failing on genuinely novel problems or small variations that do not match learned examples. section 19.1.1
Familiarity can overpower correctness
When prompted about the nonexistent 542nd U.S. president, a model continues with the familiar name James A. Garfield. This illustrates how a plausible learned continuation can take precedence over checking whether the premise is valid. section 19.1.1








