Definition
Plain language
A way of measuring how close two pieces of meaning are by treating each as an arrow and checking the angle between them.
As stated in the literature
A similarity measure equal to the cosine of the angle between two vectors, widely used to compare text embeddings, where closeness in direction reflects semantic similarity.
Why it matters: It gives a simple, fast way to measure how related two pieces of text are by meaning, which powers search and recommendation tools.
For example, the phrases 'happy dog' and 'joyful puppy' point in nearly the same direction as vectors, so their cosine similarity is high.
Heard on the show
“And the tool for "do these point the same way" is cosine similarity — a number that's one if two arrows point the same direction, zero if they're perpendicular, minus one if they're opposite.”Episode 126 — How Coding Agents Can Mine Their Own Failures Into a Self-Targeting Curriculum