RAG-Instruct: Boosting LLMs with Diverse Retrieval-Augmented Instructions

Wanlong Liu, Junying Chen, Ke Ji, Li Zhou, Wenyu Chen +1 more
12/31/2024
cs.CLcs.AIcs.LG

Official code: FreedomIntelligence/RAG-Instruct (135 stars, Apache-2.0, last commit 2025-04-13).

Abstract

Retrieval-Augmented Generation (RAG) has emerged as a key paradigm for enhancing large language models (LLMs) by incorporating external knowledge. However, current RAG methods face two limitations: (1) they only cover limited RAG scenarios. (2) They suffer from limited task diversity due to the lack of a general RAG dataset. To address these limitations, we propose RAG-Instruct, a general method for synthesizing diverse and high-quality RAG instruction data based on any source corpus. Our approach leverages (1) five RAG paradigms, which encompass diverse query-document relationships, and (2) instruction simulation, which enhances instruction diversity and quality by utilizing the strengths of existing instruction datasets. Using this method, we construct a 40K instruction dataset from Wikipedia, comprehensively covering diverse RAG scenarios and tasks. Experiments demonstrate that RAG-Instruct effectively enhances LLMs' RAG capabilities, achieving strong zero-shot performance and significantly outperforming various RAG baselines across a diverse set of tasks. RAG-Instruct is publicly available at https://github.com/FreedomIntelligence/RAG-Instruct.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[EMNLP 2025] RAG-Instruct: Boosting LLMs with Diverse Retrieval-Augmented Instructions

1355Shell, PythonDec 31, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{liu2024raginstruct,
  title  = {RAG-Instruct: Boosting LLMs with Diverse Retrieval-Augmented Instructions},
  author = {Wanlong Liu and Junying Chen and Ke Ji and Li Zhou and Wenyu Chen and Benyou Wang},
  year   = {2024},
  eprint = {2501.00353},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.00353v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.00353.svg)](https://codeofpaper.com/paper/2501.00353)

Discussion