[Paper Review] Long Context RAG Performance of Large Language Models
The paper systematically evaluates how increasing context length affects Retrieval-Augmented Generation (RAG) performance across 20 LLMs on three datasets, finding that longer context helps some state-of-the-art models but not most open-source models, with varied failure modes observed.
Retrieval Augmented Generation (RAG) has emerged as a crucial technique for enhancing the accuracy of Large Language Models (LLMs) by incorporating external information. With the advent of LLMs that support increasingly longer context lengths, there is a growing interest in understanding how these models perform in RAG scenarios. Can these new long context models improve RAG performance? This paper presents a comprehensive study of the impact of increased context length on RAG performance across 20 popular open source and commercial LLMs. We ran RAG workflows while varying the total context length from 2,000 to 128,000 tokens (and 2 million tokens when possible) on three domain-specific datasets, and report key insights on the benefits and limitations of long context in RAG applications. Our findings reveal that while retrieving more documents can improve performance, only a handful of the most recent state of the art LLMs can maintain consistent accuracy at long context above 64k tokens. We also identify distinct failure modes in long context scenarios, suggesting areas for future research.
Motivation & Objective
- Assess whether longer context lengths improve RAG performance across a broad set of LLMs.
- Quantify how performance changes as context grows from 2,000 to 128,000 tokens (and up to 2,000,000 tokens for some models).
- Identify model-specific failure modes and limitations in long-context RAG scenarios across multiple domains.
Proposed method
- Benchmark 20 open-source and commercial LLMs with context lengths from 2k to 128k tokens (and up to 2M tokens when possible).
- Use a standard RAG pipeline with a fixed embedding model and FAISS vector store to retrieve document chunks.
- Evaluate generated answers with a calibrated LLM-as-a-judge (GPT-4o) against ground-truth answers.
- Analyze recall@k retrieval performance and failure modes via qualitative categorization of model outputs.

Experimental results
Research questions
- RQ1Can long-context LLMs consistently improve RAG performance across diverse models and datasets?
- RQ2How does performance scale with context length for state-of-the-art versus open-source models?
- RQ3What are the predominant failure modes of long-context RAG across different models and contexts?
- RQ4Is there a practical context-length threshold beyond which adding more retrieved documents yields diminishing returns?
Key findings
- Long-context improves RAG performance for recent state-of-the-art models (e.g., o1, GPT-4o, Claude 3.5, Gemini 1.5, Qwen 2 70B) but not uniformly across all models.
- Most open-source models show performance gains only up to roughly 16k–32k tokens and then deteriorate with longer contexts.
- Gemini 1.5 Pro/Flash maintain consistent performance up to extremely long contexts (up to 2,000,000 tokens) on some tasks, unlike many peers.
- Common failure modes include refusals due to copyright concerns, safety filters, and follow-instruction failures, with model-specific patterns.
- Retrieval recall can saturate at high context lengths (e.g., up to 96k–128k tokens for DocsQA and FinanceBench) even when generation performance does not monotonically increase.
- Directly feeding very large corpora into some LLMs at long context lengths could be feasible in principle, but cost remains a major consideration.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.