Splitting source material into units that can be indexed and retrieved.
Chunk size and boundaries determine whether retrieval returns focused evidence or fragments missing necessary context. Strong chunking respects document structure, metadata, permissions, and the questions users actually ask.
Imagine a handbook whose rule appears in one paragraph and whose exception appears in the next. Splitting between them can give an assistant the rule without its qualification. Keep enough surrounding text for a retrieved passage to make sense.
A smaller chunk is more focused, but may lose context. A larger chunk preserves more context, but can include irrelevant material. Test boundaries with the questions readers actually ask.
Background: LangChain: retrieval and generation.