How AI Knows Which "Bank" You Mean

Cascade Insights · AI explainer series

How AI Knows Which "Bank" You Mean

How a model works out what a word means, shown on a word you can watch move

"Bank" doesn't know what it means yet. A language model stores every word as a point in a . That stored spot is the word's . When a sentence arrives, lets the neighboring words pull the point to wherever it belongs in this sentence.

New to the vocabulary? Tap any dotted term for a plain-language definition, or .

Pick an example
Quoted sentences
Teaching cases These labels describe what each example demonstrates. They are not quotes from the sentences. Each one was written to isolate a single behavior: no clues at all, clues pointing the wrong way, a deciding word that gets ignored (plus what real models add to fix that), a signal that gets diluted, and a one-word swap that flips the answer. The sentence itself always appears below.

Click a clue word to cover it up and watch its pull vanish. Hover any word to find it on the map. The small number under each word is its attention weightFor every word it processes, the model scores how relevant each neighbor is, then squashes those scores so they sum to 100%. The resulting percentages are attention weights: the mixing recipe deciding how much each neighbor contributes to the word's updated meaning. A real layer computes many recipes side by side, one per attention head. This page shows a single one, with numbers hand-tuned for teaching, but the shape of the calculation is real., meaning how hard it pulls on bank.

WATER & RIVERBANKS MONEY & FINANCE grammar words point at structure rather than things, so they barely pull
Nearby means similar. Only the distances matter here, not the axes themselves.Real embeddings live in thousands of dimensions. This flat map is a stand-in so your eyes can follow the motion. Two things survive the flattening, and they happen to be the two that matter: similar meanings sit close together, and context moves the point. ◌ dictionary spot  ·  ● where context moved it

River senseambiguousMoney sense

What just happened, in three moves

These are the three steps the Step through the pull button plays on the map. That is the whole trick, and it is the calculation the 2017 paper "Attention Is All You Need" takes its title from, run once for one word. The three moves happen in order, each one needing the result of the last.

1

Score every neighbor

The word bank asks every other word in the sentence how relevant are you to me? "River" scores high. "The" scores almost nothing. Those scores come straight out of the themselves, with no rulebook and no grammar involved. Nothing measures similarity directly. The comparison runs through .

2

Turn scores into weights

The scores get , producing the recipe printed under each word above. One loud neighbor can claim most of the mix, or the pull spreads thin when nothing commits. Real layers run many of these budgets at once, one per , so a word ignored in one can decide the outcome in another.

3

Blend, and overwrite

The word's vector gets rewritten as a weighted blend: mostly its own dictionary spot, plus a dose of every neighbor in proportion to its weight. The blended point you watched travel is the word's , and it is what the rest of the model reads. Nothing touches the stored itself. Only the working copy changes.

Your jargon starts in the wrong place

Everything above used a word whose two senses are both common in ordinary writing, so its dictionary spot sat neatly between them. The words your industry runs on are not like that. In the , churn is overwhelmingly something that happens to cream rather than to customers. Its frozen spot therefore starts inside the everyday cluster instead of between the two, and business context has to drag it out.

Same mechanism, different word
EVERYDAY SENSE BUSINESS SENSE grammar words
◌ churn's dictionary spot sits inside the everyday cluster, not between the two. ● where context moved it

That is the mechanical case for feeding a model your domain: a glossary, , a few worked examples, a . Beyond helping it pick between two readings, you are overcoming a built from text where your meaning of the word barely appears. It also explains why a general-purpose model handles your own industry's vocabulary worst of all, and why it stays every bit as fluent while getting it wrong.

Why this one idea carries so much weight

The dictionary spot is a compromise

Frozen "bank" sits between its meanings and close to neither, because it is the average of every sentence the word ever appeared in. That average is why the un-moved point floats in no-man's-land, and why a model that stopped there would understand nothing precisely.

Pronouns are the extreme case

"It", "she" and "they" carry almost no dictionary meaning. Nearly everything they mean in a sentence arrives by attention, pulled in from whatever they refer to. A pronoun is a point that travels the whole map.

Every word does this, in parallel

You watched one word through one channel. A real layer runs dozens of attention heads at once, each with its own separate 100% budget. Some follow topic, others follow grammar, position, or what a pronoun refers to. A word that is nearly silent in the topical head can dominate the structural one. Every runs all of this simultaneously, so "river" is being sharpened by "bank" at the same moment.

Depth is what makes it work

This map blends raw dictionary points a single time. A (the T in GPT) stacks that operation dozens of deep, and after the first pass it is no longer blending words but the results of earlier blends. That is how "not the river" gets composed into one unit meaning excluding river-ness before anything attends to it. A single pass has no way to build something like that.

Four ways one pass goes wrong

Each teaching case above isolates a specific weakness of a single attention pass:

No signal
Nothing commits, so the point stays at its average, and the average is the most common reading. Real models do this too.
Wrong signal
A loud but irrelevant word drags the point to the wrong sense without any hesitation. Real models are better at this, though not immune.
Ignored operator
"Not" flips the meaning and weighs almost nothing, because it works structurally rather than topically. Depth and separate heads fix this . The demo shows the problem they were built to solve.
Diluted signal
Weights inside a head must total 100%, so harmless filler steals from the words that matter. Real models are for the same reason.
What this page gets wrong on purpose. It is a teaching cartoon rather than a model. Real embeddings have instead of two, the positions and weights here are hand-placed, and real attention runs many heads in parallel across many layers, following grammar and position as well as topic. Those differences matter most in the negation case above, the only example here where this map and a working model disagree. What the page does get right is the architecture of the idea: meaning as location, attention as the force that moves it. Plenty of failures live elsewhere in the system, including invented facts, arithmetic slips, and telling you what you want to hear. None of them are explained by this map.