Lesson 07: How to split documents into chunks
C says an unreserved book can be renewed once before its due date for seven additional days. Split it into eligibility, frequency, and seven days. With only the final fragment, can you explain renewal rules?
The number remains, but eligibility, timing, and frequency are gone. That loss is what deserves attention when chunking.
A small passage still needs to make sense
A chunk is a passage divided from a document; chunking creates them. Retrieval selects passages for the model, so each should identify its subject and retain necessary conditions. Titles, sections, and paragraphs offer useful boundaries.
For C, retain the full renewal rule with title and version. Frequency, duration, and reservation questions then have supporting evidence together. This sentence happens to contain one coherent rule.
A whole handbook can be too broad: hours, rooms, and renewals may contain the answer but require another selection step. Choose sizes for questions rather than a universal character count.
Compare two ways of splitting
Paragraph splits preserve the author’s organization; topic splits gather related rule statements. Try both. Separate hours from renewals, but keep a sentence such as the above exception connected to the rule it qualifies.
Overlap can preserve boundary context but adds repetition. Duplicating the entire document into every passage is not a useful safeguard. Test real questions to see whether overlap helps.
Keep provenance after splitting: ID, document title, section, and date. A wrong answer can then be traced to the passage and original that need checking.
Test your chunks with two questions
Split a three-topic text by paragraphs and topics. Ask about renewal duration and reserved-book eligibility, checking evidence sufficiency. Number at least eight passages, or explain the topic boundaries in A–H.
Check what survived
C needs unreserved, before due date, once, and seven days. Combining passages is not automatically bad chunking, but know which must be retrieved together. Eight is an exercise count rather than a quality guarantee.
Further reading: Microsoft: RAG chunking phase
← Previous · Learning plan · Fictional library practice sources · Next →