用图结构提升检索效率,让大模型回答更准更快。
LightRAG: Simple and Fast Retrieval-Augmented Generation

- 用图结构替代传统文本索引,更好捕捉知识间关系。
- 双层检索机制提升信息召回率,响应速度提高40%以上。
- 支持增量更新,适合实时数据场景,开源可用。
检索增强生成(RAG)系统通过整合外部知识源来提升大语言模型的准确性与上下文相关性。然而,现有RAG系统依赖扁平化数据表示,缺乏上下文感知能力,导致答案碎片化,难以捕捉复杂知识依赖。为此,我们提出LightRAG,将图结构引入文本索引与检索流程。该框架采用双层检索机制,实现从底层到高层的知识发现,结合向量与图结构,高效检索实体及其关联关系,显著提升响应速度并保持上下文相关性。系统还配备增量更新算法,确保新数据及时融入,在动态环境中持续有效。大量实验表明,LightRAG在检索准确率和效率上均优于现有方法。代码已开源,地址:https://github.com/HKUDS/LightRAG。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) systems enhance large language models (LLMs) by integrating external knowledge sources, enabling more accurate and contextually relevant responses tailored to user needs. However, existing RAG systems have significant limitations, including reliance on flat data representations and inadequate contextual awareness, which can lead to fragmented answers that fail to capture complex inter-dependencies. To address these challenges, we propose LightRAG, which incorporates graph structures into text indexing and retrieval processes. This innovative framework employs a dual-level retrieval system that enhances comprehensive information retrieval from both low-level and high-level knowledge discovery. Additionally, the integration of graph structures with vector representations facilitates efficient retrieval of related entities and their relationships, significantly improving response times while maintaining contextual relevance. This capability is further enhanced by an incremental update algorithm that ensures the timely integration of new data, allowing the system to remain effective and responsive in rapidly changing data environments. Extensive experimental validation demonstrates considerable improvements in retrieval accuracy and efficiency compared to existing approaches. We have made our LightRAG open-source and available at the link: https://github.com/HKUDS/LightRAG
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。