Hierarchical Document Graphs for Structure-Aware RAG Retrieval
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing retrieval augmented generation (RAG) methods fail to effectively capture the internal structure and relationships within documents, leading to suboptimal search results due to the lack of consideration of document hierarchies.
Innovation Solution
A method and system that construct hierarchical document graphs mirroring the document structure, using nodes embedded with context and property embeddings, enabling efficient retrieval and response generation through a large language model (LLM) based on user queries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional RAG methods are used to retrieve information from documents, then the retrieval process is simple and fast, but the search results are suboptimal because the internal structure and relationships within documents are not captured
Solution Approach 1:
The patent segments documents into hierarchical structures (sections, subsections, paragraphs) and represents them as separate nodes in a knowledge graph. This segmentation allows the system to capture internal document structure while maintaining retrieval capability, resolving the contradiction between simple retrieval and accurate structure capture.
Solution Approach 2:
The patent introduces a knowledge graph as an intermediary between the document storage and the RAG system. This knowledge graph captures hierarchical relationships and semantic connections, enabling accurate structure-aware retrieval without complicating the core RAG workflow. The knowledge graph acts as a mediator that translates document structure into queryable relationships.
2Reliability
If hierarchical document graphs with context embeddings are constructed, then search relevance and coherence are enhanced, but the construction and storage requirements increase
Solution Approach 1:
The patent merges multiple types of information (document hierarchy, semantic relationships, context embeddings) into a unified knowledge graph structure. By combining these elements into single graph nodes and edges, the system achieves high contextual accuracy without proportionally increasing storage requirements, as shared structures are represented efficiently.
Solution Approach 2:
The patent transforms flat document text into a multi-dimensional hierarchical graph structure with multiple levels (sections, subsections, paragraphs) and relationship types. This dimensional transformation enables rich contextual representation while using graph theory efficiencies to manage storage, as the hierarchical nature allows compact representation of nested relationships.
Data Source
AI summary
A method includes obtaining a hierarchical document structure of a raw document. The hierarchical document structure includes a multitude of sections arranged in a hierarchy of successive document levels. A hierarchical document graph having a graph hierarchical structure corresponding to the hierarchical document structure of the raw document is constructed. A hierarchical document graph corresponding to the raw document matching a user query is retrieved. A hierarchical search is performed on the hierarchical document graph to obtain a set of relevant nodes. A set of relevant content embeddings is retrieved from the set of relevant nodes. A large language model (LLM) generates a response to the user query from the set of relevant content embeddings. The response is presented in a user application.


