Alberto Angulo

How AI works · Context

What Fits Versus What Gets Used

A context window tells you how much text a model can take in. How well it uses that text is a separate number, and on real questions it is often a small fraction of the first. The work that decides the answer is choosing and marking what goes in.

Alberto Angulo11 min read · 19 October 2026

A company's agreement with a supplier lives in a 200-page pack: a term sheet, the master agreement, schedules, correspondence and amendments. Someone pastes the whole thing into an AI assistant with a million-token window and asks a simple question. If we want to end the agreement early next year, how much notice do we owe?

The answer comes back fluent and specific: "90 days, per clause 4.2." The citation is correct. Clause 4.2 does say 90 days.

But on page 180 there is a signed amendment that reads "In Section 4.2, 90 is replaced by 120." The real answer is 120 days, and nothing in the model's reply tells you it never connected page 180 to page 23.

That exact pack is invented, and the failure is a prediction rather than a test run. But every step of it is a failure that researchers have measured, again and again, in every model they tested. Here is the idea behind it. A context window tells you how much text a model can take in. How well the model uses that text is a different number, and it falls as the text gets longer, less literal, and more crowded with look-alikes and old versions. So as windows grow, deciding what goes in matters more, not less.

What the window measures

A model reads text as tokens, chunks a bit shorter than a word. The context window is the maximum number of tokens it can take in for one response. As of October 2026, a million tokens is the standard window for Anthropic's current models and for Google's Gemini 3.8 Flash. That's roughly 1,600 pages of English prose.

Everything counts against that limit: the instructions, every message, every document, the descriptions of the tools the model can use, and its own output. In a chat, most of it is your document. In an agent, the software around the model (the harness) fills the window with much more. Anthropic has described a setup where the tool descriptions alone took about 55,000 tokens before the conversation started. In an agent request, the passages that actually answer the question can be under 1 percent of what the model receives.

Think of the window as the floor area of a warehouse. It tells you how much stock fits, and nothing about how fast a picker finds the right box among look-alikes. The analogy breaks in one useful place: a slow picker is still accurate, while a model stays just as fast, gives no signal about what it skimmed, and when it misses the evidence it tends to answer anyway.

The test that made long contexts look solved

The test most people have seen is the needle in a haystack. Hide one sentence (the needle) in a long, unrelated text (the haystack), ask a question whose answer is that sentence, and repeat at many lengths and depths. For frontier models the results have been almost perfect for a while. OpenAI reported "very good performance" for GPT-4.1 on this test across its full million-token window.

The same guide carried a warning that gets quoted less: performance can degrade when the model must find many items or reason over the whole context. That warning is the real story, because the needle test flatters in four ways that real work doesn't.

  • One fact. Real questions often need two or more facts combined.
  • Shared words. The question usually repeats the needle's wording, so the model can match text instead of meaning.
  • An unrelated haystack. A sentence about a magic number stands out among essays. A clause in a contract stands among hundreds of clauses that look like it.
  • One version. The haystack never contains an older, contradictory copy of the needle.

What happens when the test gets honest

Researchers spent three years removing those shortcuts one at a time. The clearest result comes from a benchmark called NoLiMa, from LMU Munich and Adobe Research, which keeps the needle and takes away the shared words.

A typical needle reads "Actually, Yuki lives next to the Semper Opera House." The question is "Which character has been to Dresden?" To answer, the model has to know that the Semper Opera is in Dresden (which it does; it answers easily when the text is short) and make that link while reading.

Guess first

Same model, same 32,000-token haystack. When the question repeats the needle's words, it scores 98.5 percent. When the answer needs one associative step, does it score barely lower, about half, or near zero?

Take one model, Llama 3.3 70B, with 32,000 tokens of haystack around the needle. When the question repeats the needle's words, it scores 98.5 percent. When the question needs one associative step, like Dresden to the Semper Opera, it drops to 56 percent. With two steps, 26 percent. Same model, same haystack, same length. Length barely touches the literal version and crushes the version that needs a single inference.

Then the authors added one irrelevant sentence that shares the question's keyword: "There was an article about Dresden in the daily newspaper." With that sentence present, GPT-4o kept its short-text accuracy only up to about 1,000 tokens of input.

The paper defines a model's effective length as the longest input at which it keeps 85 percent of its own short-text score. On these low-overlap questions, every model tested had an effective length between 16 and more than 1,000 times smaller than its advertised window. GPT-4.1, which claims a million tokens, came out at 16,000.

