다음을 통해 공유


VectorSearchAlgorithmMetric Struct

Definition

The similarity metric to use for vector comparisons. It is recommended to choose the same similarity metric as the embedding model was trained on.

public readonly struct VectorSearchAlgorithmMetric : IEquatable<Azure.Search.Documents.Indexes.Models.VectorSearchAlgorithmMetric>
type VectorSearchAlgorithmMetric = struct
Public Structure VectorSearchAlgorithmMetric
Implements IEquatable(Of VectorSearchAlgorithmMetric)
Inheritance
VectorSearchAlgorithmMetric
Implements

Constructors

VectorSearchAlgorithmMetric(String)

Initializes a new instance of VectorSearchAlgorithmMetric.

Properties

Cosine

Measures the angle between vectors to quantify their similarity, disregarding magnitude. The smaller the angle, the closer the similarity.

DotProduct

Calculates the sum of element-wise products to gauge alignment and magnitude similarity. The larger and more positive, the closer the similarity.

Euclidean

Computes the straight-line distance between vectors in a multi-dimensional space. The smaller the distance, the closer the similarity.

Hamming

Only applicable to bit-packed binary data types. Determines dissimilarity by counting differing positions in binary vectors. The fewer differences, the closer the similarity.

Methods

Equals(VectorSearchAlgorithmMetric)

Indicates whether the current object is equal to another object of the same type.

ToString()

Returns the fully qualified type name of this instance.

Operators

Equality(VectorSearchAlgorithmMetric, VectorSearchAlgorithmMetric)

Determines if two VectorSearchAlgorithmMetric values are the same.

Implicit(String to VectorSearchAlgorithmMetric)

Converts a string to a VectorSearchAlgorithmMetric.

Inequality(VectorSearchAlgorithmMetric, VectorSearchAlgorithmMetric)

Determines if two VectorSearchAlgorithmMetric values are not the same.

Applies to