Document Structure-Based Chunking
~10 min read
Use a document's own structure — headings, sections, paragraphs — to define chunk boundaries directly, maintaining structural integrity with the document's logical organization.
Document Structure-Based Chunking is a Pro topic
Sign in, then upgrade to Pro or Power to unlock this topic and the full AI Engineering curriculum.
Key points
- •Uses the document's own headings/sections/paragraphs directly as chunk boundaries — no embeddings or size computation needed
- •Maintains structural integrity by aligning exactly with the document's logical organization
- •Works best on genuinely well-structured content (manuals, specs, contracts) — assumes structure that may not exist
- •Resulting chunks can vary wildly in length, sometimes exceeding embedding model token limits
- •Commonly merged with recursive splitting as a second pass, to cap any oversized structural section