Understanding the Fundamental Design Decisions of Retrieval-Augmented Generation Systems
Shengming Zhao, Yuchen Shao, Yuheng Huang, Jiayang Song, Zhijie Wang, Chengcheng Wan, Лей Ма
Fudan University · Shanghai Innovation Institute
Key points
From the paper's conclusion- Our analysis provides evidence-based guidance for practitioners and establishes foundational insights for principled RAG deployment.
Abstract
Retrieval-Augmented Generation (RAG) has emerged as a critical technique for enhancing large language model (LLM) capabilities. However, practitioners face significant challenges when making RAG deployment decisions. While existing research prioritizes algorithmic innovations, a systematic gap persists in understanding fundamental engineering tradeoffs that determine RAG success. We present the first comprehensive study of three universal RAG deployment decisions: whether to deploy RAG, how much information to retrieve, and how to integrate retrieved knowledge effectively. Through systematic experiments across three LLMs and six datasets spanning question answering and code generation tasks, we reveal critical insights: (1) RAG deployment must be highly selective, with variable recall thresholds and failure modes affecting up to 12.6% of samples even with perfect documents. (2) Optimal retrieval volume exhibits task-dependent behavior—QA tasks show universal patterns (5–10 documents optimal) while code generation requires scenario-specific optimization. (3) Knowledge integration effectiveness depends on task and model characteristics, with code generation benefiting significantly from prompting methods while question answering shows minimal improvement. These findings demonstrate that universal RAG strategies prove inadequate. Effective RAG systems require context-aware design decisions based on task characteristics and model capabilities. Our analysis provides evidence-based guidance for practitioners and establishes foundational insights for principled RAG deployment. Our code, data, and artifacts are publicly available at https://github.com/ShengmingZ/RAG_Benchmark_Code_QA .
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- From knowledge retrieval to generation: a comprehensive study of RAG's architectures, evolution, and applicationsArtificial Intelligence Review · 2026
- A Review on Retrieval-Augmented Generation: Architectures, Research Challenges, and Emerging FrontiersJournal of Future Artificial Intelligence and Technologies · 2026
- Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable FrameworksACM Transactions on Information Systems · 2026
- AutoRAGBench: A Benchmark for LLM Agents Automating RAG System DevelopmentarXiv · 2026
- EnterpriseRAG: Benchmarking LLM Instruction Adherence and Robustness under Non-Ideal Enterprise RetrievalarXiv · 2026
- Retrieval-augmented generation for natural language processing: a surveyArtificial Intelligence Review · 2026