nearest neighbour search
Finding the stored vectors closest to a query vector; done exactly, it compares the query with every vector.
In more detail
Exact, brute-force search never misses and is the right choice for small collections of a few thousand chunks. Its cost grows with the corpus, which is why large stores use approximate indexes.
Related terms
- approximate nearest neighbour search — Vector search that skips most comparisons using an index, trading a little recall for much faster queries.
- vector index — A data structure that makes nearest-neighbour search over many vectors fast, usually by giving up exactness.
Taught in
- What An Embedding Is — AI Engineering: LLM Apps, RAG & Agents
- Vector Indexes And Databases — AI Engineering: LLM Apps, RAG & Agents
- How RAG Works And When To Use It — AI Engineering: LLM Apps, RAG & Agents