# M01-L02 — Tokens, context, and generation

**Outcome:** Explain why repeated requests can differ and why selected context helps.

**Start:** M01-L01 and the original BenchNote passage in Chapter 2.

Tokens are units used to represent model input and output. A token is not reliably one English word; code and identifiers can divide differently. A useful simplified mental model is repeated generation of a next token from the available context. This can support useful explanations and transformations without automatically retrieving a current specification. [OpenAI key concepts](https://developers.openai.com/api/docs/concepts)

Training changes model parameters. Inference uses a model to respond to current input. Supplying a project passage during a conversation is information for that interaction, not the same operation as retraining the model. Save durable project facts in files so a later session can inspect them.

Attention lets relationships among input representations contribute to output. The original Transformer paper established an architecture centered on attention. This is a conceptual explanation, not a diagram of a particular assistant's hidden reasoning. More text does not guarantee that the governing sentence will be applied correctly. [Attention Is All You Need](https://arxiv.org/abs/1706.03762)

For the worked comparison, ask how the fictional BenchNote monitor handles invalid samples before providing the original note. Save the answer. Then provide the complete note and ask again, using only it for product-specific claims. The note says invalid samples produce FAULT and their numeric temperature cannot select OK or WARN. It intentionally leaves a recovery count unspecified.

Compare claims, not wording. A first answer that declines to guess is sound. A second answer that traces FAULT to the supplied note is grounded for that claim. Two correct answers do not establish universal reliability, and repeated agreement on an invented rule does not establish truth. Keep the exact request and source alongside the comparison so you know what changed.

![Training adjusts model parameters; inference uses the resulting model with current context. Supplying a project note is not the same as retraining.](../../../../book/figures/D02.png)

*D02. Training adjusts model parameters; inference uses the resulting model with current context. Supplying a project note is not the same as retraining.*

![The current request, selected history, relevant references, and actual tool results enter bounded context. The generated answer still needs verification.](../../../../book/figures/D03.png)

*D03. The current request, selected history, relevant references, and actual tool results enter bounded context. The generated answer still needs verification.*

## Practice and completion

Complete the [exercise](exercise.md), then compare your artifact with the separately distributed instructor answer. A lesson acknowledgment records your own progress; it does not certify that a physical test occurred.

## Reading and figures

[Chapter 2](../../../../book/chapters/ch02/chapter.md). Resources: [Original BenchNote note](../../../../book/chapters/ch02/resources/benchnote-note.md) and [original reference responses](../../../../book/chapters/ch02/resources/reference-responses.md). Figure references: SS02-01–03; D02–03. 
