RETA-LLM: A Retrieval-Augmented Large Language Model Toolkit
Authors: Jiongnan Liu, Jiajie Jin, Zihan Wang, Jiehan Cheng, Zhicheng Dou, Ji-Rong Wen
Abstract
Although Large Language Models (LLMs) have demonstrated extraordinary capabilities in many domains, they still have a tendency to hallucinate and generate fictitious responses to user requests. This problem can be alleviated by augmenting LLMs with information retrieval (IR) systems (also known as retrieval-augmented LLMs). Applying this strategy, LLMs can generate more factual texts in response to user input according to the relevant content retrieved by IR systems from external corpora as references. In addition, by incorporating external knowledge, retrieval-augmented LLMs can answer in-domain questions that cannot be answered by solely relying on the world knowledge stored in parameters. To support research in this area and facilitate the development of retrieval-augmented LLM systems, we develop RETA-LLM, a {RET}reival-{A}ugmented LLM toolkit. In RETA-LLM, we create a complete pipeline to help researchers and users build their customized in-domain LLM-based systems. Compared with previous retrieval-augmented LLM systems, RETA-LLM provides more plug-and-play modules to support better interaction between IR systems and LLMs, including {request rewriting, document retrieval, passage extraction, answer generation, and fact checking} modules. Our toolkit is publicly available at https://github.com/RUC-GSAI/YuLan-IR/tree/main/RETA-LLM.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
RaLLe: A Framework for Developing and Evaluating Retrieval-Augmented Large Language ModelsYasuto Hoshi, D. Miyashita, Youyang Ng et al. · 2023 · Conference on Empirical Methods in Natural Language Processing · cited 19 times · Not summarized yet
RaLLe provides a framework for developing and evaluating retrieval-augmented LLMs, while RETA-LLM offers a modular pipeline for building customized systems.
Abstract
Retrieval-augmented large language models (R-LLMs) combine pre-trained large language models (LLMs) with information retrieval systems to improve the accuracy of factual question-answering. However, current libraries for building R-LLMs provide high-level abstractions without sufficient transparency for evaluating and optimizing prompts within specific inference processes such as retrieval and generation. To address this gap, we present RaLLe, an open-source framework designed to facilitate the development, evaluation, and optimization of R-LLMs for knowledge-intensive tasks. With RaLLe, developers can easily develop and evaluate R-LLMs, improving hand-crafted prompts, assessing individual i…
-
Self-Retrieval: Building an Information Retrieval System with One Large Language ModelQiaoyu Tang, Jiawei Chen, Bowen Yu et al. · 2024 · Information Retrieval · cited 15 times · AI summary available
Self-Retrieval internalizes retrieval in one LLM, whereas RETA-LLM connects LLMs with external retrieval modules.
Abstract
The rise of large language models (LLMs) has transformed the role of information retrieval (IR) systems in the way to humans accessing information. Due to the isolated architecture and the limited interaction, existing IR systems are unable to fully accommodate the shift from directly providing information to humans to indirectly serving large language models. In this paper, we propose Self-Retrieval, an end-to-end, LLM-driven information retrieval architecture that can fully internalize the required abilities of IR systems into a single LLM and deeply leverage the capabilities of LLMs during IR process. Specifically, Self-retrieval internalizes the corpus to retrieve into a LLM via a natura…
-
DeepRetrieval: Hacking Real Search Engines and Retrievers with Large Language Models via Reinforcement LearningPengcheng Jiang, Jiacheng Lin, Lang Cao et al. · 2025 · Information Retrieval · preprint, not peer reviewed · cited 77 times · Not summarized yet
DeepRetrieval trains LLMs to generate retrieval queries using reinforcement learning, while RETA-LLM supplies query rewriting within a broader toolkit.
Abstract
Information retrieval systems are crucial for enabling effective access to large document collections. Recent approaches have leveraged Large Language Models (LLMs) to enhance retrieval performance through query augmentation, but often rely on expensive supervised learning or distillation techniques that require significant computational resources and hand-labeled data. We introduce DeepRetrieval, a reinforcement learning (RL) approach that trains LLMs for query generation through trial and error without supervised data (reference query). Using retrieval metrics as rewards, our system generates queries that maximize retrieval performance. DeepRetrieval outperforms leading methods on literatu…
-
RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language ProcessingYu-Cheng Hu, Yuxing Lu · 2024 · arXiv.org · preprint, not peer reviewed · cited 57 times · Not summarized yet
The survey reviews retrieval-augmented generation and understanding, while RETA-LLM presents a toolkit for building retrieval-augmented LLM systems.
Abstract
Large Language Models (LLMs) have catalyzed significant advancements in Natural Language Processing (NLP), yet they encounter challenges such as hallucination and the need for domain-specific knowledge. To mitigate these, recent methodologies have integrated information retrieved from external resources with LLMs, substantially enhancing their performance across NLP tasks. This survey paper addresses the absence of a comprehensive overview on Retrieval-Augmented Language Models (RALMs), both Retrieval-Augmented Generation (RAG) and Retrieval-Augmented Understanding (RAU), providing an in-depth examination of their paradigm, evolution, taxonomy, and applications. The paper discusses the essen…
-
Reliable, Adaptable, and Attributable Language Models with RetrievalAkari Asai, Zexuan Zhong, Danqi Chen et al. · 2024 · Computation and Language · preprint, not peer reviewed · cited 99 times · Not summarized yet
Reliable, Adaptable, and Attributable Language Models with Retrieval argues for retrieval-augmented models to address hallucination and verifiability, concerns motivating RETA-LLM.
Abstract
Parametric language models (LMs), which are trained on vast amounts of web data, exhibit remarkable flexibility and capability. However, they still face practical challenges such as hallucinations, difficulty in adapting to new data distributions, and a lack of verifiability. In this position paper, we advocate for retrieval-augmented LMs to replace parametric LMs as the next generation of LMs. By incorporating large-scale datastores during inference, retrieval-augmented LMs can be more reliable, adaptable, and attributable. Despite their potential, retrieval-augmented LMs have yet to be widely adopted due to several obstacles: specifically, current retrieval-augmented LMs struggle to levera…
-
Towards Retrieval-Augmented Large Language Models: Data Management and System DesignWen-Qi Fan, Pang-Jing Wu, Yujuan Ding et al. · 2025 · IEEE International Conference on Data Engineering · cited 16 times · Not summarized yet
The tutorial discusses RAG architectures and data-management design, while RETA-LLM provides modules for implementing retrieval-augmented systems.
Abstract
Retrieval-augmented generation (RAG) has become a transformative approach for enhancing large language models (LLMs) by integrating external, reliable, and up-to-date knowledge. This addresses critical limitations such as hallucinations and outdated internal information. This tutorial delves into the evolution and frameworks of RAG, emphasizing the pivotal role of data management technologies in optimizing query processing, storage, indexing, and efficiency. It explores how RAG systems can deliver high-quality, context-aware outputs through efficient retrieval and integration, covering key topics such as retrieval-augmented LLM (RA-LLM) architectures, retrieval techniques, learning methodolo…
-
R-Eval: A Unified Toolkit for Evaluating Domain Knowledge of Retrieval Augmented Large Language ModelsShangqing Tu, Yuanchun Wang, Ji-Fan Yu et al. · 2024 · Knowledge Discovery and Data Mining · cited 9 times · Not summarized yet
R-Eval cites RETA-LLM and provides a toolkit for evaluating domain knowledge across retrieval-augmented workflows.
Abstract
Large language models have achieved remarkable success on general NLP tasks, but they may fall short for domain-specific problems. Recently, various Retrieval-Augmented Large Language Models (RALLMs) are proposed to address this shortcoming. However, existing evaluation tools only provide a few baselines and evaluate them on various domains without mining the depth of domain knowledge. In this paper, we address the challenges of evaluating RALLMs by introducing the R-Eval toolkit, a Python toolkit designed to streamline the evaluation of different RAG workflows in conjunction with LLMs. Our toolkit, which supports popular built-in RAG workflows and allows for the incorporation of customized …
-
Retrieve Anything To Augment Large Language ModelsPeitian Zhang, Shitao Xiao, Zheng Liu et al. · 2023 · Information Retrieval · cited 104 times · AI summary available
Retrieve Anything To Augment Large Language Models examines retrieval augmentation for external assistance, while RETA-LLM provides a toolkit for building such systems.
Abstract
Large language models (LLMs) face significant challenges stemming from the inherent limitations in knowledge, memory, alignment, and action. These challenges cannot be addressed by LLMs alone, but should rely on assistance from the external world, such as knowledge base, memory store, demonstration examples, and tools. Retrieval augmentation stands as a vital mechanism for bridging the gap between LLMs and the external assistance. However, conventional methods encounter two pressing issues. On one hand, the general-purpose retrievers are not properly optimized for the retrieval augmentation of LLMs. On the other hand, the task-specific retrievers lack the required versatility, hindering thei…
Prior work it builds on
-
REPLUG: Retrieval-Augmented Black-Box Language ModelsWeijia Shi, Sewon Min, Michihiro Yasunaga et al. · 2023 · Computation and Language · cited 1,174 times · Not summarized yet
REPLUG introduces retrieval augmentation for black-box language models, a prior approach cited by RETA-LLM.
Abstract
We introduce REPLUG, a retrieval-augmented language modeling framework that treats the language model (LM) as a black box and augments it with a tuneable retrieval model. Unlike prior retrieval-augmented LMs that train language models with special cross attention mechanisms to encode the retrieved text, REPLUG simply prepends retrieved documents to the input for the frozen black-box LM. This simple design can be easily applied to any existing retrieval and language models. Furthermore, we show that the LM can be used to supervise the retrieval model, which can then find documents that help the LM make better predictions. Our experiments demonstrate that REPLUG with the tuned retriever signif…
-
Active Retrieval Augmented GenerationZhengbao Jiang, Frank F. Xu, Luyu Gao et al. · 2023 · Computation and Language · cited 974 times · AI summary available
Active Retrieval Augmented Generation studies retrieval during long-form generation, an earlier retrieval-augmented approach cited by RETA-LLM.
Abstract
Despite the remarkable ability of large language models (LMs) to comprehend and generate language, they have a tendency to hallucinate and create factually inaccurate output. Augmenting LMs by retrieving information from external knowledge resources is one promising solution. Most existing retrieval augmented LMs employ a retrieve-and-generate setup that only retrieves information once based on the input. This is limiting, however, in more general scenarios involving generation of long texts, where continually gathering information throughout generation is essential. In this work, we provide a generalized view of active retrieval augmented generation, methods that actively decide when and wh…
-
Large Language Models are Zero-Shot Rankers for Recommender SystemsYupeng Hou, Jun-Jie Zhang, Zi-Han Lin et al. · 2023 · European Conference on Information Retrieval · cited 692 times · Not summarized yet
Large Language Models are Zero-Shot Rankers for Recommender Systems studies LLM-based item ranking, a recommendation application cited by RETA-LLM.
Abstract
Recently, large language models (LLMs) (e.g., GPT-4) have demonstrated impressive general-purpose task-solving abilities, including the potential to approach recommendation tasks. Along this line of research, this work aims to investigate the capacity of LLMs that act as the ranking model for recommender systems. We first formalize the recommendation problem as a conditional ranking task, considering sequential interaction histories as conditions and the items retrieved by other candidate generation models as candidates. To solve the ranking task by LLMs, we carefully design the prompting template and conduct extensive experiments on two widely-used datasets. We show that LLMs have promising…
-
Recommendation as Instruction Following: A Large Language Model Empowered Recommendation ApproachJun-Jie Zhang, Ruo-Bing Xie, Yupeng Hou et al. · 2023 · ACM Trans. Inf. Syst. · cited 439 times · AI summary available
Recommendation as Instruction Following uses LLMs for recommendation tasks, a neighboring application cited by RETA-LLM.
Abstract
In the past few decades, recommender systems have attracted much attention in both research and industry communities. Existing recommendation models mainly learn the underlying user preference from historical behavior data (typically in the forms of item IDs), and then estimate the user–item matching relationships for recommendations. Inspired by the recent progress on large language models (LLMs), we develop a different recommendation paradigm, considering recommendation as instruction following by LLMs. The key idea is that the needs of a user can be expressed in natural language descriptions (called instructions), so that LLMs can understand and further execute the instruction for fulfill…
-
Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking AgentWeiwei Sun, Lingyong Yan, Xinyu Ma et al. · 2023 · Conference on Empirical Methods in Natural Language Processing · cited 711 times · Not summarized yet
Is ChatGPT Good at Search? tests LLMs for passage ranking, an information-retrieval application cited by RETA-LLM.
Abstract
Large Language Models (LLMs) have demonstrated remarkable zero-shot generalization across various language-related tasks, including search engines. However, existing work utilizes the generative ability of LLMs for Information Retrieval (IR) rather than direct passage ranking. The discrepancy between the pre-training objectives of LLMs and the ranking objective poses another challenge. In this paper, we first investigate generative LLMs such as ChatGPT and GPT-4 for relevance ranking in IR. Surprisingly, our experiments reveal that properly instructed LLMs can deliver competitive, even superior results to state-of-the-art supervised methods on popular IR benchmarks. Furthermore, to address c…
Papers that cite it
-
ERAGent: Enhancing Retrieval-Augmented Language Models with Improved Accuracy, Efficiency, and PersonalizationYunxiao Shi, Xing Zi, Zijing Shi et al. · 2024 · European Conference on Artificial Intelligence · cited 23 times · Not summarized yet
ERAGent cites RETA-LLM and extends retrieval-augmented systems to address complex retrieval, serving efficiency, and personalization.
Abstract
Retrieval-augmented generation (RAG) for language models significantly improves language understanding systems. The basic retrieval-then-read pipeline of response generation has evolved into a more extended process due to the integration of various components, sometimes even forming loop structures. Despite its advancements in improving response accuracy, challenges like poor retrieval quality for complex questions that require the search of multifaceted semantic information, inefficiencies in knowledge re-retrieval during long-term serving, and lack of personalized responses persist. Motivated by transcending these limitations, we introduce ERAGent, a cutting-edge framework that embodies an…
-
CorpusLM: Towards a Unified Language Model on Corpus for Knowledge-Intensive TasksXiaoxi Li, Zhi-Cheng Dou, Yu-Jia Zhou et al. · 2024 · Annual International ACM SIGIR Conference on Research and Development in Information Retrieval · cited 35 times · Not summarized yet
CorpusLM cites RETA-LLM while proposing a unified language model for corpus retrieval and knowledge-intensive tasks.
Abstract
Large language models (LLMs) have gained significant attention in various fields but prone to hallucination, especially in knowledge-intensive (KI) tasks. To address this, retrieval-augmented generation (RAG) has emerged as a popular solution to enhance factual accuracy. However, traditional retrieval modules often rely on large document index and disconnect with generative tasks. With the advent of generative retrieval (GR), language models can retrieve by directly generating document identifiers (DocIDs), offering superior performance in retrieval tasks. However, the potential relationship between GR and downstream tasks remains unexplored. In this paper, we propose CorpusLM, a unified lan…
-
SuRe: Summarizing Retrievals using Answer Candidates for Open-domain QA of LLMsJaehyung Kim, Jaehyun Nam, Sangwoo Mo et al. · 2024 · International Conference on Learning Representations · cited 107 times · Not summarized yet
SuRe cites RETA-LLM and proposes prompted summarization of retrieved passages for open-domain question answering.
Abstract
Large language models (LLMs) have made significant advancements in various natural language processing tasks, including question answering (QA) tasks. While incorporating new information with the retrieval of relevant passages is a promising way to improve QA with LLMs, the existing methods often require additional fine-tuning which becomes infeasible with recent LLMs. Augmenting retrieved passages via prompting has the potential to address this limitation, but this direction has been limitedly explored. To this end, we design a simple yet effective framework to enhance open-domain QA (ODQA) with LLMs, based on the summarized retrieval (SuRe). SuRe helps LLMs predict more accurate answers fo…
-
Enhancing Retrieval and Managing Retrieval: A Four-Module Synergy for Improved Quality and Efficiency in RAG SystemsYunxiao Shi, Xing Zi, Zijing Shi et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 40 times · Not summarized yet
The four-module study cites RETA-LLM and develops query rewriting and retrieval management for RAG systems.
Abstract
Retrieval-augmented generation (RAG) techniques leverage the in-context learning capabilities of large language models (LLMs) to produce more accurate and relevant responses. Originating from the simple 'retrieve-then-read' approach, the RAG framework has evolved into a highly flexible and modular paradigm. A critical component, the Query Rewriter module, enhances knowledge retrieval by generating a search-friendly query. This method aligns input questions more closely with the knowledge base. Our research identifies opportunities to enhance the Query Rewriter module to Query Rewriter+ by generating multiple queries to overcome the Information Plateaus associated with a single query and by r…
-
DomainRAG: A Chinese Benchmark for Evaluating Domain-specific Retrieval-Augmented GenerationShuting Wang, Jiongnan Liu, Jiehan Cheng et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 25 times · Not summarized yet
DomainRAG cites RETA-LLM and introduces a benchmark for evaluating domain-specific retrieval-augmented generation.
Abstract
Retrieval-Augmented Generation (RAG) offers a promising solution to address various limitations of Large Language Models (LLMs), such as hallucination and difficulties in keeping up with real-time updates. This approach is particularly critical in expert and domain-specific applications where LLMs struggle to cover expert knowledge. Therefore, evaluating RAG models in such scenarios is crucial, yet current studies often rely on general knowledge sources like Wikipedia to assess the models' abilities in solving common-sense problems. In this paper, we evaluated LLMs by RAG settings in a domain-specific context, college enrollment. We identified six required abilities for RAG models, including…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 5 November 2026.