跳到主要导航 跳到搜索 跳到主要内容

Leveraging Approximate Caching for Faster Retrieval-Augmented Generation

  • Shai Bergman
  • , Anne Marie Kermarrec
  • , Diana Petrescu
  • , Rafael Pires
  • , Mathis Randl*
  • , Martijn De Vos
  • , Ji Zhang
  • *此作品的通讯作者
  • Huawei Zurich Research Center
  • Swiss Federal Institute of Technology Lausanne

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Retrieval-augmented generation (RAG) improves the reliability of large language model (LLM) answers by integrating external knowledge. However, RAG increases the end-to-end inference time since looking for relevant documents from large vector databases is computationally expensive. To address this, we introduce Proximity, an approximate key-value cache that optimizes the RAG workflow by leveraging similarities in user queries. Instead of treating each query independently, Proximity reuses previously retrieved documents when similar queries appear, substantially reducing the reliance on expensive vector database lookups. To efficiently scale, Proximity employs a locality-sensitive hashing (LSH) scheme that enables fast cache lookups while preserving retrieval accuracy. We evaluate Proximity using the MMLU and MedRAG question-answering benchmarks. Our experiments demonstrate that Proximity with our LSH scheme and a realistically-skewed MedRAG workload reduces database calls by 77.2% while maintaining database recall and test accuracy. We experiment with different similarity tolerances and cache capacities, and show that the time spent within the Proximity cache remains low and constant (4.8 μs) even as the cache grows substantially in size. Our results demonstrate that approximate caching is a practical and effective strategy for optimizing RAG-based systems.

源语言英语
主期刊名Middleware 2025 - Proceedings of the 26th ACM International Middleware Conference
出版商Association for Computing Machinery, Inc
340-353
页数14
ISBN(电子版)9798400715549
DOI
出版状态已出版 - 14 12月 2025
已对外发布
活动26th ACM International Middleware Conference, Middleware 2025 - Nashville, 美国
期限: 15 12月 202519 12月 2025

丛书

姓名Middleware 2025 - Proceedings of the 26th ACM International Middleware Conference

会议

会议26th ACM International Middleware Conference, Middleware 2025
国家/地区美国
Nashville
时期15/12/2519/12/25

学术指纹

探究 'Leveraging Approximate Caching for Faster Retrieval-Augmented Generation' 的科研主题。它们共同构成独一无二的学术指纹。

引用此