ANN trades exactness for scalable latency
Exact k-nearest-neighbor search compares the query against every candidate vector and returns the mathematically closest results. That gives a useful ground truth, but its work grows roughly with the number of stored vectors.
Approximate nearest-neighbor search uses an index, such as Qdrant's HNSW-based dense-vector search, to visit a much smaller set of promising candidates. It can therefore reduce latency and CPU cost substantially as the collection grows, at the cost of potentially missing some true nearest neighbors.
The engineering trade-off is recall versus latency and resource consumption. In Qdrant, search parameters such as hnsw_ef can be tuned, and exact=true can be used for comparison or workloads where exact results matter more than latency.
A common mistake is treating ANN as inaccurate by definition. A well-tuned ANN index can have very high recall. The correct approach is to benchmark recall against exact-search ground truth on representative queries rather than choosing parameters by intuition.
Exact search scans candidates and provides ground truth but becomes expensive at scale
ANN uses an index to reduce the search space
hnsw_ef increases the candidate search effort and usually improves recall at additional latency
Benchmark ANN against exact search before choosing production parameters
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience