🔍 Read the full analysis: Why Attention Makes Long Prompts More Expensive For LLMs on ThorstenMeyerAI.com
Get the latest gadgets delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
TL;DR
An explainer published by ThorstenMeyerAI.com on Nov. 22, 2026, describes why longer LLM prompts can require more computation and memory. Full attention grows roughly with the square of prompt length, while a larger context window does not guarantee that a model will retrieve information equally well from every position.
ThorstenMeyerAI.com published an explainer on Nov. 22 describing why long prompts can be more expensive for large language models (LLMs), even as some vendors advertise context windows around one million tokens. The article points to the quadratic scaling of full attention, the memory used to retain prior computations, and research showing that models may be less reliable at using information placed in the middle of a long document.
In a Transformer using full self-attention, each token can be compared with every other token in the sequence. The article cites the Transformer paper by Vaswani and colleagues, which gives the attention layer’s scaling as O(n² · d), where n is sequence length and d is the representation dimension. Holding other factors constant, doubling the sequence length means roughly four times the attention work—not merely twice as much.
The article also describes the KV cache, which stores key and value computations for tokens already processed so the model can reuse them while generating an answer. That avoids recalculating earlier work for every new output token, but the cache grows as tokens are added and consumes memory. A prompt’s token count can also differ from its apparent word count because tokenizers split text into pieces; the source says Anthropic’s newer tokenizer produces approximately 30% more tokens for the same text than its previous tokenizer, according to the company’s pricing page.
Long context can bring a separate reliability issue. The source summarizes the “Lost in the Middle” study: GPT-3.5-Turbo answered correctly 75.8% of the time when the relevant document appeared first, compared with 53.8% when it appeared in the middle and 56.1% with no documents. Those figures concern the study’s particular test setup; they do not establish a universal performance rate across models or tasks.
The Cost of Bigger Contexts
For people sending contracts, reports or long chat histories to an LLM, a large context limit is not the same as free or dependable analysis. More input can mean more computation, longer processing and greater memory use, while some services also charge by the token. The source says some vendors charge higher rates above specified token thresholds and that caching repeated prompts can reduce charges, though the article does not provide a complete comparison of current provider prices.
The distinction also matters when choosing how to supply information. If a model can accept a very long file, users may still need to check whether it located the passage that supports an answer. Capacity describes what can fit; it does not by itself measure how consistently a model will use every included detail. The reported middle-position results illustrate why document placement and answer verification can matter, while not proving that every model will show the same pattern.
For developers, the trade-off affects system design. Full attention is costly at long sequence lengths, while alternatives such as restricting each token to nearby text can reduce scaling demands. Such methods change which information can interact directly, so efficiency and access to distant details must be weighed together.
Products Worth Considering

Sonos Era 300 Wireless Smart Speakers with Dolby Atmos, Black, 2-Pack

LG UltraGear 27-inch 4K UHD IPS Gaming Monitor, Dual Mode 180Hz/360Hz, 1ms, G-SYNC Compatible

Logitech MX Brio Ultra HD 4K Webcam
As an affiliate, we earn on qualifying purchases.
From Training Windows to Prompt Limits
The explainer distinguishes a training sequence from a model’s context window at use time. During training, text is tokenized and divided into fixed-length sequences. The 2020 GPT-3 paper says its model trained on full 2,048-token context sequences, combining shorter documents where needed. A causal mask prevents a position from using later tokens when learning to predict the next token.
At inference time, the context window acts as working memory: it can include instructions, the user’s prompt, prior conversation, attached material and the answer being generated. All of those tokens count toward the available space. The source lists 2,048 tokens for GPT-3 in 2020 and, as of Nov. 22, 2026, windows around one million tokens for several flagship offerings from Anthropic and Google, with OpenAI’s listed GPT-6.2 Astra and Sol at 1,050,000 tokens, including up to 922,000 input tokens. These are figures reported by the source from vendor pages and should be understood as advertised limits, not independent measures of performance.
The source also contrasts full attention with sliding-window attention, in which a token attends to a limited neighborhood rather than the entire sequence. The Longformer paper describes this approach as a response to the quadratic scaling of standard self-attention. A fixed neighborhood can make work grow more nearly in proportion to sequence length, but it limits direct attention between far-apart tokens.
What Token Limits Do Not Tell Us
The source’s model-window figures are a snapshot dated Nov. 22, 2026 and rely on vendor documentation. The explainer does not independently test whether each model can process its full advertised window effectively, nor does it compare quality across providers on a shared set of long-document tasks. A maximum context size is not a guarantee of reliable retrieval.
The cited study’s accuracy results also apply to its own model, materials and evaluation method. The source does not specify enough detail here to generalize the percentages to every kind of document or current model. Actual processing time and charges can vary by provider, tokenization, prompt structure, caching and service tier; a universal cost per prompt is not supplied.
Check Limits, Pricing and Retrieval
Readers evaluating a long-context service can check its current documentation for input and output limits, token-counting rules, pricing tiers and cache policies, since these details may change. For consequential document work, the practical next step is to test retrieval using relevant passages placed at different positions and verify answers against the original text. The source does not announce a new product or benchmark; it presents an explainer, and its vendor figures should be checked against current provider materials before use.
Key Questions
Why can doubling a prompt take more than twice the attention work?
With full self-attention, each token is compared with every other token. The cited scaling rule is quadratic in sequence length, so doubling the tokens means roughly four times the attention work when other factors remain constant.
What does an LLM context window include?
It includes the text available to the model while generating a response: instructions, the current prompt, conversation history, attached documents and generated output. The output uses part of the same limit.
Does a one-million-token window mean the model will read every detail well?
No. A large window describes how much text can fit, not how accurately the model will find or use each detail. The source cites a study in which GPT-3.5-Turbo performed worse when relevant material appeared in the middle of a document, but that result is tied to the study’s test setup.
What is the KV cache?
The KV cache stores key and value computations for previously processed tokens so the model can reuse them during generation. It can reduce repeated computation, but its memory use grows with the number of tokens.
Can sliding-window attention reduce long-prompt costs?
It can reduce attention work by limiting which neighboring tokens each token considers, rather than comparing every token with the whole sequence. That efficiency comes with a trade-off: distant parts of the text may not interact directly in the same way as under full attention.
Source: ThorstenMeyerAI.com
