🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Cosine Similarity

In plain terms

A measure of similarity between two vectors by their angle.

Going deeper

Cosine similarity gauges how aligned two vectors are by the cosine of the angle between them, independent of magnitude. It's widely used to compare embeddings.

Under the hood

Ranges -1 to 1; magnitude-invariant, making it ideal for comparing direction (meaning) of embeddings.

Examples

Embedding comparison, semantic search, recommendations, RAG retrieval.

Think of it like...

Like judging whether two arrows point the same way, regardless of their length.

Feedback & Bug Report