要約
検索された生成(RAG)は、外部知識を統合することにより、大規模な言語モデル(LLM)回答の信頼性を高めます。
ただし、RAGは、大規模なベクトルデータベースから関連するドキュメントを探すことは計算上の高価であるため、エンドツーエンドの推論時間を増やします。
これに対処するために、ユーザークエリの類似性を活用することによりRAGワークフローを最適化するおおよそのキー値キャッシュである近接性を導入します。
各クエリを独立して扱う代わりに、近接性は、同様のクエリが表示されたときに以前に取得したドキュメントを再利用し、高価なベクトルデータベースの検索に依存します。
MMLUおよびMEDRAGベンチマークの近接性を評価し、応答の精度を維持しながら検索効率を大幅に改善することを示しています。
近接性により、精度を維持しながら、検索レイテンシが最大59%減少し、ベクトルデータベースの計算負荷が低下します。
また、さまざまな類似性のしきい値を実験し、速度とリコールのトレードオフを定量化します。
私たちの研究は、近似キャッシュがRAGベースのシステムを最適化するための実行可能で効果的な戦略であることを示しています。
要約(オリジナル)
Retrieval-augmented generation (RAG) enhances 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, reducing reliance on expensive vector database lookups. We evaluate Proximity on the MMLU and MedRAG benchmarks, demonstrating that it significantly improves retrieval efficiency while maintaining response accuracy. Proximity reduces retrieval latency by up to 59% while maintaining accuracy and lowers the computational burden on the vector database. We also experiment with different similarity thresholds and quantify the trade-off between speed and recall. Our work shows that approximate caching is a viable and effective strategy for optimizing RAG-based systems.
arxiv情報
著者 | Shai Bergman,Zhang Ji,Anne-Marie Kermarrec,Diana Petrescu,Rafael Pires,Mathis Randl,Martijn de Vos |
発行日 | 2025-03-07 15:54:04+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google