retrieval evaluation / run_01
Chunking should be measured, not chosen by vibes.
8 strategies. 1 corpus. 1 labeled question set. The committed BM25 run scores retrieval quality beside the context tokens required to clear 90% recall.
Loading committed benchmark artifacts...
01 / leaderboard
BM25 Retrieval Scorecard
Click a column heading to sort. The highlighted row has the highest nDCG@10, with context cost as the tie-breaker.
n/a means recall never exceeded 90% at k = 1, 3, 5, or 10.
02 / curves
Quality and Context Cost
The leaderboard above is the text alternative for both plots.
03 / chunk inspector
See the Boundaries
Highlighted spans are returned context. Overlap bands show text covered by more than 1 chunk.
Select a strategy and document.
04 / failure explorer
Inspect a Miss
These examples missed the gold answer in the top five retrieved contexts.
Select a recorded failure.
Top retrieved chunk
05 / live BYOK
Run the Same Benchmark on Your Text
Client-side chunking, embedding retrieval, and the same metric formulas. The live semantic strategy uses adjacent-sentence embeddings instead of the committed TF-IDF proxy. No server is involved.
| Strategy | R@1 | R@3 | R@5 | R@10 | MRR@10 | nDCG@10 | Est. context tokens to >90% |
|---|
06 / method
The benchmark stays reproducible
Every strategy shares the corpus, questions, retriever, and metrics. Chunking is the variable.
Method
The committed run uses Okapi BM25 with k1 = 1.2 and b = 0.75. Tokens are lowercase alphanumerics split on every other character, with no stemming. A query is a hit when any returned context contains a case-insensitive, whitespace-normalized SQuAD gold answer string.
- Hold the data constant
SQuAD v1.1 dev paragraphs are grouped back into source articles. Seed 20260729 selects 40 articles and 800 labeled questions.
- Split the corpus eight ways
Fixed, recursive, sentence-window, parent-document, semantic proxy, and fixed 1,000-character strategies each index their own chunks.
- Rank and score
Recall@k, MRR@10, nDCG@10, and context cost quantify retrieval quality and the context needed to clear 90% recall.
Data
SQuAD v1.1 dev paragraphs are grouped back into source articles. The offline builder downloads the source file when it is absent and ranks indexed chunks locally with BM25.
Limitations
String containment misses semantic equivalents, BM25 is lexical, and the optional live embedding run answers a different retrieval question. Results do not transfer blindly to another corpus.
Reproduce
python3 scripts/build_benchmark.py node app.js --selftest