Saraswati Stitch needle-and-thread markSaraswati Stitch®
contact@saraswatistitch.comBook a call
← Glossary

Definition

Precision and recall

Precision is the share of a model's positive predictions that were correct, and recall is the share of all real positives the model managed to find.

Google defines precision as the proportion of all positive classifications that are actually positive, and recall as the proportion of all actual positives classified correctly, also called the true positive rate, in its machine learning crash course. Both come from the cells of a confusion matrix.

The two pull against each other. A fraud model that flags almost everything has high recall but low precision, burying staff in false alarms; one that flags only obvious cases has high precision but misses fraud. Is precision the same as recall? No: precision asks how many of the flags were right, recall asks how many of the real cases were caught. The F1 score combines them into one number.

What counts as a good score depends on the cost of each mistake. Medical screening favours recall, because missing a case is worse than a false alarm, while a sales lead filter may favour precision so reps only call strong leads. The same thinking applies to search: reranking improves precision of what reaches the top.

Related terms

  • Confusion matrix: A confusion matrix is a table that shows how a classification model performed by counting its true positives, false positives, true negatives and false negatives.
  • Evaluation (evals): An evaluation, or eval, is a repeatable test that measures how well an AI system does its job on real examples, so you can tell whether a change made it better or worse.
  • Reranking: Reranking is a second pass that reorders search or retrieval results by how well they actually answer the query, lifting the quality of what a RAG system shows the model.
  • Machine learning: Machine learning is a branch of AI where a system learns patterns from data and improves at a task through examples, instead of being programmed with explicit rules.