Artificial Intelligence

Approximate Nearest Neighbor

An algorithm that finds vectors approximately closest to a query vector, trading perfect accuracy for dramatic speed improvements. ANN makes vector search practical at scale.

Why It Matters

ANN algorithms make vector databases viable for production. Exact nearest neighbor search is too slow for millions of vectors — ANN makes it milliseconds.

Example

HNSW (Hierarchical Navigable Small World) finding the top 10 most similar documents from 100 million vectors in under 10 milliseconds.

Think of it like...

Like finding the nearest coffee shop by asking people on the street for directions rather than measuring the exact distance to every shop in the city.

Related Terms