The Search Odyssey
In progress
Module 9Approximate is often good enough Graph Rider

Vector Search at Scale

Compare brute force with ANN, inspect a proximity graph, and trade recall for latency with M and efSearch.

Brute-force searchCurse of dimensionalityANNHNSWIVFProduct quantizationRecall vs. latency

The stumper

Brute force across ten million vectors is too slow.

For a small collection, comparing the query vector to every document vector is fine. At millions of vectors, brute force becomes a latency and cost problem.

Approximate nearest neighbor indexes give up a little recall to search much faster. HNSW builds layered proximity graphs. IVF clusters vectors and searches only promising buckets. Product quantization compresses vectors to save memory.

Every ANN choice is a tradeoff between recall, latency, memory, and operational complexity. The right setting depends on the product, not just the benchmark.

Try it before you read on

Open the Lab tab. Change a parameter, break something, and form a hypothesis before reading the explanation.

Checkpoint

3 questions. Explanations appear after submission.

1. What is the core tradeoff in ANN search?

2. What does efSearch control in HNSW?

3. Why is brute force insufficient at large scale?