← Back to all tipsOctober 6, 2026

Precision and recall: why search quality is always a trade-off

"Is the search good?" isn't a yes/no question — it's two separate questions that pull in opposite directions. Precision and recall are the standard way to make that trade-off explicit instead of arguing about it in the abstract.

The two numbers

Precision asks: of the results you returned, how many were actually relevant? A search that returns 10 results and gets 8 right has 80% precision.

Recall asks: of all the relevant items that exist, how many did you actually return? If there were 40 relevant items in the catalogue and your search surfaced 8 of them, recall is 20% — even if every one of those 8 was a correct, precise hit.

A system can have perfect precision by returning just one, extremely safe result — and terrible recall because it missed everything else. It can have perfect recall by returning every item in the catalogue — and terrible precision because most of them are irrelevant. Neither extreme is useful; the real work is tuning where on that curve a given product needs to sit.

Why e-commerce and legal search want different trade-offs

A product search can tolerate missing a few relevant items (low-ish recall) if the top results are reliably good, because shoppers only look at the first page anyway — precision matters more. A legal or compliance search over contracts has the opposite shape: missing one relevant document can be a real problem, so recall is weighted more heavily even if it means more noise in the results.

Where NDCG comes in

Precision and recall treat "relevant" as binary and ignore order. NDCG (normalized discounted cumulative gain) fixes both: it accounts for relevance being a matter of degree, and it penalizes a system more for getting the first result wrong than the tenth. NDCG@10 — measuring quality within the top 10 results — is the standard way ranking quality is reported, precisely because order is usually what users actually experience.

The practical takeaway

There's no single "accuracy" number for a search system that means anything on its own. A reported precision or recall figure is only useful alongside the other one, and the right balance depends entirely on what a wrong or missing result actually costs the person searching.