ScoreMetric
Score metric semantics exposed by storage.
Defines how similarity or relevance scores are computed and interpreted when querying a vector or document store.
Entries
Cosine similarity between two vectors, ranging from -1 to 1. A value of 1 indicates identical direction, 0 indicates orthogonality, and -1 indicates opposite direction. Higher values mean greater similarity.
Cosine distance between two vectors, defined as 1 - cosine_similarity, ranging from 0 to 2. A value of 0 indicates identical vectors, while 2 indicates opposite vectors. Lower values mean greater similarity.
Dot product (inner product) of two vectors. The value is unbounded and depends on vector magnitudes. Higher values indicate greater similarity when vectors are normalized.
Euclidean (L2) distance between two vectors, ranging from 0 to infinity. A value of 0 indicates identical vectors. Lower values mean greater similarity.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.