PathRAG:基于关系路径剪枝的图检索增强生成
PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational Paths
AI总结:
针对现有图RAG检索冗余、提示组织扁平导致性能不佳的问题,提出PathRAG方法,通过流剪枝提取关键关系路径并构造提示,在多数据集多维度上优于现有最优基线。
摘要:
检索增强生成(RAG)通过从外部数据库检索知识来提升大语言模型(LLMs)的响应质量。典型RAG方法将文本数据库切分为文本块,以扁平结构组织这些文本块以实现高效检索。为更好地捕捉文本数据库中固有的依赖关系与结构化关联,研究者提出将文本信息组织为索引图,即基于图的RAG。但我们认为,当前基于图的RAG方法的局限在于检索信息存在冗余,而非信息不足。此外,以往方法在提示词中以扁平结构组织检索到的信息,导致性能未达最优。为克服这些局限,我们提出PathRAG,从索引图中检索关键关系路径,并将这些路径转换为文本形式用于提示LLMs。具体而言,PathRAG通过基于流的剪枝有效减少冗余信息,同时通过基于路径的提示引导LLMs生成更具逻辑性和连贯性的响应。实验结果显示,PathRAG在6个数据集、5个评估维度上的表现均持续优于当前最优基线方法。代码可在以下链接获取:https://github.com/BUPT-GAMMA/PathRAG
英文摘要:
Retrieval-augmented generation (RAG) improves the response quality of large language models (LLMs) by retrieving knowledge from external databases. Typical RAG approaches split the text database into chunks, organizing them in a flat structure for efficient searches. To better capture the inherent dependencies and structured relationships across the text database, researchers propose to organize textual information into an indexing graph, known asgraph-based RAG. However, we argue that the limitation of current graph-based RAG methods lies in the redundancy of the retrieved information, rather than its insufficiency. Moreover, previous methods use a flat structure to organize retrieved information within the prompts, leading to suboptimal performance. To overcome these limitations, we propose PathRAG, which retrieves key relational paths from the indexing graph, and converts these paths into textual form for prompting LLMs. Specifically, PathRAG effectively reduces redundant information with flow-based pruning, while guiding LLMs to generate more logical and coherent responses with path-based prompting. Experimental results show that PathRAG consistently outperforms state-of-the-art baselines across six datasets and five evaluation dimensions. The code is available at the following link: https://github.com/BUPT-GAMMA/PathRAG
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。