If information retrieval were perfect …
Every hit would be relevant to the original query, and every relevant item in the body of information would be found.
Precision: percentage (or fraction) of the hits that are
relevant, i.e., the extent to which the set of hits
retrieved by a query satisfies the requirement that
generated the query.
Recall: percentage (or fraction) of the relevant items that are
found by the query, i.e., the extent to which the query
found all the items that satisfy the requirement
Collection of 10,000 documents, 50 on a specific topic
Ideal search finds these 50 documents and reject all others
Actual search identifies 25 documents; 20 are relevant but 5 were on other topics
Precision: 20/ 25 = 0.8 (80% of hits were relevant)
Recall: 20/50 = 0.4 (40% of relevant were found)