AI Term 1 min read

Cosine

What it measures: The angle between two vectors, ignoring their length/magnitude.

When to use: Text embeddings, document similarity, when direction matters more than magnitude.

Math insight: Focuses on the “shape” or direction of the data pattern, not how “intense” it is.

Example: Two documents about “cars” will have a small angle between their vectors, even if one document is much longer.

Range: -1 to 1 (closer to 1 = more similar)

← Back to Glossary