Precision measures the accuracy of an information retrieval (IR) system. More precisely, precision is the fraction of retrieved documents that are relevant. Consider a test document collection and an information need Q. Let R be the set of documents in the collection that are relevant to Q. Assume an IR system processes the information need Q and retrieves a document set A. Let |Ra| denote the number of documents that are in both R and A. Further let |R| and |A| be the numbers of documents in R and A, respectively. The precision of the IR system for Q is defined asP = |Ra|∕|A|.
Precision and recall are the most frequently used and basic retrieval performance measures. Many other standard performance metrics are based on the two concepts.