cosine similarity

A similarity score between two vectors from the angle between them, from 1 for the same direction to -1 for opposite, ignoring their lengths.

In more detail

It is the usual measure for text embeddings. Cosine distance is one minus the similarity, which is what pgvector's <=> operator and Chroma's cosine space return; for unit vectors all common measures give the same ranking.

Related terms

Taught in

References

Certification courses