Reference · Glossary

Cosine similarity

Last updated

A score from **-1 to 1** measuring how aligned two vectors are — common for comparing embeddings.

When to use

RAG retrieval, duplicate detection, recommendation "more like this."

When not to

When you need literal string match — use keyword search or hybrid search.

Example

Two similar sentences → embeddings with cosine ≈ 0.9; unrelated topics → closer to 0.