A large language model (LLM) is a language model trained on enormous text collections to predict and generate language. Its core job is narrower than the hype suggests: given a prompt, it predicts what token should come next. Repeating that step produces full responses. section 1.1 section 1.34
Autocomplete that reaches surprisingly far
Given “The Eiffel,” an LLM may assign high probability to “Tower.” Given “How much is 2 + 5? It is. . .,” completing the sentence requires arithmetic. A translation prompt similarly turns next-token prediction into a translation task. section 1.1
An LLM generates an answer through a sequence of linked operations:
- Tokenizes the input into common words, word fragments, characters, and special symbols drawn from a fixed vocabulary. section 1.8
- Represents tokens as embedding vectors, then uses the transformer architecture to make each token sensitive to its context. section 1.34
- Calculates a probability for every possible next token rather than selecting a word directly. section 1.21
- Lets a wrapper choose a token, append it to the prompt, and repeat the process until a complete output is produced. section 1.21 section 1.34
Training uses machine learning to define the model’s missing parameters from large datasets. Popular LLMs are first trained automatically from public data, then refined with manually generated data to align their behavior with user objectives. section 1.1 section 1.34
An LLM is self-contained and static after training: it does not browse the web for each prediction and needs updated training data to discuss newer events. A system prompt or wrapper can add context before the user’s prompt, but that context comes from surrounding software. section 1.1 section 1.5
Table 1.1 In the last step, the LLM assigns a probability value
for each possible token in the vocabulary. All the values add to 1.
| 0.01 |
0.0 |
0.05 |
… |
0.8 |
… |
| “a” |
“b” |
“c” |
“audible” |
Use the probability table to see that the model assigns a value to every possible token; the wrapper then selects among those values. section 1.21


































































