RAG Pipeline Simulator: Watch the Answer Fall Out of the Context
Mark the sentence that answers your question, then drag chunk size, overlap and k and watch whether that sentence survives chunking and makes it into the retrieved context.
Chunk 3 holds the whole answer sentence and ranks #1 of 9, inside your top 2. The model will see it. Whether it uses it is a different question, and not one this page can answer.
- Words in the document
- 154
- Chunks
- 9
- Chunk size / overlap
- 24 / 6 words
- Words stored across all chunks
- 202
- Storage amplification from overlap
- 1.31×
- Chunks holding the answer whole
- 3
- Chunks holding part of it
- 4
- Chunks retrieved
- 3, 4
- Best rank achieved by any chunk containing the answer
- #1
- Characters of context assembled
- 282
- Estimated context tokens (≈ chars ÷ 4)
- 71
- Estimated input cost for one query
- $0.00021
to one project and inherits that project's rate limit. A token that has not been used for ninety days is revoked automatically. A revoked days is revoked automatically. A revoked token returns 401 on every request and cannot be reinstated; create a new one instead. Rate limits are
The half of RAG that breaks quietly
A RAG pipeline has two failure modes and they are unequal. The visible one is the model getting the answer wrong when the right text was in front of it — annoying, but debuggable, because the evidence is in the prompt. The invisible one is the right text never arriving, and it produces exactly the same symptom: a confident, fluent, wrong answer. Teams spend weeks on prompt wording for problems that live entirely in the fifty lines of chunking code nobody reviewed.
Drag the chunk size through the point where the marked sentence straddles a boundary. The verdict changes to "cut in half" and stays there through a range of settings that look perfectly reasonable. Nothing errors. The retriever still returns k chunks, the model still answers, evaluation metrics that only measure whether a relevant chunk was retrieved still pass — and the sentence carrying the answer arrived as two fragments in two documents, one of which was ranked out. Overlap is the cheap mitigation, and you can watch it work: raise it until every boundary is covered twice, and watch the storage amplification row climb, because you pay to embed and store every duplicated word.
The other lesson is what k does. Raising it fixes rank problems and costs tokens on every single query for the lifetime of the product — the estimated cost row is per question, so multiply it by your traffic before deciding that top-10 is safer than top-3. And note what none of these controls can fix: if the answer needs two sentences from opposite ends of the document, no chunk size contains both. That is the case where retrieval is the wrong shape for the question, and no amount of tuning will tell you so — which is why the marked-span test above is worth running on your ten hardest questions before you tune anything.