API glossary

Retrieval score

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

A retrieval score is a number that a search or retrieval system assigns to each candidate result, expressing how relevant or similar the result is to the original user query. The system ranks results by this score, putting the highest-scoring items first, and can use it to decide which results are strong enough to keep. Depending on the method, the score may measure keyword overlap, semantic similarity, or a blend of both.

In short: a retrieval score is how strongly the system thinks a result matches the query, and the number it uses to rank and sometimes filter results.

How a retrieval score works

The system compares the query to each candidate and turns that comparison into a number:

  1. Compare query and candidate: The system measures how well each candidate matches the query, either by term overlap (keyword search) or vector proximity (semantic search).
  2. Produce a number: That comparison yields a score, such as a lexical relevance score (for example, BM25) for keyword search, or a similarity metric such as cosine similarity for vector search.
  3. Rank by score: Candidates are sorted from highest to lowest, so the most relevant results appear first.
  4. Threshold: An optional cutoff drops results below a minimum score, filtering out weak matches before they are shown or passed on.
  5. Combine or refine: In hybrid search, scores from different methods are fused into one ranking, and a reranking model can replace them with a more accurate relevance score.

The defining caveat is that a retrieval score is relative, not absolute: it reflects how a result compares to others under one method, not a guarantee that the result is correct. In this way, scores from different methods are not directly comparable.

Retrieval score vs. rank and reranker scores

  • A retrieval score is the underlying number measuring relevance; a result’s rank is its ordinal position after sorting by that score. Many results share comparable scores, but only one can be ranked 1.
  • A cosine-similarity score (vector search) and a BM25-style lexical score live on different scales, so a “high” score means different things in each and the two cannot be compared directly.
  • A first-stage retrieval score is computed quickly across many candidates; a reranker score is a slower, more precise relevance judgment across the few candidates that remain.

Where retrieval scores matter

  • Ranking results: The score is what orders any set of search results, deciding what a user or model sees first.
  • Filtering with thresholds: A minimum score keeps weak matches out of a RAG prompt, so the model is not handed irrelevant context.
  • Hybrid and reranked pipelines: Combining or recomputing scores is how multi-stage retrieval improves relevance.
  • Search APIs: Some search APIs expose a relevance score alongside each result, while others return ranked results without exposing raw scoring values. When available, scores let developers rank, threshold, or merge results programmatically rather than trusting position alone.

A retrieval score is the signal everything downstream depends on, and it’s best to treat this score as a relative ranking aid, rather than an absolute measure of truth.

Semantic search, hybrid search, reranking, cosine similarity, BM25, embeddings, vector database, retrieval-augmented generation (RAG), search API.