Choosing and Evaluating a Chunking Strategy
In this article
- Set up a chunking comparison that changes one thing at a time against a simple baseline.
- Read results slice by slice and spot a loss that the total hides.
- Weigh a quality gain against chunk count and context tokens before you accept a more complex chunker.
- Write down a chunking decision with its reasons and name the measurement that would settle what is left open.
- Terms defined here: Recall@K.
Overview
Three engineers each have a favourite way to cut documents into pieces for search: plain fixed-size cuts, cuts that follow headings and tables, or small pieces that expand into whole chapters. Each can show you a question their method answers well. None can tell you which one to ship, because a handful of good examples proves only that each method works sometimes.
The way out is an experiment: the same documents, the same questions, the same search, and only the chunker changes. By the end you can set one up, read its results group by group instead of trusting the total, put a cost beside every score, and write the choice down with reasons.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- A fair race
- Read the totals
- Read the slices
- Count the cost
- Make the call
- What the numbers cannot tell you
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions