Toggle Menu
Prev Up Next

# `langchain.evaluation.embedding_distance.base`.EmbeddingDistance

class langchain.evaluation.embedding_distance.base.EmbeddingDistance(value)

  Embedding Distance Metric.

  COSINE

    Cosine distance metric.

  EUCLIDEAN

    Euclidean distance metric.

  MANHATTAN

    Manhattan distance metric.

  CHEBYSHEV

    Chebyshev distance metric.

  HAMMING

    Hamming distance metric.

  COSINE = 'cosine'
  EUCLIDEAN = 'euclidean'
  MANHATTAN = 'manhattan'
  CHEBYSHEV = 'chebyshev'
  HAMMING = 'hamming'

# Examples using EmbeddingDistance

- You can load by enum or by raw python string

- pairwise_embedding_distance.md