arrow
Return

RAGCache Efficient Knowledge Caching for Retrieval-Augmented Generation

delete2026-02-01
delete3
PRE
AI
C
Chao Jin *
Z
Zili Zhang
X
Xuanlin Jiang
F
Fangyue Liu
S
S. Liu
X
Xuanzhe Liu
X
Xin Jin
DOI:10.1145/3768628delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Retrieval-Augmented Generation (RAG) has demonstrated substantial advancements in various natural language processing tasks by integrating the strengths of large language models (LLMs) and external knowledge databases. However, the retrieval step introduces long sequence generation and extra data dependency, resulting in long end-to-end latency. Our analysis benchmarks current RAG systems and reveals that, while the retrieval step poses performance challenges, it also offers optimization opportunities through its retrieval pattern and streaming search behavior. We propose RAGCache, a latency-optimized serving system tailored for RAG. RAGCache leverages the retrieval pattern to organize and cache the intermediate states of retrieved knowledge in a knowledge tree across the GPU and host memory hierarchy, reducing LLM generation time. RAGCache employs dynamic speculative pipelining to exploit the streaming search behavior, overlapping retrieval with LLM generation to minimize end-to-end latency. We implement RAGCache based on vLLM and Faiss, and evaluate it on both open-source and production datasets. Experimental results demonstrate that RAGCache reduces the time to first token (TTFT) by up to 4 & times; and improves the throughput by up to 2.1 & times; compared to vLLM integrated with Faiss.
Keywords:
Retrieval-augmented generation
LLM inference
caching

Journal

A
ACM Transactions on Computer Systems
IF:
1.8
Papers:
26
Citations:
1.1K

Organization

P
peking university
Scholars:
11.9W
Papers: 8.7W
Citations: 146
Cited Papers

Cited Papers

GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints
err2023-01-01
err0
errOAAI
errJoshua Ainslie; James Lee-Thorp; Michiel de Jong; Yury Zemlyanskiy; Federico Lebron; Sumit Sanghai
errShare
errSave
Lost in the Middle: How Language Models Use Long Contexts
err2024-02-23
err56
errOAAI
errLiu, Nelson F.; Lin, Kevin; Hewitt, John; Paranjape, Ashwin; Bevilacqua, Michele; Petroni, Fabio; Liang, Percy
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
SDCC: software-defined collective communication for distributed training
err2024-07-31
err0
PREAI
errJin, Xin; Zhang, Zhen; Jia, Yunshan; Ma, Yun; Liu, Xuanzhe
errShare
errSave
Efficient Memory Management for Large Language Model Serving with PagedAttention
err2023-10-23
err0
errOAAI
errWoosuk Kwon; Zhuohan Li; Siyuan Zhuang; Ying Sheng; Lianmin Zheng; Cody Hao Yu; Joseph Gonzalez; Hao Zhang; Ion Stoica
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
In-Context Retrieval-Augmented Language Models
err2023-11-13
err44
errOAAI
errRam, Ori; Levine, Yoav; Dalmedigos, Itay; Muhlgay, Dor; Shashua, Amnon; Leyton-Brown, Kevin; Shoham, Yoav
errShare
errSave
researcher View more