Term
Context Precision
Context Precision is a RAG evaluation metric (0–1) measuring how well the retriever ranks relevant contexts above irrelevant ones — the focus is ranking quality, not raw hit count.
Context Precision — explained in detail
Context Precision evaluates whether retrieved context chunks come back in the right order. Concretely: are the chunks actually useful for the answer near the top, or are the good hits hiding at position 5 behind noise? This matters because the LLM prioritizes top-down during generation and the context window is finite. The metric is typically computed as a position-weighted average: a relevant hit at rank 1 counts fully, the same hit at rank 5 counts less.
Example / Practical use
Top-3 hits for a query: chunk A (relevant), chunk B (irrelevant), chunk C (relevant). The score sits below 1 because an irrelevant chunk precedes a relevant one. Optimum: all relevant chunks before all irrelevant ones. In practice, the metric is used to compare reranker quality — a strong cross-encoder reranker pushes context precision up significantly without hurting recall. RAGAS and DeepEval both implement an LLM-judge variant.
Distinction from related terms
Context Precision is the ordering metric for the retriever; context recall is the completeness metric (are all relevant facts present in the hits?). Together they prevent gaming: optimizing only recall leads to huge top-50 windows full of noise, optimizing only precision leads to few but incomplete hits. Faithfulness and answer relevancy cover generation quality — these four together are the standard quartet of RAG evaluation.
Entdecke mehr
AI Workflows by Keyword: How We Make Recurring Routines Enforceable
A typed keyword triggers a fixed AI routine — and every single step must be committed before the next one appears. Why that's the actual trick.
GlossarRecall
Recall (hit rate, sensitivity) measures the share of all actually existing relevant cases that a system finds. Formula: relevant cases found divided by all relevant cases that truly exist. Requires a known ground truth.
LexikonMeasuring LLM Quality — Evals, Benchmarks, Judges
How to tell whether an LLM system actually works: three evaluation layers from benchmarks to CI evals, plus pitfalls like Goodhart and judge bias.