ShipSquad

What is Cosine Similarity?

AI Engineering

Last updated:

A metric that measures the angle between two vectors to determine how semantically similar they are, ranging from -1 to 1.

Cosine similarity computes the cosine of the angle between two embedding vectors, ignoring magnitude. A value of 1 means identical direction (maximum similarity), 0 means orthogonal (unrelated), and -1 means opposite. It is the default similarity metric in most vector databases.

Related Terms

Further Reading

Ready to assemble your AI squad?

10 specialized AI agents. One mission. $99/mo + your Claude subscription.

Start Your Mission