Drag the query point and switch metrics to see how the nearest neighbors change.
Measures the straight-line distance between two points. The concentric circles show equidistant zones — all points on the same circle are equally "far" from the query.
A metric is just a function that takes two vectors and returns a single number telling you how similar (or different) they are. Vector search is, at its core, "find the K vectors with the best metric score against my query." Everything else — indexes, clusters, graphs — is just bookkeeping to avoid computing this score against every vector in the database.
The metric you choose defines what "similar" means for your data. Two embeddings can be "near" under one metric and "far" under another — same data, different answer. That's why this choice happens before you ever build an index.
Try this: drag the query point near the origin and switch between Cosine and L2. Watch how Cosine cares only about which "direction" the query is pointing — points on the opposite side of the origin can be "close" under L2 but "far" under Cosine. That visual is the entire concept.