Retrieval-Augmented Generation (RAG) enhances large language models by incorporating external knowledge. However, existing vector-based methods often fail on global sensemaking tasks that require reasoning across many documents. GraphRAG addresses this by organizing documents into a knowledge graph with hierarchical communities that can be recursively summarized. Current GraphRAG approaches rely on Leiden clustering for community detection, but we prove that on sparse knowledge graphs, where average degree is constant and most nodes have low degree, modularity optimization admits exponentially many near-optimal partitions, making Leiden-based communities inherently non-reproducible. To address this, we propose replacing Leiden with k-core decomposition, which yields a deterministic, density-aware hierarchy in linear time. We introduce a set of lightweight heuristics that leverage the k-core hierarchy to construct size-bounded, connectivity-preserving communities for retrieval and summarization, along with a token-budget-aware sampling strategy that reduces LLM costs. We evaluate our methods on real-world datasets including financial earnings transcripts, news articles, and podcasts, using three LLMs for answer generation and five independent LLM judges for head-to-head evaluation. Across datasets and models, our approach consistently improves answer comprehensiveness and diversity while reducing token usage, demonstrating that k-core-based GraphRAG is an effective and efficient framework for global sensemaking.
翻译:检索增强生成通过整合外部知识来增强大语言模型的能力。然而,现有基于向量的方法通常在全球理解任务中失效,这类任务需要跨多篇文档进行推理。图增强检索生成通过将文档组织成具有层级社区的知识图谱来解决这一问题,这些社区可以递归地生成摘要。当前图增强检索生成方法依赖Leiden聚类进行社区检测,但我们证明,在平均度数为常数且大多数节点度数较低的稀疏知识图谱上,模块度优化允许指数数量级接近最优的划分,这使得基于Leiden的社区本质上不可复现。为解决此问题,我们提出用k-核分解替代Leiden,该方法能以线性时间复杂度生成确定性的、密度感知的层级结构。我们引入了一组轻量级启发式方法,利用k-核层级结构构建规模受限、保持连通性的社区用于检索和摘要,同时提出一种基于token预算的采样策略以降低大语言模型成本。我们在包括金融收益报告、新闻文章和播客在内的真实世界数据集上进行了评估,使用三种大语言模型生成答案,并由五个独立的大语言模型评判员进行头对头评估。跨数据集和模型,我们的方法持续提升了答案的全面性和多样性,同时减少了token使用量,证明基于k-核的图增强检索生成是全球理解任务中一个高效且有效的框架。