Retrieval is the step that decides what the model gets to see.
The query is embedded with the same model used for the chunks.
The index returns the nearest chunks by similarity, usually five to twenty.
Metadata filters can narrow the search before or during that comparison.
Everything downstream is capped by this step.
If the right chunk is not retrieved, no prompt can recover the answer.
The model will instead answer from what it was given, plausibly and wrongly.
So measuring retrieval separately from generation is essential.
Recall at k asks whether the correct chunk appears in the top k at all.
A retrieval recall of 70 per cent caps the whole system at roughly that.
Raising k improves recall and adds noise and cost to the context.
Retrieving twenty and reranking to five is usually better than retrieving five directly.
Queries phrased as questions and documents written as statements do not always match well.
Query rewriting and hybrid search both help with that mismatch.
Build a small set of questions with known correct chunks and measure against it.