The chunk that lost its subject
Step 1 · The pattern
Chunk, embed, retrieve
Documents are split into chunks, each embedded and indexed. A question is embedded too, and the closest chunks go to the model. With short, self-contained documents, the right chunk is almost always found. (Animation numbers are illustrative.)
- a question
- right chunk found
- missed
In short
The chunk that lost its subject: how it works and how it breaks
Retrieval-augmented generation splits documents into chunks, embeds each one, and at question time fetches the closest chunks for the model to read. Splitting loses context. Anthropic's example is a chunk from a company filing that says only 'the company's revenue grew by 3% over the previous quarter': no company, no quarter. A question about that company's second-quarter revenue does not match it well, so the retriever brings back other chunks, and the model answers from the wrong one or says it does not know. Nothing errors. Anthropic's fix is to prepend a short, generated context to every chunk before indexing it, then combine embeddings with keyword search and rerank a larger candidate set. In its tests the top-20 retrieval failure rate fell from 5.7% to 3.7% with contextual embeddings, 2.9% adding keyword search, and 1.9% with reranking. Measure retrieval on its own, not only final answers.
What this simulation simplifies
- Misses are a fixed chance in the animation; the percentages in the text are Anthropic's measured ones.
- Reranking and hybrid search are shown as one switch.
How this comes up in interviews
"Users say your document Q&A assistant cites the wrong figures. How do you improve retrieval?"
Then they ask
- How do you know retrieval is the problem?
- What do chunks lose?
- What does reranking add?
A strong answer covers
- Measure retrieval separately with known question-chunk pairs.
- Chunks lose identifying context; add a generated context per chunk.
- Hybrid search: embeddings plus keyword (BM25).
- Over-retrieve and rerank to the best few.
- Consider no retrieval at all for small corpora.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
On one page: the track cheat sheet.
Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.