---
title: "Embedding Distance Metrics"
description: "Embedding distance metrics are mathematical functions used to compare vector embeddings. They determine which items are considered similar in vector search, recommendation systems, clustering, and retrieval pipelines."
canonical_url: "https://promptmetheus.com/resources/llm-knowledge-base/embedding-distance-metrics"
---

> Index of every page on this site: [llms.txt](https://promptmetheus.com/llms.txt)

Embedding distance metrics are mathematical functions used to compare [vector embeddings](https://promptmetheus.com/resources/llm-knowledge-base/vector-embedding). They determine which items are considered similar in [vector search](https://promptmetheus.com/resources/llm-knowledge-base/vector-search), recommendation systems, clustering, and retrieval pipelines.

Common metrics include:

- **Cosine distance:** compares the angle between vectors, often used for text embeddings.
- **Euclidean distance:** measures straight-line distance in vector space.
- **Dot product or inner product:** rewards vectors that point in similar directions and have large magnitude.
- **Manhattan distance:** sums absolute coordinate differences, used less often in modern text retrieval.

The metric must match the embedding model and index configuration. If embeddings were trained or normalized for cosine similarity, ranking them with raw Euclidean distance may produce weaker results. Some vector databases also convert similarity into a distance where lower scores are better, which can confuse evaluation and threshold selection.

Distance metrics are first-stage retrieval signals. For user-facing quality, they are often combined with metadata filters, [hybrid search](https://promptmetheus.com/resources/llm-knowledge-base/hybrid-search), and [reranking](https://promptmetheus.com/resources/llm-knowledge-base/reranking).

Redis documents cosine, L2, and inner-product metrics in its [vector search concepts](https://redis.io/docs/latest/develop/ai/search-and-query/vectors/) guide.

## Sitemap

See the full [sitemap](https://promptmetheus.com/sitemap.md) for all pages.
