arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.21300cs.IRcs.AI
收藏

SAKR:通过流式算法和 K-Means 聚类增强检索增强生成

SAKR: Enhancing Retrieval-Augmented Generation via Streaming Algorithm and K-Means Clustering

Central South University(中南大学);Dalian University of Technology(大连理工大学);Nanjing University(南京大学);Xidian University(西安电子科技大学)

Haoyu Kang, Yuzhou Zhu, Yukun Zhong, Ke Wang

AI总结:

针对传统 RAG 内存占用高且难以及时处理流式数据的问题,本文提出 SAKR,将流式动态索引更新与 k-means 文档聚类结合,实验证明其在准确率、内存和查询效率上更优。

摘要:

检索增强生成(RAG)通过构建外部知识库,在信息检索中辅助大型语言模型(LLM)取得了显著成功。然而,它也存在许多问题:由于数据库庞大,其会消耗大量内存;并且在面对海量流式数据时,无法及时更新已建立的索引数据库。为了减少构建数据库所需的内存并同时保持准确性,我们提出了一种将流式算法与 k-means 聚类集成到 RAG 中的新方法。我们的方法应用流式算法来动态更新索引并降低内存消耗。此外,k-means 算法对高度相似的文档进行聚类,从而缩短查询时间。我们对四种方法进行了对比实验,结果表明,结合流式算法和 k-means 聚类的 RAG 在准确率和内存方面优于传统 RAG,尤其是在处理大规模流式数据时。

英文摘要:

Retrieval-augmented generation (RAG) has achieved significant success in information retrieval to assist large language models LLMs because it builds an external knowledge database. However, it also has many problems, it consumes a lot of memory because of the enormous database, and it cannot update the established index database in time when confronted with massive streaming data. To reduce the memory required for building the database and maintain accuracy simultaneously, we proposed a new approach integrating a streaming algorithm with k-means clustering into RAG. Our approach applied a streaming algorithm to update the index dynamically and reduce memory consumption. Additionally, the k-means algorithm clusters highly similar documents, and the query time would be shortened. We conducted comparative experiments on four methods, and the results indicated that RAG with streaming algorithm and k-means clusters outperforms traditional RAG in accuracy and memory, particularly when dealing with large-scale streaming data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