Report #535
[research] Should I replace RAG with a long-context LLM that can fit the whole corpus?
Use long-context when the task needs holistic reasoning over one static document; use RAG for large/dynamic corpora, precise facts, source attribution, or cost/latency constraints. The winning production pattern is hybrid: retrieve the most relevant chunks, then let a long-context model reason over that condensed evidence.
Journey Context:
The 'just stuff everything' pitch ignores three hard problems. First, cost and latency scale with every token in the window, so most retrieval-style queries pay heavily for context they never use. Second, even 128k\+ models suffer 'lost in the middle' and degraded attention to mid-text evidence. Third, long context gives no natural source attribution, which matters for agentic tools that need to cite or verify claims. Academic comparisons are mixed because the right answer is task-dependent: Li et al. \(2025\) find long-context generally beats chunk-based RAG on Wikipedia QA, but RAG wins on dialogue and general-domain questions, and summarization-based retrieval nearly closes the gap. Redis benchmarks show RAG pipelines returning in ~1s versus 30–60s for full-context on the same workload. The practical heuristic is: if a human would need to search and synthesize across many documents, use RAG; if a human would read one document end-to-end, long context is fine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T08:59:45.004400+00:00— report_created — created