RAGLAB: A Modular and Research-Oriented Unified Framework for Retrieval-Augmented Generation
Xuanwang Zhang, Yunze Song, Yidong Wang, Shuyun Tang, Xinfeng Li, Zhengran Zeng, Zhen Wu, Wei Ye, Wenyuan Xu, Yue Zhang, Xinyu Dai, Shikun Zhang, Qingsong Wen
TL;DR
RAGLAB addresses the challenge of fair, reproducible evaluation in Retrieval Augmented Generation by providing a modular open-source framework that reproduces six established RAG algorithms and standardizes experimental settings across ten benchmarks. It introduces core components such as Retriever, Corpus, Generator, Instruction Lab, Trainer, and Dataset/Metric, along with a retriever server, preprocessed knowledge corpora, and a suite of evaluation metrics. Key findings from the experiments reveal how performance varies with base models and tasks, notably that Self-RAG with large-scale generators can outperform rivals, while some algorithms show limited gains in certain domains. The framework offers a practical, extensible platform for reliable benchmarking, algorithm development, and community-driven expansion in RAG research.
Abstract
Large Language Models (LLMs) demonstrate human-level capabilities in dialogue, reasoning, and knowledge retention. However, even the most advanced LLMs face challenges such as hallucinations and real-time updating of their knowledge. Current research addresses this bottleneck by equipping LLMs with external knowledge, a technique known as Retrieval Augmented Generation (RAG). However, two key issues constrained the development of RAG. First, there is a growing lack of comprehensive and fair comparisons between novel RAG algorithms. Second, open-source tools such as LlamaIndex and LangChain employ high-level abstractions, which results in a lack of transparency and limits the ability to develop novel algorithms and evaluation metrics. To close this gap, we introduce RAGLAB, a modular and research-oriented open-source library. RAGLAB reproduces 6 existing algorithms and provides a comprehensive ecosystem for investigating RAG algorithms. Leveraging RAGLAB, we conduct a fair comparison of 6 RAG algorithms across 10 benchmarks. With RAGLAB, researchers can efficiently compare the performance of various algorithms and develop novel algorithms.
