RAG · Trade-off
Choosing a chunking strategy
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
How do you decide how to chunk documents for RAG? Fixed size, by headings and paragraphs, or semantic chunking: what would you pick for a company's HR policy manual, and why?
Then
Follow-ups the interviewer asks next
- What goes wrong with chunks that are too small, and too big?
- Why add overlap, and how much?
- A table is split across two chunks. What happens to answers about it?
- What is parent-child, or small-to-big, retrieval?
- How would you prove one strategy is better than another?
The answer
What a strong answer covers
- Too small: the chunk loses its context ("it" refers to the previous chunk; a rule is cut off from its exception). Too big: the embedding blurs several topics, retrieval gets less precise, and each chunk costs more prompt tokens.
- Fixed size by tokens (say 300–800) with 10–20% overlap is a fair baseline. Structure-aware chunking (by headings, sections and list items, with tables kept whole) usually wins for manuals and policies. Semantic chunking (split where meaning shifts) costs more and helps on unstructured text; it isn't automatically better.
- Give each chunk its context: prepend the document title and section path ("Leave policy > Maternity leave > Eligibility") before embedding, so a chunk makes sense on its own.
- Parent-child: embed small chunks for precise matching, but send the whole parent section to the model.
- Tables: keep a table with its header row in one chunk, or turn rows into sentences; a split table loses its column names.
- Prove it: real questions with the chunk or page that answers each; compare recall@k and answer faithfulness for each strategy. The embedding model's input limit also caps chunk size.
The red pen
Common traps
Avoid:one magic number ("512 tokens") with no reason; ignoring tables and headings; changing chunking without re-running retrieval evals.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.