Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable Frameworks
<|reference_start|>Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable Frameworks: Retrieval-augmented Generation (RAG) has markedly enhanced the capabilities of Large Language Models (LLMs) in tackling knowledge-intensive tasks. The increasing demands of application scenarios have driven the evolution of RAG, leading to the integration of advanced retrievers, LLMs and other complementary technologies, which in turn has amplified the intricacy of RAG systems. However, the rapid advancements are outpacing the foundational RAG paradigm, with many methods struggling to be unified under the process of "retrieve-then-generate". In this context, this paper examines the limitations of the existing RAG paradigm and introduces the modular RAG framework. By decomposing complex RAG systems into independent modules and specialized operators, it facilitates a highly reconfigurable framework. Modular RAG transcends the traditional linear architecture, embracing a more advanced design that integrates routing, scheduling, and fusion mechanisms. Drawing on extensive research, this paper further identifies prevalent RAG patterns-linear, conditional, branching, and looping-and offers a comprehensive analysis of their respective implementation nuances. Modular RAG presents innovative opportunities for the conceptualization and deployment of RAG systems. Finally, the paper explores the potential emergence of new operators and paradigms, establishing a solid theoretical foundation and a practical roadmap for the continued evolution and practical deployment of RAG technologies.<|reference_end|>
@article{gao2024modular,
    title={Modular RAG: Transforming RAG Systems into LEGO-like Reconfigurable
  Frameworks},
    author={Yunfan Gao, Yun Xiong, Meng Wang and Haofen Wang},
    journal={arXiv preprint arXiv:2407.21059},
    year={2024},
    archivePrefix={arXiv},
    eprint={2407.21059},
    primaryClass={cs.CL cs.AI cs.IR}
}