What is cosine similarity?
A measure of how similar two items are when they're represented as lists of numbers. It goes from -1 (opposites) to 1 (identical), with 0 meaning unrelated.
Also called: cosine, cosine distance.
An analogy
Two compass needles: pointing the same way, they agree; pointing opposite ways, they disagree; at a right angle, they have nothing to do with each other.
Where it shows up in the course
- Embeddings + Vector DBs
- RAG