What does context precision measure in RAG evaluation and what does low context precision indicate?
Context precision is the fraction of retrieved chunks that are relevant, weighted so relevant chunks should rank high. Low precision means the retriever returns noise that distracts the generator.
Imagine you ask a research assistant for the most useful pages on a topic, and they hand you a stack. Context precision asks: of the pages they actually gave you, how many were genuinely relevant, and did they put the good ones on top? If they hand you ten pages but only three matter, precision is low. Worse, if the three good pages are buried at the bottom, the score drops further, because a smart reader skims the top first. The danger of a low score is not just wasted reading. The model that writes your final answer reads those pages too, and the junk ones can distract it into a wrong or muddled response. High precision means a clean, mostly relevant stack with the best pages up front.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: define context precision, contrast with recall, walk the rank-aware RAGAS formula, cover the top-k tradeoff and which fixes target precision versus recall.
Real products, models, and research that use this idea.
- RAGAS computes context precision@k as a rank-aware metric and pairs it with context recall in its standard RAG report.
- TruLens exposes a context relevance score that plays the same diagnostic role as precision for retrieved chunks.
- LangSmith and RAGAS integrations let teams track context precision per query type as a retrieval regression signal.
- An enterprise support bot using Claude Opus 4.7 reranks its top-20 vector hits down to top-5 to lift context precision before generation.
- Galileo and Arize Phoenix surface low-precision retrievals as a leading explanation for unfaithful RAG answers in production traces.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does RAGAS make context precision rank-aware instead of a simple relevant over total ratio?
QHow would you choose a top-k value given the precision-recall tradeoff?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing context precision with context recall. Precision asks how many retrieved chunks are relevant; recall asks how much of the needed information was retrieved at all. They diagnose opposite retrieval failures.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.