Cosine similarity: direction only, best when vector magnitude is not meaningful (text embeddings).
Dot product: considers magnitude too; used in attention and when training objectives encode confidence in magnitude.
Euclidean distance: absolute closeness in space, suitable for clustering with k-means; sensitive to scale and degrades in high dimensions.
Match the metric used to train the embedding model, and normalize vectors if the index uses inner product to emulate cosine.
Loading…