AI, Actually ExplainedLesson 23 of 92

Module 3 · What a chatbot is actually doing

Attention, without a single equation

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 4 of 11 in this chapter

This chapter’s goalTrace text through tokenisation and next-token generation, distinguish training from inference, and explain how attention, decoding, context management, retrieval and product controls affect an assistant. Check sources instead of treating fluent answers or citations as proof.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmWatch11:01Watch12:27
Full audiobookNot availableNot available
Dense attention: a scaling illustration0250500100016000Tokens in the contextRelative n-squared pair-count proxy—— Comparisons between tokensThe plotted values use a simple squared-length proxy: one thousand tokens is the reference, anddoubling length multiplies the proxy by four. Dense causal whole-sequence attention has a roughlyquadratic pair count. These are illustrative values, not runtime or billing measurements. Caching,other model operations, attention variants and hardware affect actual costs.
The plotted values use a simple squared-length proxy: one thousand tokens is the reference, and doubling length multiplies the proxy by four. Dense causal whole-sequence attention has a roughly quadratic pair count. These are illustrative values, not runtime or billing measurements. Caching, other model operations, attention variants and hardware affect actual costs.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

The problem it solves

Read this sentence: The trophy would not fit in the suitcase because it was too big.

What does “it” refer to? The trophy. Now change one word: ...because it was too small. Now “it” is the suitcase. Nothing about the position of the word changed; the meaning of a nearby word flipped the reference.

A language system needs ways to connect related parts of a sentence. Attention is one important mechanism for doing that. The 2017 Transformer combined self-attention with other components in an architecture that made highly parallel training practical; it was not the first use of attention or the sole cause of later progress.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Meenal, your AI tutor

How to cite: Addaly (2026) ‘Attention, without a single equation’, in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/attention-what-it-does (Accessed: 29 November 2026).