Long Context or Retrieval? Compare Cost, Quality and Update Work

Published · Updated • articles
RAGRetrieval

A useful comparison between whole-document prompting and retrieval starts with accepted answers on the same corpus. Price per token helps estimate one component of cost. It cannot establish that an approach will retrieve the right evidence or answer a question correctly.

Correction, 21 October 2026: The earlier version incorrectly described Gemini Argon as unavailable through an API and presented retrieval as a one-time indexing expense. It also treated cost as sufficient to decide the architecture. Unverified cross-provider savings and memory estimates have been removed.

A bounded input-cost example

Anthropic's Haiku 5.5 announcement lists input at $0.10 per million tokens up to a 100,000-token prompt, and $0.50 above that threshold. At the latter rate, a hypothetical 400,000-token input costs $0.20 before output and other applicable charges. A 100,000-token prompt at the lower rate costs $0.01 for input.

These calculations assume the stated token counts, ordinary input billing and no cache discount. Real requests also include instructions, retrieved material and conversation state. Count the actual request rather than the source file's approximate size.

Google's 13 October Argon availability announcement includes developer API access. It also describes introductory pricing and cached-input discounts. A comparison using launch access restrictions or ignoring a cache strategy can therefore reach the wrong conclusion.

Retrieval adds an index with an update policy

Perplexity's late-interaction model card describes separate query and document encoding and MaxSim scoring. This is a concrete retrieval design to evaluate, not evidence that every retrieval system has the same quality or cost.

Document changes can require re-encoding. A changed embedding model may require broader index work. Deletions and permissions changes also need to reach the retrieval layer, so an answer cannot continue using content that should no longer be accessible.

Whole-document prompting has its own update work: construct the correct current input and manage any reusable cache. Neither design eliminates versioning.

Estimate a break-even point explicitly

Consider a second hypothetical comparison. Suppose retrieval reduces uncached input from 400,000 tokens to 10,000 tokens at the same $0.50 input rate. Input cost falls from $0.20 to $0.005 per query, a saving of $0.195.

If indexing and operating the retrieval path add $19.50 over the comparison period, input savings offset that amount at 100 queries. This is an illustrative arithmetic result, not a provider benchmark or a recommended budget. It assumes identical output costs, no retries, no cache discounts and equivalent answer quality.

A practical cost sheet should include:

  • Full-input or retrieved-input tokens, output tokens and applicable cache charges.
  • Initial indexing, incremental updates, storage and query-serving work.
  • Failed answers, retries, human repair and the number of accepted results.

Divide total cost by accepted results when comparing completed work. A low per-query bill can become expensive if the system repeatedly misses essential evidence.

Test quality before choosing the cheaper path

Use questions requiring evidence from different parts of the corpus, including conflicting versions and cases with no answer. Check citations against the actual passages. Test permission changes and recently updated documents.

Measure latency through the final accepted answer, including retrieval and tool calls. Record the model, tokenizer, corpus version and configuration. Compare these observations with your local deployment requirements.

Whole-document prompting can be a useful starting point for a bounded corpus. Retrieval can make a large or selective evidence set easier to manage. The choice depends on measured quality and operating conditions as well as the cost calculation.

Frequently asked questions

What input rates does Anthropic list for Haiku 5.5?

The reviewed announcement lists $0.10 per million input tokens for prompts up to 100,000 tokens and $0.50 per million above that threshold. Output, caching and other applicable charges must be considered separately.

Does fitting a corpus into the context window make retrieval unnecessary?

No. Evaluate answer quality, latency, query volume, update frequency, access controls and total cost. A context capacity is not an answer-quality guarantee.

Is Gemini 4 Argon available through an API?

Yes. Google's 13 October 2026 availability announcement includes API access through AI Studio and Gemini platform. The earlier version of this article incorrectly said API access was unavailable.

Does retrieval index a changing corpus only once?

No. Changed documents need an update strategy, and some changes require re-encoding or rebuilding an index. Include that work in the comparison.

Free interactive tools for the decisions this piece raises.

Related Reading