🤖 AI Summary
This work addresses the limitations of conventional Graph Retrieval-Augmented Generation (GraphRAG) approaches, which often suffer from fragmented knowledge graphs, thematic inconsistency, and logical contradictions due to the absence of a global perspective, thereby impairing performance on complex queries. To overcome these issues, the authors propose MemGraphRAG, a novel framework that introduces a shared-memory-based multi-agent collaboration mechanism to dynamically maintain global contextual consistency, resolve logical conflicts, and ensure structural connectivity during graph construction. Furthermore, they design a memory-aware hierarchical retrieval algorithm tailored to leverage the resulting high-quality graph structure. Experimental results demonstrate that MemGraphRAG significantly outperforms state-of-the-art models across multiple benchmarks, achieving substantial gains in answer accuracy and consistency for complex queries while preserving computational efficiency.
📝 Abstract
Retrieval-Augmented Generation (RAG) has become an essential method for mitigating hallucinations in Large Language Models (LLMs) by leveraging external knowledge. Although effective for simple queries, traditional RAG struggles with large-scale, unstructured corpora where information is highly fragmented. Graph-based RAG (GraphRAG) incorporates knowledge graphs to capture structural relationships, enabling more comprehensive retrieval for complex reasoning. However, existing GraphRAG methods rely on isolated, fragment-level extraction for graph construction, lacking a global perspective on the whole corpus. As a result, these methods frequently lead to thematically inconsistent, logically conflicting, and structurally fragmented graphs that degrade retrieval performance. In this paper, we propose MemGraphRAG, a novel framework that introduces a memory-based multi-agent system to ensure high-quality graph construction. Specifically, MemGraphRAG employs a collaborative society of agents supported by shared memory, which provides a unified global context throughout the extraction process. This mechanism allows agents to dynamically resolve logical conflicts and maintain structural connectivity throughout the corpus. Furthermore, we propose a memory-aware hierarchical retrieval algorithm tailored for the constructed graph. Extensive experiments on multiple benchmarks demonstrate that MemGraphRAG outperforms the state-of-the-art baseline models with comparable efficiency. Our code is available at https://github.com/XMUDeepLIT/MemGraphRAG.