Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable Frameworks
Yunfan Gao, Yun Xiong, Meng Wang, Haofen Wang · 2026 · 125 citationsRead the paper
Retrieval-Augmented Generation (RAG) has substantially improved the performance of Large Language Models (LLMs) on knowledge-intensive tasks. While recent advances have introduced sophisticated retrievers, orchestration mechanisms, and optimization strategies that move beyond the naive retrieve-then-generate approach, a unified paradigm for systematically designing and optimizing RAG systems across diverse tasks remains lacking. This article introduces Modular RAG, a unified paradigm that organizes RAG systems into a three-layer structure of modules, submodules, and operators. We formalize over 40 specialized operators within 8 L1 modules and further summarize typical RAG design patterns, including linear, conditional, branching, and loop, to model the orchestration of retrieval and generation processes. Through extensive experiments, we demonstrate the adaptability of different RAG workflows to typical tasks. We further introduce node-level diagnostics to identify performance bottlenecks and quantify the tradeoffs between efficiency and effectiveness. By establishing a unified paradigm and empirically supported mapping guidelines, Modular RAG provides researchers and practitioners with a systematic framework for designing, implementing, and optimizing RAG systems across diverse application scenarios.
What the full text shows
Theory or simulation- Formalized a unified RAG paradigm consisting of a three-layer structure (modules, sub-modules, and operators) including over 40 specialized operators across 8 L1 modules. — 40+ operators, 8 L1 modules (Across diverse knowledge-intensive tasks)
- Identified and categorized four primary RAG design patterns for orchestrating retrieval and generation: linear, conditional, branching, and loop. (General RAG workflow orchestration)
- Defined a hybrid routing mechanism that balances keyword-based and semantic-based scores to assign queries to specific RAG flows. (Using a weighting factor 'a' to balance metadata and semantic analysis)
- Setup
- Theoretical framework and empirical analysis of existing RAG methods (e.g., RRR, Self-RAG, Toolformer) and typical knowledge-intensive tasks.
- How
- The authors proposed a modular architectural framework that decomposes RAG systems into a computational graph of operators. They formalized routing, scheduling, and fusion mechanisms and mapped existing RAG methods to specific flow patterns.
- Limitations
- LLM-based fusion can be limited by the LLM's context window for long answers. · Fine-tuning for LLM-based scheduling requires generating large numbers of compliant instruction sets.
Summarized by Gemma 4 from the open-access full text · 17 Nov 2026. Read it