Recursive Chunking
Also known as: Hierarchical chunking, Recursive character split
Split by the document's own hierarchy; the LangChain and LlamaIndex default for markdown and code.
The modern default chunking strategy for structured content. Walks the document's own hierarchy (headings, paragraphs, sentences, and finally words), descending only when a chunk still exceeds the size cap. Preserves headings with their body text, keeps code fences intact, and produces bounded chunks aligned to real semantic units.
In practice
Any candidate who says they chunk markdown by fixed size is missing the standard. Naming recursive as the default for structured content is a table-stakes RAG signal.
How it compares
Recursive respects the document's own structure; fixed-size ignores it entirely.
Recursive uses structural boundaries (headings, paragraphs); semantic uses embedding-similarity gaps between sentences.
Comparisons that include Recursive Chunking
Related topics
Related terms
Retrieval-Augmented Generation (RAG)
Fetch relevant docs at inference time and stuff them into the prompt so the model can answer from real data.
Chunking
Cutting documents into retrievable pieces before embedding them.
Context Window
The max number of tokens a model can attend to at once.
Hallucination
When a model confidently makes up something that isn't true.
AI System Design
End-to-end design of production LLM systems: ingestion, retrieval, serving, eval, monitoring.
HNSW (Hierarchical Navigable Small World)
A graph-based ANN index with log-time approximate search, excellent recall/latency trade-off.