rag medium complexity mvp

Chunking

Chunking splits source material into retrievable pieces for search and RAG.

Decision

Tune chunking when retrieval misses the right evidence or returns context that is too broad.

Use when

  • Long documents
  • Documentation search
  • Support knowledge bases
  • Source-backed RAG

Avoid when

  • Very short records
  • Data that already has clean fields
  • Pure exact search
  • Unstructured corpora without evaluation

Why chunking matters

Chunking controls what the retriever can find. If chunks are too small, they miss context. If they are too large, they dilute the relevant answer with noise.

Good chunking follows the shape of the source material: headings, sections, procedures, FAQs, records, or code blocks.

How to decide

Start with semantic boundaries rather than arbitrary character counts. Then test with real user questions and inspect what chunks are retrieved.

Common mistakes

  1. Using one chunk size for every document type.
  2. Ignoring headings and document structure.
  3. Evaluating generation quality without looking at retrieved chunks.

Next decision

If the right chunk appears but the answer still fails, improve prompting or evaluation. If the wrong chunks appear, tune retrieval, chunking, or reranking.