liveBook · Manning

Hierarchical chunking

As explained in The Art of AI Product Development

Hierarchical chunking divides a document into nested structural levels such as chapters, sections, and smaller chunks.

Hierarchical chunking organizes long documents into nested levels, such as chapters and sections, before dividing them into smaller retrieval chunks. It preserves document structure while helping users locate either broad context or specific analysis. section 7.2.4

Choose the structure and chunk size according to the document and retrieval goal:

  • Use it for annual reports, research papers, and other long documents whose chapters or sections carry meaningful context. section 7.2.4
  • Favor shorter chunks for precise details, and longer chunks when users need background for open-ended drafting. section 7.2.4
  • Pair the structure with contextual retrieval when isolated chunks lose essential information about the subject, process, or time period. section 7.2.4

How The Art of AI Product Development covers it

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.
How it connects
Connects hierarchical chunking with semantic chunking, contextual retrieval, semantic search, and lexical search.

Also explained in

Compare how 2 books explain hierarchical chunking →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.