Scores how semantically close two embedding vectors are by the angle between them; vector search relies on it.
Also called cosine distance.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Cosine similarity in context, with comparison tables and the common traps.
Terms in this definition
- Embedding
A list of numbers, spanning many dimensions, that captures meaning; items with similar meaning end up near one another, as cosine similarity measures.
- Vector search
Searching embeddings for similar meaning, so paraphrases are found via nearest-neighbour algorithms like HNSW; exact identifiers, however, may be missed.
Related terms
- Embeddings
Vectors of numbers encoding what text means, placing related content close together as judged by cosine similarity. Switching model or vector size requires embedding all content again.