Cosine similarity compares vector direction and ignores length. Dot product rewards both alignment and magnitude. Euclidean distance measures straight-line distance between points, with smaller values indicating a closer match.
When every vector has unit length, cosine similarity equals dot product. Euclidean distance is then a monotonic transformation of the same value, so all three produce the same ranking. Without normalization, their rankings can differ.
Choose the metric used during model training or recommended by its documentation. Normalize consistently at ingestion and query time when required. Test the full retrieval system because changing a database metric without rechecking model assumptions can quietly lower recall.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.