The problem of reading in context
Words rarely mean much on their own. "It" can point to almost anything. "Bank" can be a building or the edge of a river. "Not bad" means good. People solve this without effort, by keeping the rest of the sentence, and often the rest of the page, in mind while reading each word.
Early language software read text one word at a time, from left to right, and carried a kind of running summary forward. That worked for short sentences, but the summary faded. By the end of a long paragraph, the software had largely forgotten the beginning. Attention was the idea that fixed this: instead of relying on a fading summary, let every word look directly at every other word and decide which ones matter for its meaning.
How attention works, in plain steps
First, the text is split into tokens, which are words or pieces of words, and each token is turned into a list of numbers that stands for its meaning.
Second, each token asks a question of all the others. In the model, this is done with three small sets of numbers per token, often called query, key and value. You can think of the query as "what am I looking for?", the key as "what do I contain?" and the value as "what do I pass on if you pick me?"
Third, the model compares each query with every key and gives each pair a score. High scores mean "this word is relevant to me". In "The bank was closed because of the flood", the token "bank" gives a high score to "flood".
Fourth, each token builds a new version of itself by mixing in the values of the tokens it scored highly. "Bank" now carries a hint of "river". This happens many times in parallel, in layers stacked on top of each other, so the model can pick up grammar in one place, topic in another and long-distance links in a third.
Why it changed AI
Attention became the center of a design called the transformer, described in a 2017 research paper from Google researchers. The transformer dropped the old one-word-at-a-time reading and relied on attention alone. That had two big effects.
The first was quality. Because any word can look at any other word directly, the model can connect a pronoun with a name several paragraphs earlier, or a clause on page 12 with a definition on page 2.
The second was speed of training. Reading one word at a time is hard to split across many processors. Attention compares all words at once, which suits graphics processors (GPUs), the chips that do many small calculations side by side. That made it practical to train much larger models on much more text, and it is a big reason why today's language models, including the ones behind ChatGPT, Claude and Gemini, exist at all.
The cost of looking at everything
Letting every token look at every other token has a price. If a text doubles in length, the number of comparisons roughly quadruples, because each new token must be compared with all the others. Long documents therefore need much more memory and computing power than short ones, which is a big part of why AI services charge per token and why very long inputs are slower.
Model makers use many tricks to soften this cost, and today's models can take in very long texts, such as whole reports or many documents at once. But a large context window, the amount of text a model can consider in one go, does not mean the model pays equal attention to all of it. Tests show that models can overlook details buried in the middle of a long input, especially when many similar passages compete for attention.
What attention is not
The name invites a human comparison, but attention in a model is arithmetic, not awareness. It is a way of weighting numbers so that relevant information flows to where it is needed. It does not mean the model understands the text the way a person does, and it does not mean the model focuses on what you think is important.
It also does not explain the model's choices in a simple way. Researchers can sometimes see which words a model weighted heavily, and that can hint at why it answered as it did, but attention patterns are spread over many layers and are hard to read with confidence. Treat claims such as "the model paid attention to this sentence, so it understood it" with care.
What it means for a small business
Nobody in a small business needs to tune attention. It is useful to know about because it explains several everyday experiences with AI tools.
It explains why models handle context so well: you can paste a messy email thread and get a sensible summary, because each part can be linked to the others. It explains why long inputs cost more and run slower, which matters if you pay per token or send large documents often. And it explains why stuffing everything into one prompt is not always wise. Giving the model the few relevant pages, clearly marked, usually beats handing over a hundred pages and hoping it finds the right line. Put the key instruction where it is easy to find, and ask the model to quote the passage it relied on, so you can check it.
Sources: Vaswani et al., Attention Is All You Need (arXiv, 2017)