Glossary

Cosine Similarity

Cosine similarity compares the direction of two vectors. In text retrieval, it can estimate semantic closeness but does not establish accuracy or citation likelihood.

Diploria

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.

Learn more

Frequently asked questions

Know exactly where
AI mentions your brand

Track ChatGPT, Gemini, Perplexity, Claude and 8 more AI engines - weekly. See how your competitors rank, spot gaps, and fix them fast.