RAG interview question · Most asked

How do you choose a chunking strategy for RAG?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

Chunk along document structure (headings, paragraphs, lists) and prefix each chunk with its title and heading path; keep tables and code whole; consider contextual retrieval or small-to-big retrieval when chunks lack context; and choose between options using retrieval recall on a labelled set of real questions.

Longer Answer

Fixed-size chunks split facts from their headings, so the best-matching chunk may lack the answer. There is no universal chunk size; measure.

Key Points

  • Structure-aware chunks with heading prefixes.
  • Keep tables and code whole.
  • Contextual or small-to-big when needed.
  • Decide with recall@k.

Deep dive: Chunking: Why the Answer Was Split in Half

More most-asked RAG questions

← All RAG questions

Was this page helpful?