Cosine vs. Euclidean: Why Direction Trumps Distance in LLMs

Cosine similarity measures the angle between vectors, focusing on direction, which is critical for semantic meaning in high-dimensional LLM embeddings; Euclidean distance, conversely, is heavily influenced by magnitude differences that may not convey semantic information.

Sources

Open the full topic