cosine similarity
A similarity score between two vectors based only on the angle between them, ignoring their length.
Cosine similarity between vectors u and v is \frac{u \cdot v}{\lVert u \rVert \lVert v \rVert}, the cosine of the angle between them: 1 for identical direction, 0 for perpendicular, -1 for opposite. Because it ignores vector length, it is the standard similarity measure for text embeddings, where length often reflects passage length rather than meaning.
Examples
Two embeddings pointing in nearly the same direction score close to 1.0; two at right angles score close to 0, regardless of how long either vector is.
See also
Point table
Graph settings
Calculator