Evaluate recall

POST /v1/vectors/:namespace/_debug/recall

This endpoint evaluates the recall performance of ANN queries in this namespace.

When you call this endpoint, it selects num random vectors that were previously inserted. For each of these vectors, it performs an ANN index search as well as a ground truth exhaustive search.

Recall is calculated as the ratio of matching vectors between the two search results. This endpoint also returns the average number of results returned from both the ANN index search and the exhaustive search (ideally, these are equal).


num numberdefault: 25

number of searches to run.

top_k numberdefault: 10

search for top_k nearest neighbors.

filters objectoptional

filter by attributes, see filtering parameters for more info.

queries array[float]default: sampled

use specific query vectors for the measurement. if omitted, sampled from index.


// Request payload
  "num": 5,
  "top_k": 10

// Response payload
  "avg_recall": 1.0,
  "avg_exhaustive_count": 10.0,
  "avg_ann_count": 10.0

How to interpret this response:

  • A recall of 1.0 means that 100% of the ideal results (from the exhaustive search) were also present in the approximate ANN results
  • avg_ann_count equals avg_exhaustive_count, meaning the approximate search returned the same number of results as the exhaustive

Note: To avoid abuse, recall queries are billed as N search queries, where N = num * number of vectors in your index / 10,000. We only bill if the average recall is >0.9.

Email us
© 2024 turbopuffer Inc.
Privacy PolicyTerms of service
SOC2 Type 1 certified