Knowledge Graph RAG Pipeline for Long-Document AI Chat Accuracy
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing AI conversation agents face challenges in efficiently distilling relevant information from lengthy contextual documents to generate accurate responses due to the trade-off between nodes and relationships coverage versus computational overhead.
Innovation Solution
A knowledge graph synthesis pipeline is employed to decontextualize documents, segment them into chunks, and extract entities and relations, using a smaller LLM to construct a knowledge graph for efficient response generation, thereby improving accuracy and reducing computational costs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a large language model is used to process lengthy contextual documents, then the response accuracy may be maintained, but the computational overhead and processing time increase significantly
Solution Approach 1:
The patent segments lengthy contextual documents into smaller chunks and processes them in parallel using multiple LLM instances. Each chunk is processed independently to extract relevant information, which is then aggregated to form the final response. This segmentation reduces the computational burden on single LLM instances while maintaining overall response accuracy through distributed processing.
Solution Approach 2:
The patent introduces an intermediary retrieval system that pre-processes and indexes contextual documents before LLM processing. This intermediary layer extracts key entities and relationships, creating a structured knowledge base that the LLM can query efficiently. This mediation reduces the amount of raw text the LLM must process, thereby lowering computational overhead while preserving accuracy.
2Measurement precision
If more contextual information is included in the knowledge graph, then the response accuracy improves, but the construction time and computational resources increase
Solution Approach 1:
The patent performs preliminary indexing and entity extraction on contextual documents before they are needed for query processing. By pre-processing the documents to identify and structure key information, the system reduces the time required to construct knowledge graphs during actual query operations. This preliminary action ensures that when queries are made, the knowledge graph can be quickly assembled from pre-processed data.
Solution Approach 2:
The patent applies local quality by selectively processing and including only the most relevant portions of contextual information in the knowledge graph, rather than uniformly processing all data. The system identifies and prioritizes high-value information segments, allocating more computational resources to processing these critical portions while using fewer resources on less important data, thereby optimizing the balance between accuracy and construction time.
Data Source
AI summary
Embodiments described herein provide knowledge graph synthesis pipeline to generate a knowledge graph from long documents so as to serve a retrieval augmented generation (RAG) large language model (LLM) based AI chat agent. Specifically, each document is decontextualized by substituting entity references with their explicit mentions. Subsequently, to enhance coverage, the document is segmented into chunks and entities and relations are extracted from each chunk independently, e.g., by an LLM. The extracted entities and relations are then synthesized into a knowledge graph for the document. Therefore, the retrieval component may search the knowledge graph based on a received user query to retrieve entities and relations, which are in turn input to an LLM to generate a response.


