// How these things actually work · lesson 04
Self-attention: why one word cascades
You change a single word in a prompt and get a completely different answer, and it feels disproportionate, like the model overreacted. It didn't. The mechanism underneath makes that cascade not just possible but expected.
The core operation inside these models is attention. Every token looks at every other token and asks, in effect, "how relevant are you to me?" and weights the answer accordingly. Crucially, the model does this for all tokens at once, not left to right the way you read. The whole input is present to itself simultaneously, every piece pulling on every other piece.
Why does changing one word ripple through the whole output?
Because that one word is now part of what every other token is attending to. You didn't nudge one spot. You changed one of the inputs to every relevance calculation in the prompt, and those calculations feed the ones after them. The change propagates through the layers. A word isn't a local edit; it's a shift in the field that all the other words are reading.
The way it sits in my head is liquidity in a DEX pool. Every trade moves the price curve for the next trade. There's no such thing as a change that only affects the thing you changed. The pool reprices around it, and everything downstream trades against the new curve.
The practical move this hands you
Fix the prompt, don't correct after it. When a model gets something wrong, the instinct is to add a follow-up: "no, I meant this." But a correction is a new token stream reacting to the flawed one, dragging all of it along. Editing the original prompt and regenerating gives you a clean, re-weighted pass where the fix is baked into the field from the start instead of bolted on after. It's the difference between re-pouring and patching.
The takeaway: attention makes every token depend on every other, so word choice is leverage and a clean re-prompt beats a pile of corrections. Change the input, don't argue with the output.