Cosine similarity
Cosine similarity measures the angular relationship between vectors, ignoring magnitude. This metric focuses on direction rather than scale, making it ideal for text embeddings where the angle between vectors matters more than their length.
- Text embeddings and semantic similarity
- Normalized vectors
- Natural language processing applications
- Recommendation systems
Euclidean distance
Euclidean distance measures straight-line distance between points using the Pythagorean theorem. This metric is sensitive to both direction and magnitude, making it suitable for scenarios where the absolute distance matters.
- Image embeddings
- Spatial data
- When magnitude matters
- Performance-critical applications with the squared variant
Dot product
Dot product measures both alignment and magnitude by summing products of corresponding components. It can be computationally efficient for large-scale applications because it avoids the division and square root operations required by cosine similarity.

- Pre-normalized embeddings
- Embedding models that output normalized vectors
- Large-scale search systems
- Recommendation engines
Task guides
The following guides show how to configure each distance metric.Next steps
- Collections — Organize vectors into named, searchable groups.
- Indexing — Optimize search performance with HNSW parameters.
- Vectors — Understand vector embeddings.
- Search operations — Query vectors for similarity.