Learning path · Embeddings & Representation · 41
Structure-Aware Chunking
Splitting along document structure—headings, tables, slides, code blocks—so chunks respect logical units and metadata.
Why it matters
- Essential for wikis, APIs docs, and regulated manuals.
- Enables citations that point to sections users recognize.
- Pairs with GraphRAG for hierarchical knowledge.
Key ideas
- Heading paths
- Table row units
- Code function blocks
Top resources
- 01DocsLlamaIndex
Node parsers / chunking
Why this resource. Headings, code, and tables as first-class split points.
Covers in this concept
- document structure
- node parsers
- 02ArticleAnthropic
Contextual retrieval
Why this resource. Why structure in the chunk beats a raw 512-token window.
Covers in this concept
- contextual retrieval
Structure-aware chunking uses HTML, Markdown, PDF outlines, or OCR layout to never split mid-table or mid-procedure step. Compared to semantic chunking, it trusts author structure over statistical breakpoints—superior for SOPs and reference docs. Compared to late chunking, it is cheaper and easier to explain in audits. Attach breadcrumb metadata (H1 > H2 > H3) to each chunk for filtering and user-facing citations. Sync heading metadata when wikis rename sections; stale breadcrumbs confuse both users and ACL filters tied to path prefixes.
Updated 2026-08-09 · Full learning path