AI engineering glossary · RAG vector search
What is exact nearest neighbour search?
Exact nearest neighbour search: Brute-force search that computes the distance from the query to every stored vector and returns the true closest ones. It is perfectly accurate and fine for small collections, but its cost grows linearly with the collection size.
Exact nearest neighbour search: an example
Comparing a query against 50,000 vectors takes a few milliseconds, so exact search is fine.
Related terms
More RAG vector search terms
Where you learn it
Exact 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.