Data & Retrieval

Chunking

Splitting documents into retrievable pieces — the decision that quietly makes or breaks RAG quality.

Chunking cuts documents into units for embedding and retrieval. Too small and chunks lose the context needed to be understood; too large and retrieval gets fuzzy while irrelevant text floods the prompt. Practical systems chunk on structure (headings, paragraphs, code blocks) with modest overlap, attach parent-document context, and tune size against retrieval evals — not intuition.