RAG Chunking Grid

A chunk-size and overlap sweep over SQuAD retrieval, read with the confidence intervals that 200 queries actually support. Two retrievers, one scale, no dual axes.

200 SQuAD validation Q&A · seed 42
top-K 3 · relevance = verbatim answer span
5 chunk sizes × 3 overlaps × 2 retrievers = 30 scored runs
15 superseded rows retained, charted nowhere
Metric
Overlap
Best Hit Rate@3

95.0%

95% CI 91.0 – 97.3%
Retrieval quality against chunk size
The shaded span to the right is not a plateau the retrievers found — it is where the test stops varying. From 1024 tokens up, every SQuAD context fits in a single chunk, so the index is byte-identical at 1024 and 2048 and so is every metric.
The full grid, both retrievers
Embeddings minus TF-IDF, by metric
Same comparison, same 200 questions, opposite signs. Embeddings retrieve the answer chunk more often and then rank it lower. Averaged over the three overlap settings; the spread across overlaps never exceeds 1.0pp.
Hit Rate@3 asks whether the answer is in the top 3 at all; MRR@3 asks where. A retriever can win the first question and lose the second, and this one does: 11 of 15 configurations move in opposite directions.
Chunks per document
The confound behind the plateau. Mean over the three overlap settings.
Query latency against chunk size
Milliseconds per query: the line is the mean, the wash runs out to p95. Its own chart, not a second axis on the one above.

What the numbers support

Five readings, each tied to a figure above and to a column in the table below.

Superseded run excluded

results.csv holds an earlier TF-IDF pass. It is kept in the repository and charted nowhere here, on two measurements: Hit Rate@3 and MRR@3 are identical in 15 of 15 rows, which requires every hit to land at rank 1; and 9 of 15 rows read exactly 1.000. The re-run in _run_tfidf_clean.py rebuilt chunking on LangChain's RecursiveCharacterTextSplitter and scores 0.925 where the old pass read 1.000. Its rows stay in the table below, struck through, so the record is complete rather than quietly tidied.

Every run, every column
The table view each figure above resolves to. Click a header to sort; the overlap filter applies here too.