Metrics

Context Precision

A retrieval metric that measures what fraction of the chunks fed into an LLM were actually relevant to the question, and whether the relevant ones ranked near the top. Low precision means the model was handed noise.

What it means

Context precision evaluates the retrieval step of a Retrieval-Augmented Generation pipeline. After your system pulls a set of chunks for a query, precision asks a simple question - of everything you retrieved, how much of it was actually useful? A judge marks each chunk as relevant or not, and the score rewards pipelines that place the relevant chunks near the top of the list rather than buried below filler.

It is the counterpart to context recall, which asks whether you retrieved everything you needed. Precision punishes noise, recall punishes gaps. A retriever tuned only for recall tends to over-fetch, dumping marginally related passages into the context window where they distract the model and inflate token cost.

Why it matters

Generation quality is capped by retrieval quality. If context precision is low, no amount of prompt engineering will fix the answer, because the model is reasoning over the wrong material. Splitting precision out from answer-relevancy lets you localize a failure - a low precision score with an otherwise capable model points squarely at the retriever, the embedding choice, or the chunking strategy, not the prompt. It also has a direct cost angle, since every irrelevant chunk is tokens you pay for on every request.

In practice

Context precision is one of the three legs of the rag-triad. DeepEval implements it as a standard RAG metric you can run over a labeled dataset, and Braintrust lets you track it as a scorer across experiments so you can see whether a new embedding model or chunk size actually improved retrieval. A useful habit is to log the retrieved chunk IDs alongside each answer - when precision drops, you can read exactly which passages the retriever mistakenly promoted. The best RAG evaluation tools guide compares how each platform surfaces this metric.

Related Terms

Learn More

Related Articles

Free Newsletter

Get the LLM Evals Newsletter

Platform comparisons, pricing changes and eval technique deep-dives. No spam.