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
Questions that mention this term
Related terms
AI System Design
End-to-end design of production LLM systems: ingestion, retrieval, serving, eval, monitoring.
BM25
Classical TF-IDF-style lexical scoring: a surprisingly strong baseline, still the first stage of many hybrid RAG pipelines.
Chunking
Cutting documents into retrievable pieces before embedding them.
Context Engineering
Deciding what makes it into the model's context window (prompt + RAG + history + memory), and why.
Context Rot
Long-running chats degrade: early instructions get forgotten, and tool calls become less reliable.
Context Window
The max number of tokens a model can attend to at once.