Cosine similarity is a mathematical measure of how closely two nonzero vectors point in the same direction. It divides their dot product by the product of their lengths. The result ranges from -1 to 1: 1 means the same direction, 0 means perpendicular directions, and -1 means opposite directions.
When vectors are text embeddings, this measure can help estimate how closely passages relate in meaning. Scores depend on the embedding model and the content being compared; there is no universal threshold for a useful match.
Practical relevance
A retrieval system might compare a question about "software for scheduling volunteers" with passages about managing nonprofit shifts. A high similarity score can make a passage a retrieval candidate even without identical wording.
Similarity is not evidence that the passage is accurate, authoritative, or the best answer. It also does not guarantee a citation or ranking. Clear topic coverage helps interpretation, but systems may apply other filters and ranking methods after similarity matching.