RAG
Cosine similarity
Cosine similarity measures the angle between two embedding vectors, giving a score from -1 to 1 for how similar their meanings are.
It compares direction rather than magnitude, which is what you want: a long document and a short sentence about the same topic should score as similar.
In practice scores cluster in a narrow band, so an absolute threshold like 0.8 is meaningless until calibrated against your own data and embedding model.
In practice
The scores are only comparable within one embedding model — 0.82 from one model and 0.82 from another mean nothing to each other. Absolute thresholds set by intuition also travel badly between corpora; pick the cutoff by looking at retrieved results on real queries rather than by choosing a round number.
Common questions
What similarity score counts as a good match?
There is no universal threshold. Scores are only comparable within one embedding model and one corpus, so set the cutoff by inspecting retrieved results on real queries rather than by picking a round number.
Why are all my similarity scores high?
Many embedding models produce a narrow band on real text, so 0.7 to 0.9 covers everything from perfect to irrelevant. What matters is the ranking and the gap between results, not the absolute value.