Adaptive RAG Context Partitioning for Long-Document Coherence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Models (LLMs) face challenges in processing long documents, maintaining coherence, and performing long-range reasoning, particularly in domains like legal, engineering, and healthcare, due to the 'attention span problem', which leads to performance drops with lengthy inputs. Current Retrieval-Augmented Generation (RAG) systems struggle with inefficient document chunking and lack sophisticated mechanisms for adapting to different queries and documents, resulting in sub-optimal retrieval and generation performance.

Innovation Solution

The system employs a multi-level approach with iterative attention focusing (LASER) to refine and condense document context, uses context-optimized retrieval (SCORE-RAG) for advanced document processing, and incorporates Hierarchical Tokens (H-Tokens) for improved context management and semantic coherence, along with a network of smaller LLMs for specialized tasks, enhancing LLMs' attention span and coherence across long documents.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If LLMs process long documents directly, then they can access complete information, but their attention span causes performance drops and loss of coherence

Engineering Contradiction:
Improveinformation completenessVSAvoidcoherence maintenance
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent segments long documents into smaller chunks or blocks that can be processed individually by the LLM. This segmentation allows the system to maintain coherence within each chunk while still accessing complete information across all chunks, resolving the contradiction between information completeness and coherence maintenance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a hierarchical dimension to document processing, organizing chunks into a tree structure with different levels of abstraction. This dimensional change allows the system to process information at multiple scales simultaneously, maintaining both local coherence within chunks and global information completeness across the entire document.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If current RAG systems use simple document chunking, then processing is faster and simpler, but retrieval performance becomes sub-optimal

Engineering Contradiction:
Improveprocessing speedVSAvoidretrieval accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent implements dynamic chunking strategies that adapt to different query types and document structures. Rather than using fixed chunking methods, the system dynamically determines optimal chunk sizes and boundaries based on the specific retrieval task, maintaining both processing efficiency and retrieval accuracy.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes key parameters of the chunking process including chunk size, overlap ratios, and segmentation boundaries based on the retrieval task requirements. These parameter adjustments allow the system to optimize both processing speed and retrieval accuracy for different scenarios.

Inventive Principle:
Principle #35Parameter changes

3Use of energy by moving object

If LLMs are trained on limited data, then training is more efficient, but their ability to perform long-range reasoning deteriorates

Engineering Contradiction:
Improvetraining efficiencyVSAvoidlong-range reasoning capability
Core Design Contradiction:
Use of energy by moving objectVSAdaptability or versatility

Solution Approach 1:

The patent applies preliminary action by pre-processing long documents into structured chunks with metadata and hierarchical relationships before they are fed to the LLM. This preliminary organization enables the LLM to perform long-range reasoning more effectively on limited training data, as the structural information is already prepared and accessible.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250363142A1Method and System for Optimizing Use of Retrieval Augmented Generation Pipelines in Generative Artificial Intelligence Applications
Publication Date: 2025.11.27 MADISETTI VIJAY
  • US20250363142A1 patent drawing
  • US20250363142A1 patent drawing
  • US20250363142A1 patent drawing

AI summary

Systems and methods of adaptive context partitioning in a retrieval-augmented generation system, including receiving a query from a user; forming a combined context by retrieving relevant documents from a document database based on the query, determining characteristics of the combined context, monitoring current system resources including processor availability and memory utilization, dynamically determining a partition size based on the current system resources and the one or more characteristics of the combined context, partitioning the combined context into context partitions according to the partition size, generating intermediate analysis results by processing each context partition using a mapper prompt large language models (LLMs), generating a final response by processing the intermediate analysis results using a reducer prompt through the LLMs, and transmitting the final response to the user.