Hierarchical chunking
Hierarchical chunking is a method of dividing text into nested segments organized across multiple structural or granular levels.
The Art of AI Product Development
Hierarchical chunking divides a document into nested structural levels such as chapters, sections, and smaller chunks.
- How it is used
- Supports search and retrieval-augmented generation by locating relevant material within long, structurally complex documents.
- How deep it goes
- Explains nested division, document fit, and chunk-size trade-offs without detailing an implementation procedure.
- Examples
- Uses annual reports and research papers, contrasting executive-summary retrieval with detailed financial or analytical content.
- What you can do after
- Evaluate retrieval designs by matching document structure and chunk size to users’ needs for precision or broader context.
Read how The Art of AI Product Development explains hierarchical chunking →
Generative AI in Action
Hierarchical chunking is a chunking method that divides text according to nested structural levels such as chapters, sections, and subsections.
- How it is used
- Supports retrieval-augmented generation by organizing document text into chunks aligned with chapters, sections, and subsections.
- How deep it goes
- Defines nested structural splitting and contrasts alternatives, but does not provide hierarchical implementation details.
- Examples
- Uses the UK Constitution article from Wikipedia to illustrate how different chunking strategies affect context and information boundaries.
- What you can do after
- Evaluate/understand how document structure can guide chunk boundaries and how alternatives affect context preservation.
Read how Generative AI in Action explains hierarchical chunking →
Related concepts
- text chunkkind of · A text chunk is a bounded segment of a larger text treated as a unit for processing, storage, or retrieval.
- chunkingkind of · Chunking is the process of dividing content or data into smaller units for processing, retrieval, or organization.
- content-aware chunkingkind of · Content-aware chunking divides source material into retrieval units while using its structure or meaning to choose boundaries.
Questions about hierarchical chunking
What is hierarchical chunking?
Hierarchical chunking is a method of dividing text into nested segments organized across multiple structural or granular levels.
Which Manning books explain hierarchical chunking?
The Art of AI Product Development and Generative AI in Action.
What is the difference between hierarchical chunking and fixed-window chunking?
Hierarchical chunking is a method of dividing text into nested segments organized across multiple structural or granular levels. A chunking method that divides content into fixed-size windows, often with overlap.
What is hierarchical chunking a kind of?
Hierarchical chunking is a kind of text chunk. A text chunk is a bounded segment of a larger text treated as a unit for processing, storage, or retrieval.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

