Vector Search

Vector search finds items whose numerical representations are close to a query vector under a chosen distance or similarity measure.

Find the nearest point by hand

Use the query point (0, 0) and ordinary straight-line distance in an invented two-dimensional collection.

A · (1, 0)
Distance 1. Candidate A ranks first.
B · (0, 2)
Distance 2. Candidate B ranks second.
C · (3, 4)
Distance 5, because 3² + 4² = 25. Candidate C ranks third.

What changes the ordering?

The calculation gives an exact result for those coordinates and that distance rule. Another metric can produce another order. In a large collection, an approximate index can trade some agreement with the exact nearest neighbors for faster retrieval. Test it on representative queries against an exact reference when that trade matters.

Where It Fits in AI Systems

Vector search is a core part of many RAG pipelines. It is also used in recommendation engines, duplicate detection, image retrieval, clustering support, and multimodal search. The quality of the result depends on good embeddings, a strong index, and a retrieval strategy that reflects what users actually need.

Vector search is best understood as a retrieval technique, not as an answer engine by itself. It finds candidates. Other system layers decide how those candidates are ranked, displayed, cited, or passed into generation.

Follow the idea

Embedding describes how an item becomes a point to compare.

Vector database explains how those points can be stored and indexed.

Source · Sentence Transformers’ semantic search guide

Return to Vector Search in the A–Z glossary