Efficient pipeline for retrieval-augmented generation system under big data

0Citations
Citations of this article
6Readers
Mendeley users who have this article in their library.

Abstract

Retrieval-augmented generation (RAG) is a methodology that integrates external knowledge through knowledge retrieval techniques such as approximate nearest neighbor search (ANNS), significantly enhancing the generation quality of large language models (LLMs). However, as external knowledge bases continue to expand, the storage requirements for ANNS indexes also surge, making the storage of massive data in memory impractical. This has further promoted the development and application of disk-based ANNS, but it significantly increases the response time of RAG systems. To address this issue, this paper proposes the PipeRAG method, which effectively overlaps the latency of knowledge retrieval and LLM inference by pipelining the disk-based ANNS and LLM prefill processes, thereby enhancing the overall performance of RAG systems while ensuring retrieval accuracy. Specifically, PipeRAG features two core designs: the “ANNS adaptive prefetching mechanism" and the “RAG dynamic pipeline scheduling strategy". The former design adjusts the prefetching speed in real time based on the current retrieval status, finding an optimal balance between performance and accuracy. The latter design dynamically adjusts the size of prefilling tasks by considering both ANNS prefetching speed and LLM chunked-prefill latency to achieve optimal pipeline efficiency. Our evaluations under real-world production workloads show that PipeRAG successfully reduces the response latency of RAG systems using disk-based ANNS by 25% to 71%, while maintaining extremely low recall loss.

Cite

CITATION STYLE

APA

Yu, R., Yang, Y., Zhou, J., & Wu, F. (2025). Efficient pipeline for retrieval-augmented generation system under big data. Scientia Sinica Informationis, 55(3), 542–558. https://doi.org/10.1360/SSI-2024-0331

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free