RAG & Search
Cosine similarity
A common way to measure the angle-based similarity between two vectors.
Example
Two text vectors pointing in nearly the same direction receive a high cosine similarity.
Why it matters
It helps compare patterns without making their overall size the only deciding factor.
You'll hear it
“These descriptions point in a similar direction despite different lengths.”
Can you control it?
Not directly
No, not directly. Cosine similarity describes a learned property, observed result, or broader concept rather than a normal user setting. You may influence it indirectly by changing the tool, data, prompt, or workflow.
Common questions
- Does a high value mean two items are identical?
- No. It indicates similarity under this calculation, not complete equivalence.
- Does the method verify meaning by itself?
- No. Its usefulness depends on what the compared numbers represent.
- Can a zero-length description cause a problem?
- Yes. A direction cannot be determined for an all-zero description without special handling.