AI engineering glossary · RAG vector search

What is ANN (approximate nearest neighbour search)?

Approximate nearest neighbour search (also called ANN): Search that returns vectors that are very likely, but not guaranteed, to be the closest ones, using an index to skip most comparisons. It makes searching hundreds of millions of vectors feasible in milliseconds, at the cost of occasionally missing a true neighbour.

Level: intermediateTopic: RAG vector search

Approximate nearest neighbour search: an example

An ANN index returns 9 of the true top 10 neighbours in 3 ms, while brute force needs 900 ms.

Related terms

More RAG vector search terms

Where you learn it

Approximate nearest neighbour search is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.