Back
Year
2026
Tech & Technique
Python, NumPy, BM25, pytest, GitHub Actions
Description
An open-source Python tool that audits RAG chunking strategies. For each strategy it reports
how often the text that answers a question is split across two chunks, and whether retrieval
still returns a chunk that contains the whole answer.
Key facts:
The method, the full results and the caveats are in the write-up.
Key facts:
- Four chunkers (fixed, sentence, paragraph, recursive) that keep character spans, a BM25 retriever on an inverted index, and support for custom chunkers and retrievers.
- Reports answer split rate, Recall@k, MRR and context size. Offline and deterministic: no API keys, and NumPy is the only dependency.
- On SQuAD v1.1 (48 long documents, 10,570 questions), fixed 200-word chunks with no overlap split the answering sentence in 14.1% of questions. A 50-word overlap cut that to 1.1% and raised Recall@5 from 78.7% to 90.2%.
- A
--show-splitsoption lists the answers a strategy cut, with the cut position marked.
The method, the full results and the caveats are in the write-up.
My Role
Author and maintainer
- Designed the span-based audit and the metrics.
- Tests, type checks and CI on Python 3.10 to 3.13.