Approximate Nearest Neighbor
A highly efficient search algorithm that dramatically speeds up vector retrieval by finding close matches rather than computing the exact nearest neighbor.
Think of It Like This
Like finding a good enough parking spot on the correct block instead of driving around for an hour to find the single absolute closest spot to the door.
Exact nearest neighbor search requires comparing a query against every single vector in a database, which becomes impossibly slow at a scale of millions. ANN structures the data using graphs like HNSW or tree indexes so the search can skip vast swathes of irrelevant points. While this sacrifices a tiny amount of accuracy, it enables the lightning-fast retrieval speeds required by modern search engines.