CLAIMED WINDOW VS EFFECTIVE LENGTH ON TWO BENCHMARKS claimed window RULER effective length (synthetic; 2024) NoLiMa effective length (2025) 1K 4K 16K 64K 256K 1M 4M tokens (log scale) GPT-4.1 2025-04-14 1M 16K GPT-4o 2024-11-20 128K 8K Gemini 1.5 Pro 2M >128K 2K Llama 3.1 70B 128K 64K 2K Command R+ 128K 32K <1K Llama 3.1 8B 128K 32K 1K Sources: Hsieh et al., RULER (COLM 2024), Table 3; Modarressi et al., NoLiMa (ICML 2025, arXiv v3), Tables 3 and 10.
How much context a model can use depends on the task, and on harder tasks it is a small fraction of the claimed window. Squares mark each model's claimed window; circles mark NoLiMa's effective length (85 percent of the model's own short-input score, little word overlap) and triangles RULER's (a fixed 85.6 percent score, literal matching across several tasks).MeasuredSource: Hsieh et al., RULER (COLM 2024; arXiv 2404.06654 v3), Table 3; Modarressi et al., NoLiMa (ICML 2025; arXiv 2502.05167 v3), Tables 3 and 10. Read 2026-10-11.

Here's the most useful detail. NVIDIA's RULER benchmark, which keeps literal matching but asks for several facts at once, gave Gemini 1.5 Pro an effective length above 128,000 tokens. NoLiMa gave the same model family 2,000. The tests differ in setup, but setup differences wouldn't plausibly produce a gap of more than sixtyfold. Effective length belongs to a model, a task and a kind of text together. When someone quotes a single number for "how much context a model can really use", that number doesn't exist.

A 2025 study by Chroma tested 18 models, including Claude, GPT and Gemini, on deliberately simple tasks and gave the pattern a name, context rot. Performance fell with input length in every experiment, even when the task was just copying out a sequence of repeated words. In the authors' words, "even a single distractor reduces performance". Anthropic's own documentation now says it plainly: "more context isn't automatically better. As token count grows, accuracy and recall degrade."

Capacity belongs to the window. Use belongs to the window, the text in it and the question together.

Models have improved since these studies; GPT-4.1 roughly doubled GPT-4o's effective length. The curves for current models are probably higher. Nothing found shows them flat.

Why more text makes the right line harder to use

The core mechanism is a competition. At every step of writing, a model decides how much weight to give each earlier token, and those weights are normalized so they add up to one. That's what engineers call attention. Relevant text has to win a share of a fixed budget against everything else in the context.

A question that repeats the needle's exact words produces a strong, unmistakable match, which is why the literal needle test survives a million tokens. An associative link such as Dresden to Semper Opera produces a weaker signal, and a weak signal is easier to drown as the number of competitors grows. That's the explanation the NoLiMa authors offer, and Anthropic's engineers describe the same idea as a limited "attention budget". It fits the data well, though nobody has traced it component by component inside a model.

Four more mechanisms pile on top, and each one shows up in real documents:

Distractors look relevant. Text that shares words or topic with the question draws weight the answer needed. Real collections are full of them: drafts, neighboring clauses, last year's policy.

Old and current versions look the same. A model has no built-in way to know that one paragraph supersedes another. Everything in its context carries the same apparent authority unless the text itself says otherwise. Which version is signed, which is current and which is a draft are facts about the world, and no amount of model capability infers them reliably from text that doesn't state them.

Summaries drop details. Long sessions survive by compaction: the harness replaces older turns with a summary. Anthropic's documentation says documents and fetched pages inside the summarized turns are gone afterward. A later step may need exactly what the summary judged unimportant.

Gaps get filled. When the evidence is buried, a model asked a question tends to produce an answer anyway, assembled from nearby text or general knowledge. For most work, "I can't find this" is the more valuable failure, because someone can act on it.

The contract, traced

Go back to the 200-page pack, about 125,000 tokens. Every one of those mechanisms is in it.

A 200-PAGE CONTRACT PACK AND ONE QUESTION (conceptual, invented documents) Question “If we want to end the agreement early next year, how much notice do we owe?” p. 1 p. 50 p. 100 p. 150 p. 200 p. 3 Term sheet summary cover page: notice 90 days p. 23 Clause 4.2 terminate for convenience: 90 days p. 150 Unsigned draft termination for convenience: 60 days p. 180 Amendment No. 2 signed: “Section 4.2, 90 is replaced by 120” 1 Low overlap “end early” vs “terminate for convenience” 2 Two hops the amendment names no topic, only “4.2” 3 Conflicting versions 90 twice (stale), 60 once (draft), 120 once (signed) 4 A closer-looking distractor the draft shares more words with the question Fluent wrong answer “90 days, per clause 4.2.” Correct citation, superseded number. Right answer 120 days: clause 4.2 as amended by No. 2; the 60-day draft was never signed. 157 pages separate the clause from the amendment that changes it. Pages and wording invented for illustration.
One question over a 200-page pack combines four separate difficulties. The question must be linked to clause 4.2 with no shared words, then to a signed amendment that cites the clause only by number, past a stale summary repeating 90 days and an unsigned draft that shares more words with the question than the real amendment. Invented documents; the failure is a prediction from published studies.Conceptual illustration

First, the model has to connect "end the agreement early" to clause 4.2's "terminate for convenience". The phrases share no content words, exactly the situation NoLiMa measured. Second, it has to find that the amendment on page 180 changes clause 4.2. The amendment never mentions termination or notice; it refers to the clause only by number, a second hop. Third, it has to resolve a conflict: 90 appears twice (in the clause and in the term sheet), 60 appears once in an unsigned draft, and 120 appears once, in the signed, later document. Fourth, it has to ignore that draft, which talks about termination and so shares more words with the question than the real amendment does.

Every fix changes what reaches the model. An exact search for "4.2" across the pack returns the clause and the amendment, while a search by meaning would probably rank the draft above the amendment. Marking each document's status before loading (signed or draft, date, what it amends) removes the conflict the model would otherwise guess at. Asking for quotes with page numbers before the answer makes a missed amendment visible. A well-chosen context of perhaps 4,000 tokens, holding the clause, the amendment and a status table, turns a hard long-context problem into an easy short one.

Most long-context failures are fixed upstream, in what the model receives.

The case for loading everything, and where it stops

Capable people argue the opposite, with good reasons. Windows went from about 4,000 tokens in 2023 to a million as a default three years later. Each generation uses long inputs better. Retrieval, the machinery that searches a collection and loads only the passages likely to matter, has to be built and maintained, and its misses are silent. And prompt caching, where the provider keeps an already-read prefix ready for repeat questions, has removed most of the cost penalty. At October 2026 list prices for Claude Opus 5.5, one question against the whole contract pack costs about 50 cents. Later questions against the cached pack cost about 2.5 cents, roughly the same as a carefully selected 6,000-token context.

I think part of that argument is right. For small, coherent material, and for tasks that genuinely need all of it (summarizing a report, checking a document against itself), loading everything is often the best choice today, and that range will widen. Elaborate document-chunking tuned to one model's weaknesses will age badly.

But three things don't follow. The measured difficulty doesn't come from size alone; it comes from low overlap, multiple steps and look-alike distractors, and adding more of your own documents adds exactly those. Improvement so far has raised the curves without flattening them: GPT-4.1 still lost about a third of its accuracy between short inputs and 128,000 tokens on NoLiMa. And no reader, however good, can settle a contradiction between versions when nothing in the text says which one governs. A better reader only guesses more fluently.

The second-order effect matters for anyone running these systems. As caching makes long contexts cheap, cost stops being the argument for selecting what goes in, and accuracy becomes the argument. A team that built retrieval to save money may reasonably drop it when caching arrives. If nobody measures accuracy, the loss shows up only as answers that are a little more often wrong.

This is where a distinction from Same Model, Different Results earns its keep. Some of the work around a model is scaffolding: it compensates for a current weakness and should shrink as models improve. Chunking documents so a weak reader copes is scaffolding. Some of it is a wall: it encodes facts about the world and stays. Recording which version is signed, which document supersedes which, and who may see what is a wall. Better models will need less of the first and exactly as much of the second (Write for the Model That Doesn't Exist Yet).

What to do

Test it on your own documents before you trust a window size. Build a small evaluation set: 20 real questions whose answers you know and where they live. Run each with only the relevant document, with about 50,000 tokens of surrounding material, and with the full collection. Phrase some questions in the document's words and some in the words a colleague would use. Include a stale version. Score three outcomes separately: right with the right citation, an explicit "not found", and wrong. Averaging a confident wrong answer with "not found" hides the outcome that matters most. At Opus 5.5 list prices the core test costs about $43. If the full collection matches the selected context on your questions, you've earned the right to load everything for that task (Build an Evaluation From Your Own Work).

If you paste long documents into an assistant, paste the part that matters when you know it, ask narrower questions, and ask for quotes with page numbers. Then ask what the documents leave unanswered or contradict; that question surfaces gaps a direct question papers over.

If you build, treat the context as a budget with an owner. Put the question at the end of long documents, prefer exact search for identifiers and section numbers, and tell the model that "not found" is an acceptable answer and that conflicts should be reported, not silently resolved. Log what went into every request. The first question after a bad answer is whether the evidence was there, buried, or contradicted.

If you were sold on a million-token window, read it like the floor area of a warehouse: real, useful and silent about whether anyone can find anything. Ask vendors for results on tasks like yours, at the lengths you'll use. Then budget for the work the window doesn't do. In the contract, every fix depended on knowing which documents were signed, which superseded which, and where each answer lives. That preparation is rarely in the project plan, and in organizations with years of accumulated versions it decides how reliable the system is.

The window will keep growing. The question it can't answer, what in all that text is current, relevant and true, stays with whoever prepares the input.

Check yourself

Why does the needle in a haystack test make long contexts look solved?

It uses one fact, shared words, an unrelated haystack and one version. Real work has several facts, different wording, look-alike text and old versions.

Why did the model fall from 98.5 to 56 percent when the question needed one step?

A literal match is a strong signal. An associative link like Dresden to the Semper Opera is weaker and is easier to drown as more competing text surrounds it.

Why can't a better reader settle 90 days versus 120 days in the contract pack?

Nothing in the text says which version governs. A better reader only guesses more fluently, so the fix is to record upstream which document is signed and current.

Notes, sources and method

For readers who want to check the numbers behind What Fits Versus What Gets Used. Sources were checked on 11 October 2026.

Key numbers

Number in the articleExact value and contextSource and date
Million-token window standard for Anthropic's current models and Gemini 3.8 FlashGemini 3.8 Flash input limit 1,048,576 tokensAnthropic context-windows docs [7]; Google model page [13], accessed 11 Oct 2026
About 1,600 pages1,000,000 × 0.8 words per token ÷ 500 words per page (see Method)Computed
Tool descriptions about 55,000 tokens58 tools on five connected tool servers; GitHub's 35 tools about 26,000; tool definitions up to 134,000 tokens before optimizationAnthropic, 24 Nov 2025 [11]
Evidence under 1% of an agent requestIllustrative request at step 20: about 103,300 tokens, of which the two answering passages are about 900 (0.87%); about a tenth of a million-token windowFigure a07-what-goes-in (conceptual; dropped from the article on 19 Oct 2026)
GPT-4.1 "very good performance" on needle tests to 1M tokens; warning about many itemsGuide also claims strong results on complex tasks mixing relevant and irrelevant documentsOpenAI GPT-4.1 Prompting Guide, April 2025 [10]
Llama 3.3 70B at 32K: 98.5%, 56%, 26%Literal: 98.3 / 98.5 / 98.5 at 8K / 16K / 32K. One step: 84.1 / 73.2 / 56.2. Two steps: 57.4 / 42.7 / 25.9NoLiMa, Table 6 [1]
Distractor sentence; GPT-4o to about 1,000 tokensGPT-4o effective length fell from 8K to 1K with the distractor presentNoLiMa [1]
Effective length 16 to more than 1,000 times smaller than the windowSmallest ratio GPT-4o 128K ÷ 8K = 16; GPT-4.1 1M ÷ 16K = 64; Gemini 1.5 Pro 2M ÷ 2K = 1,024; Gemini 1.5 Flash 1M ÷ under 1KNoLiMa Tables 3 and 10 [1]
GPT-4.1 effective length 16,000; lost about a third at 128K64.7% at 128K against a base of 97.0%; GPT-4o 56.0% at 128KNoLiMa Table 10 [1]
Gemini 1.5 Pro above 128K on RULER, 2K on NoLiMaDifferent model versions and threshold definitions; gap above 64×RULER Table 3 [2]; NoLiMa Table 3 [1]
Chroma: 18 models; degradation with length in every experiment; "even a single distractor"Models included Claude Opus 4, o3, GPT-4.1, Gemini 2.5 Pro and Qwen3; LongMemEval: all models better with ~300 focused tokens than with ~113,000 full history (306 questions); shuffled haystacks beat coherent ones (unexplained); Claude models hallucinated least and GPT models most in distractor tests, and Claude's lower LongMemEval scores came largely from declining when unsureChroma, 14 Jul 2025 [4]
"more context isn't automatically better""As token count grows, accuracy and recall degrade, a phenomenon known as context rot." Compaction exists to keep the active context small "because response quality degrades as a conversation grows"Anthropic docs [7][8]
About 4,000 tokens in 2023GPT-3.5-Turbo windowLost in the Middle [3]
50 cents, 2.5 cents, roughly the same as a 6,000-token selectionClaude Opus 5.5 list prices: $4 per million input tokens, $0.20 cached read; see MethodAnthropic pricing [12]
About $43 for the core testSee MethodComputed

Method and assumptions

  • Pages per million tokens: 1,000,000 × 0.8 words per token ÷ 500 words per page = 1,600. The 0.8 figure is the English average on OpenAI's o200k tokenizer (measured in The Model Never Sees Your Words). Spanish text or a finer tokenizer gives fewer pages.
  • Contract pack: 200 pages × 500 words = 100,000 words ÷ 0.8 = 125,000 tokens, an eighth of a million-token window. Documents and wording are invented; the failure is a prediction from the studies, not the result of running the pack through a model.
  • Costs at Claude Opus 5.5 list prices (input $4.00, cache read $0.20 per million tokens; five-minute cache write at 1.25 × input):
One question about the 125,000-token packInput cost
Whole pack, no caching$0.50
Whole pack, first request writing a five-minute cache$0.63
Whole pack, later requests reading the cache$0.025
A selected 6,000-token context, no caching$0.024

Token counts use OpenAI's tokenizer. Anthropic says its current tokenizer produces about 30% more tokens for the same text than its previous one and publishes no ratio against OpenAI's, so every line could be somewhat higher on Claude; the comparison between lines would not change. Other schedules push the other way: Claude Haiku 5.5 charges five times its base rate once a prompt exceeds 100,000 tokens. Agents multiply all of this, because each step re-reads the context so far (Where the AI Money Goes). Time behaves similarly: the model processes the whole input before writing, and caching shortens that wait.

  • Test cost: 20 questions × 3 positions (early, middle, late) × (125,000 + 50,000 + 5,000) tokens = 10.8 million tokens × $4 per million = $43.20, without caching. The fuller design adds question phrasing (document's words versus a colleague's), stale version present or absent, and the selection pipeline.
  • Ratios from NoLiMa: Llama 3.3 70B one step 56.2 ÷ 98.5 ≈ 0.57 ("nearly half" lost); two steps 25.9 ÷ 98.5 ≈ 0.26; GPT-4.1 64.7 ÷ 97.0 ≈ 0.67 ("about a third" lost).
  • RULER count: 10 of 17 models had an effective length of 32K or more against a fixed threshold of 85.6% (Llama 2 7B's score at 4K), although every one claimed at least that much. GPT-4 (1106 preview) held to 64,000 of 128,000.
  • Effective-length chart: values as reported in RULER Table 3 and NoLiMa Tables 3 and 10, on a log-2 axis. Model versions: GPT-4.1 2025-04-14 and GPT-4o 2024-11-20 (NoLiMa); Gemini 1.5 Pro is "gemini-1.5-pro" in RULER and "gemini-1.5-pro-002" in NoLiMa; Command R+ is the original release in RULER and 08-2024 in NoLiMa. RULER lists Gemini 1.5 Pro's claimed window as 1M and NoLiMa as 2M; the figure shows 2M.

Caveats and open questions

  • The studies measured models from 2023 to mid-2025. No independent low-overlap or multi-step results for the frontier models of October 2026 (Claude Opus 5.5, GPT-6 Astra, Gemini 3.8 Flash) turned up in the sources checked. Current curves are probably higher; nothing found shows them flat.
  • The tasks are synthetic. Real documents have structure that could help and look-alike clauses and contradictory versions that will hurt.
  • Rival explanation: long-context tests are just harder questions. NoLiMa scores each model on the same questions at short length first, and Chroma asks the same LongMemEval questions with focused and full history, so the drop appears with the question held constant.
  • Attention as competition (softmax weights normalized to sum to one) is the explanation NoLiMa's authors offer and the idea behind Anthropic's "attention budget". Real models have many layers and heads, some of which learn very sharp selections, which helps explain why literal retrieval survives at a million tokens; the difficulty seems concentrated in links the model must compute rather than copy. NoLiMa's held-distance experiment, where scores fell with total length while question-to-evidence distance stayed fixed, supports the view that the amount of competing text matters more than position. The internal account remains a hypothesis.
  • Position. "Lost in the Middle" (Stanford-led, 2023) gave models 20 passages, about 4,000 tokens, and found a U-shaped curve: accuracy highest when the answer came first or last. For GPT-3.5-Turbo the worst positions fell below its no-document score (56.1%, against 88.3% with only the right passage), and longer-window versions did no better. Later studies find position mattering less than total length; Chroma found no notable position effect in its basic needle task.
  • Placement advice disagrees. Anthropic recommends long documents at the top and the question at the end ("can improve response quality by up to 30 percent in tests"); OpenAI's GPT-4.1 guide prefers instructions at both ends, or above the context if only once. Lost in the Middle found repeating the question before and after nearly fixed a synthetic lookup task and barely helped real question answering.
  • Retrieval improvements. In Anthropic's 2024 tests, adding short generated context to each chunk, combining meaning-based and keyword search, and reranking cut the rate at which the right passage was missing from the top 20 from 5.7% to 1.9%. The same post advised that a knowledge base under about 200,000 tokens can be included whole, with caching [6].
  • Other techniques in the previous version: loading short descriptions first and full documents on demand ("just in time"); sub-agents reading in their own context and returning condensed summaries of often 1,000 to 2,000 tokens; compaction with the latest turns kept verbatim and custom summarization instructions, with rules that must survive kept in files the harness reloads. Context engineering's goal, in Anthropic's words: "the smallest possible set of high-signal tokens that maximize the likelihood of some desired outcome" [5].
  • Compaction losses: images, documents and fetched pages in summarized turns are gone; system-message instructions inside the summarized range stop applying [8].
  • What would change the conclusion: independent tests on low-overlap, multi-step tasks with distractors showing current models holding short-input accuracy near the full window, and your own test showing full loading matching selection. Then, for collections that fit, selection would be justified only by cost, latency and permissions. Marking versions, dates and authority would remain.
  • Needle in a haystack was popularized by Greg Kamradt in 2023 (attribution as cited in the papers).
  • Related: Search by Meaning, and Where It Fails, When to Split the Work Across Agents, Agents That Work for Hours, Why Long Answers Cost More Than Long Questions.

Sources

  1. Modarressi, Deilamsalehy, Dernoncourt, Bui, Rossi, Yoon, Schütze. NoLiMa: Long-Context Evaluation Beyond Literal Matching. ICML 2025; arXiv 2502.05167 v3, 9 July 2025. https://arxiv.org/abs/2502.05167
  2. Hsieh, Sun, Kriman, Acharya, Rekesh, Jia, Zhang, Ginsburg. RULER: What's the Real Context Size of Your Long-Context Language Models? COLM 2024; arXiv 2404.06654 v3, 6 August 2024. https://arxiv.org/abs/2404.06654
  3. Liu, Lin, Hewitt, Paranjape, Bevilacqua, Petroni, Liang. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the ACL; arXiv 2307.03172 v3, 20 November 2023. https://arxiv.org/abs/2307.03172
  4. Hong, Troynikov, Huber (Chroma). Context Rot: How Increasing Input Tokens Impacts LLM Performance. 14 July 2025. https://www.trychroma.com/research/context-rot
  5. Anthropic. Effective context engineering for AI agents. 29 September 2025. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
  6. Anthropic. Introducing Contextual Retrieval. 19 September 2024. https://www.anthropic.com/news/contextual-retrieval
  7. Anthropic. Context windows. Claude Platform documentation, accessed 11 October 2026. https://platform.claude.com/docs/en/build-with-claude/context-windows
  8. Anthropic. Compaction overview and Compaction on demand. Claude Platform documentation (beta), accessed 11 October 2026. https://platform.claude.com/docs/en/build-with-claude/compaction and https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand
  9. Anthropic. Prompting best practices, "Long context prompting". Claude Platform documentation, accessed 11 October 2026. https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
  10. OpenAI. GPT-4.1 Prompting Guide. OpenAI Cookbook, April 2025. https://developers.openai.com/cookbook/examples/gpt4-1_prompting_guide
  11. Anthropic. Introducing advanced tool use on the Claude Developer Platform. 24 November 2025. https://www.anthropic.com/engineering/advanced-tool-use
  12. Anthropic. Pricing. Claude Platform documentation, accessed 11 October 2026. https://platform.claude.com/docs/en/about-claude/pricing
  13. Google. Gemini 3.8 Flash. Gemini API documentation, accessed 11 October 2026. https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash

All writing