Technique
Approximate Nearest Neighbor
Approximate Nearest Neighbor Search (ANN)
/uh-proks-i-mit neer-ist neigh-bor/
A search algorithm designed to find vectors close to a query vector in high-dimensional space with high speed by sacrificing minor precision.
In plain English
Instead of exhaustively comparing every single item in a database—which takes too long—ANN search uses clever geometric indexing to find the closest matches in milliseconds.
Real-world example
Executing real-time semantic search across millions of enterprise document embeddings in a vector database.
Technical definition
Approximate Nearest Neighbor (ANN) search algorithms (such as HNSW, IVF, and Product Quantization) sacrifice absolute mathematical exactness to retrieve high-dimensional vectors in sub-millisecond timeframes. By indexing vector spaces into hierarchical graphs or clustered partitions, ANN bypasses exhaustive O(N) linear scans, forming the backbone of modern vector databases.