Cosine similarity is the scoring function underneath essentially every vector search.
It measures the angle between the query vector and each document vector.
Identical direction scores one, unrelated scores near zero, opposite scores minus one.
With real text embeddings most scores land between about 0.3 and 0.9.
Length is ignored entirely, which is exactly what you want here.
A query is a few words and a document is a few hundred, so their vector lengths differ.
Euclidean distance would treat that difference as a difference in meaning.
Cosine looks only at direction and compares them fairly.
If vectors are normalised to length one, cosine and dot product give the same ranking.
Most embedding APIs normalise for you, so engines use the dot product for speed.
The absolute number means little, since 0.82 is not good or bad on its own.
What matters is the ranking and the gap between the top results.
Thresholds must be tuned per model and per corpus, never copied from a tutorial.
It is a similarity of wording and meaning, not of correctness.
A sentence and its negation sit very close, which is why retrieval can confidently return the opposite of the truth.