What is Context Precision?
Context precision measures what share of the retrieved passages placed in a prompt are actually relevant to the question, and whether the relevant ones appear near the top. It penalizes padding a prompt with loosely related material. High recall with low context precision means the answer is buried in noise the model must ignore.
The metric exists because retrieval quality is not only about finding the right passage. Irrelevant context consumes the context window, raises cost, adds latency, and measurably degrades answer quality, since models can be pulled toward confident-sounding but off-topic text. Retrieving twenty passages when three are relevant is a real defect even if all three were found.
Position is part of the measure in most formulations, which weight relevant passages higher when they appear earlier in the ranked list. This reflects observed model behavior: material at the very start and very end of a long context tends to be used more reliably than material buried in the middle, an effect often described as the lost in the middle problem.
Improving context precision usually means adding a reranking stage rather than retrieving less. A first-pass retriever tuned for recall pulls a wide candidate set, then a cross-encoder or model-based reranker reorders it and the top few are kept. Metadata filters and deduplication contribute too, by removing categories and near-copies that never deserved a slot.
It should always be read against a recall measure, since the trivial way to maximize context precision is to return one very confident passage and miss everything else. The useful target is enough passages to cover the question, ordered so the strongest evidence comes first, with unrelated material excluded rather than merely ranked lower.
Key points
- Share of retrieved context that is genuinely relevant
- Most formulations reward relevant passages ranked earlier
- Irrelevant context costs tokens and degrades answers
- Reranking is the usual lever for improving it
- Must be balanced against a recall measure
In practice
A question about password reset retrieves ten passages. Three cover reset steps, two cover unrelated account deletion, and five are boilerplate headers repeated across the help site. Context precision is 0.3, and the two most useful passages sit at ranks six and eight. Adding a reranker moves them to ranks one and two and cuts the prompt to four passages, which improves both the answer and the token cost.