While standard Retrieval-Augmented Generation (RAG) based on chunks, GraphRAG structures knowledge as graphs to leverage the relations among entities. However, previous GraphRAG methods are limited by binary relations: one edge in the graph only connects two entities, which cannot well model the n-ary relations among more than two entities that widely exist in reality. To address this limitation, we propose HyperGraphRAG, a novel hypergraph-based RAG method that represents n-ary relational facts via hyperedges, modeling the complicated n-ary relations in the real world. To retrieve and generate over hypergraphs, we introduce a complete pipeline with a hypergraph construction method, a hypergraph retrieval strategy, and a hypergraph-guided generation mechanism. Experiments across medicine, agriculture, computer science, and law demonstrate that HyperGraphRAG outperforms standard RAG and GraphRAG in accuracy and generation quality.
翻译:尽管基于文本块的检索增强生成(RAG)已成为标准方法,GraphRAG通过将知识构建为图以利用实体间的关系。然而,现有的GraphRAG方法受限于二元关系:图中的一条边仅连接两个实体,无法很好地建模现实中广泛存在的、涉及两个以上实体的n元关系。为解决这一局限,我们提出了HyperGraphRAG,一种基于超图的新型RAG方法,它通过超边表示n元关系事实,从而对现实世界中的复杂n元关系进行建模。为了在超图上进行检索与生成,我们引入了一套完整的流程,包括超图构建方法、超图检索策略以及超图引导的生成机制。在医学、农业、计算机科学和法律领域的实验表明,HyperGraphRAG在准确性和生成质量上均优于标准RAG和GraphRAG。