Canonical: https://weaveos.com/glossary/precision

[Home](https://weaveos.com/)/[Glossary](https://weaveos.com/glossary)/[Evaluations and benchmarks](https://weaveos.com/glossary/category/evaluations-benchmarks)/Precision

[Evaluations and benchmarks](https://weaveos.com/glossary/category/evaluations-benchmarks)

# Precision

Also known as AI Precision, Precision measure

By WeavePublished September 10, 2026Updated October 9, 20262 min read

## Definition

Precision is the fraction of positive predictions that are correct: true positives divided by the sum of true positives and false positives.

On this page

1. [Definition](https://weaveos.com/glossary/precision#definition)
2. [Formula](https://weaveos.com/glossary/precision#article-formula)
3. [Code-review example](https://weaveos.com/glossary/precision#article-code-review-example)
4. [Precision and recall](https://weaveos.com/glossary/precision#article-precision-and-recall)
5. [Comparing results](https://weaveos.com/glossary/precision#article-comparing-results)
6. [How this relates to Weave](https://weaveos.com/glossary/precision#weave)
7. [Sources](https://weaveos.com/glossary/precision#sources)
8. [Related terms](https://weaveos.com/glossary/precision#related)

## Formula

Precision = TP / (TP + FP)

TP means true positives: items the system correctly labels positive. FP means false positives: items it labels positive even though they are negative. Decide what counts as positive before evaluating a tool. For a bug detector, positive usually means that a real bug is present.

## Code-review example

An AI reviewer flags 20 changes as buggy. A human checks the flags and confirms that 16 of those changes contain a bug. The remaining four are false alarms.

Its precision is 16 / 20 = 80%. This answers a practical question: how often does a flag deserve an engineer's attention? False alarms consume review time, so precision matters when choosing a review tool or setting its alert threshold.

## Precision and recall

[Recall](https://weaveos.com/glossary/recall) measures how many actual positives the system finds. If the same evaluation contains 40 buggy changes, finding 16 gives 16 / 40 = 40% recall. The reviewer can therefore have good precision while missing most buggy changes.

Report both measures for the same dataset and threshold. [F1 score](https://weaveos.com/glossary/f1-score) combines them when a single summary is useful. For multiple classes, state whether precision is calculated per class or averaged, and which averaging method is used.

## Comparing results

Use the same labeled examples for each tool. Keep the counts visible, check disagreements, and report the number of reviewed cases. If there are no positive predictions, the formula's denominator is zero; state the evaluation's convention rather than reporting an unexplained perfect score.

## How this relates to Weave

Review an AI code-review tool's precision alongside engineering output and code-quality trends. Weave Code Intelligence analyzes pull requests, giving teams context for deciding whether automation improves the work they ship.

[Explore Code intelligence](https://weaveos.com/products/code-intelligence)

## Sources and further reading

1. [scikit-learn: precision\_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_score.html)
2. [Weave Code Intelligence](https://weaveos.com/products/code-intelligence)

## Related terms

### [Recall](https://weaveos.com/glossary/recall)

[Recall explained for teams designing, running, and interpreting AI evaluations.](https://weaveos.com/glossary/recall)

### [F1 score](https://weaveos.com/glossary/f1-score)

[F1 score explained for teams designing, running, and interpreting AI evaluations.](https://weaveos.com/glossary/f1-score)

### [Evaluation dataset](https://weaveos.com/glossary/evaluation-dataset)

[What an evaluation dataset contains, how to choose representative AI tasks, and how leakage or repeated tuning can distort results.](https://weaveos.com/glossary/evaluation-dataset)
