Table of Contents

Enum EmbeddingDistanceMetric

Namespace
MailFathom.Application.Emails.Embeddings
Assembly
MailFathom.Application.dll

Names how the distance between two vectors of one space is measured.

public enum EmbeddingDistanceMetric

Fields

Cosine = 0

The angle between two vectors, which is what a normalized embedding model is trained for.

EuclideanDistance = 2

The straight-line distance between two points of the space.

InnerProduct = 1

The negative inner product, for a model whose magnitude carries meaning.

Remarks

Part of an embedding profile's identity rather than a property of a query, because two vectors are only comparable under the metric the model was trained for: reading a space built for cosine distance under an inner product returns a number rather than an error, and the wrong number looks exactly like the right one.