NodeRAG: Structuring Graph-based RAG with Heterogeneous Nodes

Tianyang Xu, Haojie Zheng, Chengze Li, Haoxiang Chen, Yixin Liu, Ruoxi Chen, Lichao Sun · 2025

Read NodeRAG: Structuring Graph-based RAG with Heterogeneous Nodes by Tianyang Xu, Haojie Zheng, Chengze Li, Haoxiang Chen, Yixin Liu, Ruoxi Chen, Lichao Sun (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-11544.txt.

Introduction

Tianyang Xu and co-authors present a 2025 framework called NodeRAG for giving language models better access to a private text collection. The base method, retrieval-augmented generation, lets a model look up facts before it answers. Graph-based versions build a knowledge graph over the texts first, so the model can follow links between facts.

The authors argue that most graph versions pay little care to how the graph itself is shaped. A poor shape blocks good graph methods and weakens answers. NodeRAG builds the graph from mixed node types, each suited to a step in the lookup flow. That design lets graph tools slot into the whole process in a smooth way. The goal is answers that stay closer to the source texts.

Catalog record

CREATORTianyang Xu, Haojie Zheng, Chengze Li, Haoxiang Chen, Yixin Liu, Ruoxi Chen, Lichao Sun
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE74 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-11544

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

NodeRAG: Structuring Graph-based RAG with Heterogeneous Nodes Tianyang Xu, Haojie Zheng, Chengze Li, Haoxiang Chen, Yixin Liu, Ruoxi Chen, Lichao Sun Abstract Retrieval-augmented generation (RAG) empowers large language models to access external and private corpus, enabling factually consistent responses in specific domains. By exploiting the inherent structure of the corpus, graph-based RAG methods further enrich this process by building a knowledge graph index and leveraging the structural nature of graphs. However, current graph-based RAG approaches seldom prioritize the design of graph structures. Inadequately designed graph not only impede the seamless integration of diverse graph algorithms but also result in workflow inconsistencies and degraded performance. To further unleash the potential of graph for RAG, we propose NodeRAG, a graph-centric framework introducing heterogeneous graph structures that enable the seamless and holistic integration of graph-based methodologies into the RAG workflow. By aligning closely with the capabilities of LLMs, this framework ensures a fully cohesive and efficient end-to-end process. Through extensive experiments, we demonstrate that NodeRAG exhibits performance advantages over previous methods, including GraphRAG and LightRAG, not only in indexing time, query time, and storage efficiency but also in delivering superior question-answering performance on multi-hop benchmarks and open-ended head-to-head evaluations with minimal retrieval tokens. Our GitHub repository could be seen at this link . Figure 1: Comparsions between NodeRAG and other RAG systems. NaïveRAG retrieving fragmented text chunks, leads to redundant information. HippoRAG introduces knowledge graphs but lacks high-level summarization. GraphRAG retrieves community summaries but may still produce coarse-grained information. LightRAG incorporates one-hop neighbors but retrieves redundant nodes. In contrast, NodeRAG utilizes multiple node types, including high-level elements, semantic units, and relationships, enabling more precise, hierarchical retrieval while reducing irrelevant information. 1 Introduction Retrieval-augmented generation (RAG) has emerged as a solution to the challenges posed by the rapid evolution of real-world knowledge domains Fan et al. (2024) , coupling large language models (LLMs) with an external retrieval mechanism to ensure the generation of factually consistent and contextually relevant information Tonmoy et al. (2024) ; Shrestha et al. (2024) ; Liu et al. (2024) . Despite recent progress, current RAG methods face notable shortcomings in handling multi-hop reasoning Luo et al. (2023) ; Wang et al. (2024b) and summary-level queries Han et al. (2024a) ; Wen et al. (2023) due to their insufficient utilization of data structures and lack of high-level understanding of the text corpus. Graph-based RAG methods Tian et al. (2024) ; Park et al. (2023) have been proposed to enhance retrieval and question-answering performance, specifically addressing the two main challenges faced by traditional RAG approaches. Leveraging LLMs to decompose raw data into graph structures Jiménez Gutiérrez et al. (2024) ; He et al. (2024) for utilizing structural information, as well as employing LLMs for summary-based enhancements Edge et al. (2024) ; Guo et al. (2024) to derive insights beyond the original text, has gradually become mainstream approaches. However, previous Graph-based RAG works Trajanoska et al. (2023) ; Jiménez Gutiérrez et al. (2024) have rarely considered the critical role of graph structures, i.e., what forms of graph better support RAG. Among existing approaches, knowledge graphs Sanmartin (2024) ; Wang et al. (2024b) extract triples, with the graph containing only structural information, yet retrieval context remains confined to text chunks, which often lack semantic coherence and include unrelated information. While current methods attempt to incorporate more information into the graph and extract deeper insights, they suffer from inefficiencies and inconsistencies due to inadequately designed structures. For instance, as illustrated in Figure 1 , GraphRAG Edge et al. (2024) , adopt a tightly coupled entity-event homogeneous structure, hindering the integration of original context and summary information into the graph. This results in inconsistencies in retrieval methods (separating local and global retrieval) and leads to coarse-grained retrieval, where retrieving an entity indiscriminately includes all associated events, adding irrelevant information. To address these limitations, we propose NodeRAG, which is built around a well-designed Heterogeneous Graph, comprehensively considering the entire process of graph indexing and searching, enabling fine-grained retrieval. The heterograph adheres to the principle of unfolding and flattening, decomposing different types of information to construct a heterogeneous fully nodalized graph where nodes serve distinct functions and roles. This means that entities, relationships, original text chunks, independently decomposed events from text chunks, and summaries extracted by LLMs are all represented as nodes within the graph. The heterograph not only encapsulates information from the original corpus but also extends beyond it, incorporating enriched insights such as key node attributes, and high-level discoveries. Each node in heterograph consists of unstructured content, while preserving structural connections between nodes, striking a balance between structural integrity and flexibility. As illustrated in Figure 1 , for a multi-hop question, NodeRAG can retrieve a semantically coherent, independent event (semantic unit) and high-level discoveries (high-level elements) related to key entities such as Harry, Neville, and the three-headed dog using graph algorithms, providing explainable and fine-grained retrievals as well as high-level understanding. The key contributions of our work can be summarized in three main aspects. (1) Better Graph Structure for RAG The graph structure serves as the foundation for graph-based RAG where significance has been overlooked. Our work emphasizes its importance and introduces a graph structure that better supports RAG. (2) Fine-grained and Explainable Retrieval The heterograph enables fine-grained and functionally distinct nodes, allowing graph algorithms to effectively and reasonably identify key multi-hop nodes. This leads to more relevant retrieval with minimal retrieval context, enhancing both precision and interoperability. (3) Unified-Level Information Retrieval Decomposed information from documents and extracted insights from LLMs are not treated as separate layer but are instead unified as nodes within the heterograph. This integration allows for a cohesive framework capable of handling information needs across different levels. In addition, extensive experiments demonstrate that NodeRAG not only outperforms previous graph-based RAG methods on multi-hop tasks but also exhibits superior performance in open-ended head-to-head evaluations. With minimal retrieval tokens, it achieves highly precise retrieval while also demonstrating system-level efficiency advantages, including improvements in indexing time, query time, and storage efficiency, as shown in appendix A . 2 NodeRAG The NodeRAG pipeline is built on a foundational graph structure defined as the heterograph, which will be introduced in Section 2.1 . The workflow is divided into two primary stages, graph indexing and graph searching. Graph indexing comprises three components, graph decomposition, graph augmentation, and graph enrichment, which are discussed in Sections 2.2 , 2.3 , and 2.4 , respectively. This stage integrates various types of nodes and edges into the heterograph by leveraging LLMs and graph algorithms. The subsequent stage, graph searching, is detailed in Section 2.5 and combines the structural advantages of the heterograph with graph algorithms to efficiently retrieve relevant information. Moreover, the fundamental concepts and implementation details of the graph algorithms used in the pipeline are provided in Appendix C , while the prompting instructions for LLMs can be found in Appendix E for reference. Figure 2: Main indexing workflow of NodeRAG. It illustrates the step-by-step construction of the heterograph, including the process of graph decomposition, graph augmentation, and graph enrichment 2.1 Heterograph The concept of the heterograph embodies the principle of comprehensive unfolding and flattening of information into a fully nodalized structure. This structure achieves its granularity through the integration of

Read the complete text