Language & LLMs

What Is Cosine Similarity?

Cosine similarity measures the similarity between two vectors by computing the cosine of the angle between them. Values range from -1 to 1, with values near 1 indicating vectors pointing in similar directions. It is widely used to compare text embeddings in search and retrieval.

Further reading

Read more about cosine similarity — articles and blogs from around the web: