- Glossary
- Attention
Glossary term
Attention
The mechanism that lets each token weigh every other token in the context when building its representation.
Open lesson 2.3
The transformer and attention, in pictures · Chapter 2, and 4 more lessons below
In plain words
Attention is how a model connects a pronoun to its noun or a question to the relevant passage. Its cost grows with context length, which is one reason long contexts are slower.
Taught in
- 2.3The transformer and attention, in picturesChapter 2, What an LLM is · main lesson
- 15.1Breaking a task into a chainChapter 15, Prompt chaining and multi-pass review
- 44.1Lifecycle eventsChapter 44, Hooks and the agent lifecycle
- 58.1Context engineering as a disciplineChapter 58, Context engineering
- 59.2Trimming tools and historyChapter 59, Budgeting the context window
Also in these lessons
Agent loopContext editingContext engineeringContext rotHookMulti-pass reviewPostToolUse hookPreToolUse hookPrompt chainingPrompt engineeringToken