Skip to content
ai

Cosine similarity

Cosine Similarity

Definition

Cosine similarity measures the angle between two vectors in a high-dimensional space, returning a value from -1 to 1 where 1 indicates identical direction. It is the standard distance metric for comparing embedding vectors in semantic search because it is invariant to vector magnitude, focusing purely on directional alignment.

High cosine similarity between a query and document embedding indicates semantic relatedness.

Can this ship? Are we exposed? Can you prove it?

Every CISO is asking these three questions. We answer them with facts, not guesses, from repository to runtime.