RAG vs Long Context: 89% Fewer Tokens at 92% Accuracy With a 60,000-Character Evidence Budget
Contents

RAG vs Long Context: 89% Fewer Tokens at 92% Accuracy (60,000-Character Setting)
Retrieval or the whole history? On 500 LongMemEval-S questions, the evidence budget turned out to be a dial between tokens and accuracy.
On 500 LongMemEval-S questions with Claude Sonnet 5.5, retrieval with a 60,000-character evidence budget sent 89% fewer input tokens than the full chat history and answered 92.4% correctly, against 95.0% for the full history. That is not the study's default: at 40,000 characters, retrieval sent 92% fewer tokens and scored 90.0%. Bigger budgets buy accuracy back. Benchmark setup, not the live product.
- Full history in context: 95.0% correct on 500 questions, at a median 167,862 input tokens per question (Claude Sonnet 5.5).
- Retrieval at 60,000 characters: 92.4% correct, 19,198 tokens, 89% fewer.
- The study's default, 40,000 characters: 90.0% correct with 92% fewer tokens. At 20,000: 86.0% with 96% fewer.
- Accuracy depends on retrieving every answer passage: 91.9% correct when all were retrieved, 38.9% when one was missing.
- Benchmark setup, not the live product. The team that builds HeyBrain ran the study.
What was compared?
Two ways to give a model its past: put the full chat history in the prompt, or retrieve a short set of relevant passages. We ran both on LongMemEval-S, a public benchmark of 500 questions whose chat histories have a median of 48 past sessions. Claude Sonnet 5.5 answered in both arms with the same prompt, and gpt-4o graded the answers with the benchmark's official judge prompts.
HeyBrain's retriever combined lexical and vector search and returned ranked passages up to a character budget. We re-ran retrieval at 20,000 and 60,000 characters alongside the 40,000 default, keeping the retriever, prompt and judge unchanged. The evidence budget experiment has the full setup.
How much accuracy does each evidence budget keep?
Accuracy rises with the budget, and so do tokens. At 20,000 characters retrieval scored 86.0% with 96% fewer tokens. At 40,000, the study's default, 90.0% with 92% fewer. At 60,000, 92.4% with 89% fewer. The full history scored 95.0%.
| Setting | Accuracy | Input tokens, median | Fewer than full history | Reader cost per question |
|---|---|---|---|---|
| 20,000 characters | 86.0% | 6,588 | 96.1% | $0.017 |
| 40,000 characters (default) | 90.0% | 12,993 | 92.3% | $0.029 |
| 60,000 characters | 92.4% | 19,198 | 88.6% | $0.041 |
| Full history | 95.0% | 167,862 | $0.339 |
Is 89% fewer tokens at 92% accuracy as good as long context?
Not quite, and we do not claim it is. At 60,000 characters retrieval trailed the full history by 2.6 points (95% CI -5.0 to -0.4, p = 0.047). At the 40,000 default the gap was 5.0 points and significant.
The gap is not spread evenly. At 40,000 characters, single-session questions came within 2 points of the full history, while multi-session questions, which combine facts from several past sessions, scored 80.5% against 91.0%.
Why does a bigger budget help when cutting passages hurts?
Because coverage drives accuracy. When every answer-bearing passage reached the model, the default setting answered 91.9% correctly; when one was missing, 38.9%. A larger budget raises the chance that all of them are included. A fixed cut to the top four passages did the opposite: it saved a further 39% of tokens but lost 3.2 points (p = 0.004), all of it on questions where the cut removed an answer passage.
When does long context still win?
When accuracy matters most, and when the history is short. With five past sessions retrieval saved 57% of input tokens, not 92%, and a token model of the measured histories estimates that with two or three past sessions memory uses 4 to 5% more tokens than keeping the history, over a question and three follow-ups. Below a size threshold, sending the whole history is the simpler choice. Above it, a 60,000-character budget gave up less accuracy than the default: 2.6 points against 5.0.
About these numbers
HeyBrain benchmark tests, Nov 2026, not the live product, vs sending the full chat history. Claude Sonnet 5.5 reader, all 500 LongMemEval-S questions, graded by gpt-4o. 89% fewer tokens at 92% accuracy is the 60,000-character setting (19,198 vs 167,862 tokens, 88.6% fewer; accuracy 92.4% vs 95.0% with the full history). The study's default is 40,000 characters (90.0%, 92% fewer). Results vary with history length and model.
The study was designed and run by the team that builds HeyBrain. Full study and methodology.
Frequently asked questions
Is RAG cheaper than long context?
In our benchmark, yes, at uncached list prices: retrieval at the 40,000-character default cost $0.029 per question against $0.339 for the full history with Claude Sonnet 5.5, about one-twelfth. When the full prompt is already cached, the gap shrinks to about 4 times. Retrieval also scored 5 points lower.
What evidence budget should a retrieval system use?
It depends on how much accuracy you can give up. In our test, against the full history, 20,000 characters lost 9 points, 40,000 lost 5 and 60,000 lost 2.6. A budget sized to the question type might keep most of that gain at fewer tokens, but we have not tested it.
Does long context beat retrieval on every model?
Not on every model. Across six current readers, retrieval scored 87.8% to 93.2% on all 500 questions. On a 48-question sample it trailed the full history by 2 to 4 points on five readers, none significant on that sample, and the smallest, Claude Haiku 5.5, did slightly better with retrieval.