Skip to main content

Approximate Nearest Neighbor Search (ANN)

Approximate Nearest Neighbor Search (ANN)

  • Data & retrieval
  • Stage 5 · Running It
  • refs checked 2026-11-17
What problem it solves

Find the nearest vectors to a query quickly among billions, accepting a small amount of missed recall.

What it is
Exact nearest-neighbor search is too slow at scale; ANN approximates with graph indexes, quantization or hashing. HNSW uses a multi-layer navigable graph and brings query cost close to logarithmic.
An HNSW multi-layer graph: long links on upper layers approach quickly, short links below refine. A small recall loss buys orders-of-magnitude speed.
An HNSW multi-layer graph: long links on upper layers approach quickly, short links below refine. A small recall loss buys orders-of-magnitude speed.
Why it matters

ANN is the core of a vector database. Recall, memory and latency must be tuned together; changing index parameters changes retrieval quality.

Chinese aliases

Sources
  • Malkov and Yashunin, Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs ↗
  • FAISS repository ↗
Use this term in a task

Don’t stop at the definition: use the task handbook for the order and checks, or filter three tool candidates for the job at hand.

Task handbooks → · Filter three candidates →