Aha.
正在载入中英对照阅读…

arXiv:2410.05779 · 中英对照阅读

LightRAG:简单快速的检索增强生成(RAG)

LightRAG: Simple and Fast Retrieval-Augmented Generation

Zirui Guo、Lianghao Xia、Yanhua Yu、Tu Ao、Chao Huang、Beijing University of Posts、Telecommunications、University of Hong Kongzrguo101@hku.hk aka_xia@foxmail.com chaohuang75@gmail.com

中文速览

面对传统 RAG 只会从零散文本片段里找答案、难以串起跨文档关系的问题,LightRAG 把文本整理成由实体和关系组成的知识图谱,并结合向量检索,再按具体细节和宏观主题两层检索信息。它还能把新资料增量并入图谱,不必每次从头重建索引。实验显示,LightRAG 相比已有方法提升了检索准确性和效率,也更能适应不断更新的知识库。这样一来,系统不只更快找到相关内容,也更有机会把分散信息连起来,回答复杂问题。

摘要

检索增强生成(RAG)系统通过整合外部知识源来增强大语言模型(LLM),从而能够提供更准确、且与上下文更相关的回答,以满足用户需求。然而,现有的 RAG 系统存在显著局限,包括依赖扁平化数据表示以及上下文感知能力不足,这可能导致答案支离破碎,无法捕捉复杂的相互依赖关系。为应对这些挑战,我们提出了 LightRAG,它将图结构融入文本索引和检索过程。该创新框架采用双层检索系统,通过低层和高层知识发现增强全面的信息检索能力。此外,将图结构与向量表示相结合,有助于高效检索相关实体及其关系,在保持上下文相关性的同时显著缩短响应时间。增量更新算法进一步增强了这一能力,可确保新数据得到及时整合,使系统在快速变化的数据环境中仍能保持有效且响应迅速。大量实验验证表明,与现有方法相比,该系统在检索准确率和效率方面均有显著提升。我们已将 LightRAG 开源,并可通过以下链接获取:https://github.com/HKUDS/LightRAG。

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.

术语表

Retrieval-Augmented Generation (RAG)
检索增强生成(RAG)
large language model (LLM)
大语言模型(LLM)
LightRAG
LightRAG
graph-empowered RAG
图增强 RAG
graph structure
图结构
graph-based knowledge structure
基于图的知识结构
text indexing
文本索引
dual-level retrieval
双层检索
low-level retrieval
低层检索
high-level retrieval
高层检索
incremental update algorithm
增量更新算法
vector representation
向量表示
knowledge graph
知识图谱
entity
实体
entity relationship
实体关系
inter-dependency
相互依赖关系
contextual awareness
上下文感知能力
flat data representation
扁平化数据表示
chunking
文本分块
text corpus
文本语料库
similarity search
相似度检索
external knowledge database
外部知识库
retrieval component
检索组件
generation component
生成组件
data indexer
数据索引器
data retriever
数据检索器
retrieval accuracy
检索准确率
model ablation
模型消融