Hierarchical Document Chunking for Prompt-Limited RAG Retrieval

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for chunking documents to fit within the prompt size limitations of generative AI models like GPT3.5-Turbo, GPT4, and GPT-4-32k result in low-quality matches and incorrect results due to the limitations of conventional chunking techniques, leading to a negative user experience.

Innovation Solution

A document hierarchy-based chunking process that utilizes the hierarchical structure of documents, such as the Document Object Model (DOM), to generate optimized chunks that fit within the prompt size limitations, enhancing the relevance and accuracy of matches by generating chunks based on headings and their associated content portions, and using embeddings for efficient retrieval augmented generation (RAG).

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If conventional chunking methods are used to break documents into smaller pieces, then the prompt size limitation is satisfied, but the match quality between user queries and content chunks deteriorates

Engineering Contradiction:
Improveprompt sizeVSAvoidmatch quality
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent applies segmentation by dividing documents into chunks based on hierarchical structure (headings, subheadings, sections) rather than arbitrary character counts. This ensures each chunk represents a coherent semantic unit while fitting within prompt size limits, thereby maintaining both quantity constraints and match quality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a hierarchical dimension to the chunking process by utilizing the document's existing structure (headings, subheadings, paragraphs). Instead of one-dimensional character-based splitting, the system multi-dimensionally segments documents along structural boundaries, improving semantic coherence and query matching while respecting prompt size constraints.

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

2Extent of automation

If documents are broken into smaller chunks to fit prompt limits, then the generative AI model can process the input, but the relevance and accuracy of the answers deteriorate

Engineering Contradiction:
Improvemodel processing capabilityVSAvoidanswer accuracy
Core Design Contradiction:
Extent of automationVSReliability

Solution Approach 1:

The patent applies preliminary action by pre-processing documents into hierarchically-structured chunks before they are fed to the generative AI model. This pre-chunking based on document structure ensures that when queries are processed, the relevant contextual information is already organized in semantically meaningful units, improving answer accuracy without compromising model processing capability.

Inventive Principle:
Principle #10Preliminary action

3Quantity of substance

If arbitrary chunking is used to divide documents, then the prompt size constraint is met, but the user experience deteriorates due to irrelevant or incorrect results

Engineering Contradiction:
Improveprompt sizeVSAvoiduser experience
Core Design Contradiction:
Quantity of substanceVSEase of operation

Solution Approach 1:

The patent applies local quality by ensuring that each chunk has high semantic coherence and represents a distinct topical unit within the document hierarchy. By making each chunk locally meaningful and self-contained, the system improves relevance matching and user experience while maintaining compliance with prompt size constraints.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12505166B2System and method for generating optimized chunks for retrieval augmented generation using document hierarchy
Publication Date: 2025.12.23 DELL PROD LP
  • US12505166B2 patent drawing
  • US12505166B2 patent drawing
  • US12505166B2 patent drawing

AI summary

A method, computer program product, and computing system for identifying a plurality of headings from a document by processing a hierarchical structure associated with the document including the plurality of headings and a plurality of content portions within the plurality of headings. A plurality of respective chunks are generated using the plurality of headings and a prompt size limitation associated with a prompt of a generative artificial intelligence (AI) model. The plurality of respective chunks are provided for generating a prompt for the generative AI model.