Skip to main content
GlossaryAI in TestingRetrieval Precision
AI in Testing Modern Term

Retrieval Precision

Retrieval precision measures what fraction of the documents or chunks a RAG system retrieves for a given query are actually relevant to answering it — a low-precision retriever pulls in noise alongside anything useful, forcing the model to sort signal from irrelevant context, which increases the risk of an ungrounded or distracted answer.

Precision and recall pull in opposite directions in retrieval, same as in classic information retrieval: a retriever tuned to pull back more chunks per query (to avoid missing something relevant) tends to also pull back more irrelevant ones, lowering precision, while a stricter retriever raises precision at the risk of missing something the answer actually needed.

Low precision matters specifically for RAG because irrelevant context isn't just wasted tokens — it measurably increases hallucination risk, since the model has to actively ignore misleading nearby content rather than simply having less to work with. A retriever that returns five loosely related chunks alongside the one that matters puts more burden on the model's ability to filter than five tightly relevant chunks would.

Testing it means building a query set with known-relevant documents labeled in advance, then checking what fraction of each query's retrieved set actually matches that relevance label — usually reported as precision@k for a chosen k, the top k results actually used.

Example

Precision@k = (relevant chunks in top k retrieved) / k