AnswerManiac

Getting things ready

AnswerManiac

Getting things ready

Retrieval & ranking

Cosine Similarity

Written and reviewed by Faizan Babar·Co-Founder, AnswerManiac·Updated November 2026

A score from -1 to 1 measuring how closely two vectors point in the same direction.

Cosine similarity is the specific calculation most retrieval systems use to score how alike two embeddings are. It measures the angle between the vectors, returning a value from -1 to 1, where 1 means they point the same way (very similar meaning) and 0 means they are unrelated. It is the number behind 'this passage matches this query'.

You will not compute it yourself for third-party engines, but it is worth knowing because it demystifies retrieval: relevance is a geometric score, not a human judgement. Content that clearly expresses one idea produces a vector that scores high against the queries about that idea and low against everything else.

The lesson is precision — a passage that tries to cover five ideas at once has a muddier vector and a lower cosine match to any single query than five focused passages would.

Want to know where you stand in AI answers?

We’ll show you which engines cite you, and which don’t.

Get a free AI citation audit