👀 Machines That Talk · Day 10

The Attention Room

To understand a word, a chatbot doesn't read straight ahead — it looks back at the other words and decides which ones matter most. That single trick is called attention, and it's the engine inside every modern AI. Click a word and watch it look.

↓ enter the room
🔗 Lab · The Attention Tracer

Click a word. Watch it look back.

Pick a sentence, then tap any word. Glowing lines shoot back to the earlier words it pays attention to — a fat, bright line means "this one really matters." The brightest target is what the word is really about.

👆 Tap any word above. Attention only ever looks backward at words that already came — just like you do when you hit a "her" or "it" and glance back to figure out who it means.

🟡 the strongest link (what it's mostly about)   🔵 weaker links it also peeks at.

🐞 Break-It Challenge

Make attention get lost

Some sentences are genuinely impossible — the answer isn't in the words. Here, who is “she”? Zoe, who told? Or Maya, who was told? Hit the button and watch attention split down the middle, unsure.

The lesson: when both links are equally bright, the model is guessing. Ambiguous language is genuinely hard — a human would ask "wait, who?" and the AI can pick the wrong one. Even attention can't invent an answer the sentence never gave.
🏷️ The pro wordDeciding which earlier words matter is called attention — and when a sentence looks at itself this way, it's self-attention. Stack a whole net of these attention layers on top of each other and you get a Transformer — the exact engine humming inside ChatGPT, Claude, and Gemini.
🎯 Boss Build · Who Is “it”?

Be the attention detective

The glowing purple word is a pronoun — it stands in for something said earlier. Click the word it really points to. Solve 3 to earn your final badge.

Solved: 0 / 3
🚀 Beyond the Basics

How the pros really do it

Your tracer looks at the whole sentence at once — that's the real leap. Here's the ladder from yesterday's guesser up to a true Transformer:

👣

Peek at the last word only (n-gram · Day 9)

Predict the next word from just the previous one or two. ✅ Tiny & fast. ⚠️ Forgets everything older — it loses the thread of who "she" or "it" was.

🔗

Look at the WHOLE sentence (what you built)

Weigh every earlier word and focus on the ones that matter. ✅ Catches references across the whole line. ⚠️ More words = more compute to compare.

🧠

Many looks, stacked deep (the real deal)

Run many attention "looks" at once, layer them dozens deep, and give every word a meaning-vector. ✅ Powers every chatbot. ⚠️ Needs oceans of data + compute.

🏷️ Pro names to look upWeighing every word is self-attention; running many looks at once is multi-head attention; a stack of them is a Transformer; and each word's meaning-vector is its embedding. It all comes from one famous 2017 paper: “Attention Is All You Need.”

🎉 Day 10 Complete!

You cracked the trick behind every modern chatbot: to understand a word, the model looks back and decides which other words matter — that's attention. Stack it deep and you've got a Transformer. You now know the real engine inside ChatGPT.

Day 11: The AI Cash Register →
Tomorrow: every one of these attention looks costs tokens — so we ring it all up at the AI cash register. 🧾
AI Adventure · Machines That Talk · Day 10 — made for young inventors 🚀