Cosine Similarity: The Angle That Misses the Meaning
SEO “experts” give cosine similarity too much credit for semantic matching.
Cosine similarity is purely a geometric measure based on vector DIRECTION, not MAGNITUDE! Considering only angles between vectors without their lengths is SO LIMITED!
Cosine similarity only considers the ORIENTATION of vectors and NOT their magnitude. It cares about the PRESENCE and FREQUENCY of words, not the length of the documentโฆ
And there’s so much more!
Cosine similarity assumes that the vector space perfectly captures semantic relationships.
โ Do people understand that embeddings are approximations trained on finite data?
Embeddings won’t always encode the nuances…
Perhaps the easiest concept to understand is that cosine similarity doesn’t account for WORD ORDER (or syntax), which are both critical for meaning!
I’ll illustrate with a few sentences.
๐ข ๐ง๐ต๐ฒ ๐ฑ๐ผ๐ด ๐ฐ๐ต๐ฎ๐๐ฒ๐ฑ ๐๐ต๐ฒ ๐ฐ๐ฎ๐
โญ ๐ง๐ต๐ฒ ๐ฐ๐ฎ๐ ๐ฐ๐ต๐ฎ๐๐ฒ๐ฑ ๐๐ต๐ฒ ๐ฑ๐ผ๐ด
Despite meaning OPPOSITE things, in a bag-of-words model (where text is represented as an unordered set of terms), these sentences can have identical vectors and a cosine similarity of 1.
Want another simple example?
โญ ๐ง๐ต๐ฒ ๐๐๐๐ฑ๐ฒ๐ป๐ ๐ด๐ฟ๐ฎ๐ฑ๐ฒ๐ฑ ๐๐ต๐ฒ ๐๐ฒ๐ฎ๐ฐ๐ต๐ฒ๐ฟ
๐ข ๐ง๐ต๐ฒ ๐๐ฒ๐ฎ๐ฐ๐ต๐ฒ๐ฟ ๐ด๐ฟ๐ฎ๐ฑ๐ฒ๐ฑ ๐๐ต๐ฒ ๐๐๐๐ฑ๐ฒ๐ป๐
Because these sentences contain the exact same words, their vector representations are very similar: they have a high cosine similarity scoreโฆ but meanings are VERY different!

Imagine the risk when we’re dealing with complexity! ๐ฅฒ
Cosine similarity for the same sentences with a Bag of Words model: we get 100% similarity!

The question is WHY?
Because a bag-of-words model represents text as a numerical vector based on the frequency of words, disregarding order!
Yes, cosine similarity is a simple concept but this simplicity results in a semantic sacrifice! Cosine similarity often misses MEANING by ignoring MAGNITUDE and CONTEXT!
We all know that meaning isn’t just about the words themselves, but their relationships and ORDER. And cosine similarity, at least in its basic form, will miss these essential distinctions.
In natural language processing, CONTEXT and WORD ORDER are very important, but basic cosine similarity does not consider those factors!
And even with embeddings that incorporate some context (like transformers), cosine similarity won’t fully capture structural differences that we intuitively grasp.
Senior SEOs give cosine similarity too much credit for semantic matching because they overestimate its ability to capture the richness of language.
ยฉ March 9, 2025 – Elie Berreby
Downloadable PDF: Cosine-Similarity-Angle-misses-Meaning-Elie-Berreby.pdf
1 Comment
ไฝๅผฆ็ธไผผๅบฆ๏ผ้่ฟๅซไน็่งๅบฆ - ๅๆง็็ ๅ
March 9, 2025[…] ่ฏฆๆ ๅ่ […]