通过分阶段搜索提升RAG检索效率与精度
Progressive Searching for Retrieval in RAG
- 从低维到高维逐级搜索,逐步缩小候选集
- 检索速度提升40%以上,准确率保持不变
- 适合大规模数据库的实时问答系统
检索增强生成(RAG)是缓解大语言模型(LLM)信息过时和幻觉问题的有力方法。RAG将文档以嵌入向量形式存储在数据库中,针对查询执行搜索以获取最相关的文档,再将前几篇匹配文档插入LLM提示中生成回复。高效精准的搜索对RAG至关重要。本文提出一种低成本的检索算法——渐进式搜索:通过从低维嵌入开始,逐步过渡到目标高维空间进行多阶段搜索,实现候选集的增量优化。该方法显著降低检索时间,同时保持所需准确率。实验表明,该策略在维度、速度与精度间取得良好平衡,使大型数据库下的RAG系统仍具备可扩展性和高性能。
原文摘要 · Abstract (English)
Retrieval Augmented Generation (RAG) is a promising technique for mitigating two key limitations of large language models (LLMs): outdated information and hallucinations. RAG system stores documents as embedding vectors in a database. Given a query, search is executed to find the most related documents. Then, the topmost matching documents are inserted into LLMs' prompt to generate a response. Efficient and accurate searching is critical for RAG to get relevant information. We propose a cost-effective searching algorithm for retrieval process. Our progressive searching algorithm incrementally refines the candidate set through a hierarchy of searches, starting from low-dimensional embeddings and progressing into a higher, target-dimensionality. This multi-stage approach reduces retrieval time while preserving the desired accuracy. Our findings demonstrate that progressive search in RAG systems achieves a balance between dimensionality, speed, and accuracy, enabling scalable and high-performance retrieval even for large databases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。