Cosine Similarity
A measure of how alike two vectors are by the angle between them; for normalised vectors it's identical to a dot product.
Cosine similarity is the standard way to measure how alike two concepts are in vector search. It looks at the angle between two vectors, scoring them from zero to one. But a look into Google Chrome's source code reveals a clever shortcut.
Instead of running the full, complex cosine formula, Google's system normalizes the vectors first, giving them all a length of one. When vectors are normalized this way, the cosine similarity simplifies mathematically to a plain dot product. The two methods yield the exact same ranking, but the dot product is much cheaper and faster to compute.
For search engine optimization and AI, this means the debate between using cosine similarity or dot product is often a non-issue. If your embeddings are normalized, they give you the same result. What really matters is that search systems are judging relevance by the direction of meaning in vector space, rather than just matching keywords. This simple mathematical relationship is what drives modern tools, including Chrome's history search, to understand the true intent behind our queries.
Cosine similarity measures how alike two vectors are by the angle between them, scoring 1 for identical direction and 0 for unrelated. It's the standard way to compare vector embeddings and drive vector search.
A detail we found in Chrome's source code is worth knowing: Google's embedder computes a plain dot product between vectors that have been normalised to unit length. When both vectors have magnitude 1, the cosine formula simplifies exactly to the dot product, so the two are mathematically equivalent — Google just picks the cheaper computation by skipping the division.
The practical point for AI SEO is that "cosine or dot product" is often a non-question: with normalised embeddings they give the same ranking. What matters is that relevance is judged by direction in meaning-space, not word overlap. This underpins how Chrome's history embeddings and similar systems rank content.
