Establish what ANN is allowed to miss
How to choose and tune ANN indexes for a vector workload, using exact-search benchmarks to balance recall, latency, and memory as data volume grows. · associate
Approximate nearest neighbor search reduces search work by accepting that it may miss true nearest neighbors. Start with an exact-search benchmark: for representative queries, save the exact top-k vector IDs from a fixed dataset. Use the same embedding model, preprocessing, distance measure, and metadata filters for exact and approximate searches. Matching vector dimensions alone does not make different embedding models compatible.
Recall at k is the fraction of exact top-k neighbors recovered by ANN. If the exact search returns ten neighbors and ANN recovers eight of them, recall at 10 is 0.8. Average this measurement across representative queries. It measures agreement with exact vector retrieval, not whether the evidence actually answers a user's question.
Before tuning, define minimum recall, maximum p95 latency, and a memory budget. The p95 is the latency at or below which 95% of measured requests finish. Benchmark at representative concurrency, including filtered queries. Keep exact search as a candidate: a small collection or a highly selective filtered subset may not need ANN.