IN THIS BREAKDOWN · 10 SECTIONS
You can read 19% of this breakdown.
The paper in one minute
When Gemini 1.5 accepted a million tokens and GPT-4o 128,000, a real question opened up: why build retrieval at all? Earlier comparisons had found retrieval winning, but they used weaker models and shorter contexts.
Google DeepMind and the University of Michigan reran the comparison with Gemini-1.5-Pro, GPT-4o and GPT-3.5-Turbo on nine long-document tasks from LongBench and ∞Bench: question answering over stories, papers and Wikipedia, multi-hop questions, and meeting summarization. Long context (LC) meant sending the whole document. RAG meant splitting it into 300-word chunks and sending the five most similar to the question.
Long context won on quality, by 7.6 points on average for Gemini, 13.1 for GPT-4o and 3.6 for GPT-3.5-Turbo. But two other observations shaped the paper. RAG costs a fraction of the tokens. And for 63% of queries the two methods produced exactly the same answer, right or wrong.
So the authors proposed Self-Route. First, answer with RAG, but let the model reply "unanswerable" if the retrieved chunks are not enough. Only for those queries, send the full context. Most queries stopped at the first step, and the overall score landed close to long context at well under the cost: 38% of the tokens for Gemini, 61% for GPT-4o, with GPT-3.5-Turbo actually scoring higher than either method alone.
Research notes: the problem, approach and results
of queries where RAG and long context gave exactly the same answer
of long-context tokens used by Self-Route on Gemini-1.5-Pro, scoring 46.4 against 49.7
RAG accuracy on a hidden-passkey test when the question was reworded, while long context stayed near 70%
With context windows of 128K to a million tokens, teams had to decide: retrieve a few passages, or send the whole document every time?
Benchmark both on the same tasks with current models, then route: answer from retrieved chunks, let the model say "unanswerable", and only then send the full context.
Long context scored higher on average, RAG cost far less, and routing kept most of the quality at 38% to 61% of the tokens.
Why it matters to an FDE
"Should we just put the whole document in the prompt?" comes up on every document-heavy project. This paper gives you a measured answer to bring to the conversation.
Quality and cost pull in opposite directions. Long context was better on average with strong models. RAG was dramatically cheaper because pricing follows input tokens. Neither is "right"; the choice is a budget decision.
You do not have to choose once. The routing idea is simple to build: give the model the retrieved chunks and permission to say it cannot answer. Escalate only those queries. On the paper's tasks, 57% to 77% of queries never needed the long call. That is the kind of design that makes a pilot's unit economics work in production.
Retrieval is fragile to wording. The most striking result is small. On a test where a passkey is hidden in long filler text, RAG found it 80% of the time when asked "What is the passkey?" Reword the question as "What is the special token hidden inside the texts?" and RAG dropped to under 5%, while long context barely moved. Retrieval depends on the question sharing words or meaning with the passage. Users rarely phrase questions the way documents are written.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 49 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦3 results tables
- ?5 interview questions with answers
- 03Key takeaways
The ideas to keep, why RAG fails, the cost arithmetic and the misreadings to avoid
Free account - 04How it works
The benchmark setup, the routing prompt, the k trade-off and the synthetic-data trap, with a diagram
Premium - 05The numbers that matter
The comparison by model, routing rates, token savings and two figures the paper contradicts
Premium - 06Try it yourself
The routing rule and a calculator for what it saves at your document sizes
Premium - 07Where it breaks
The study's limits and what to watch when you deploy routing
Premium - 08Using it on a deployment
Deciding between retrieval, long context and routing for a customer's documents
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
