VectorSearchOptions<TRecord>.ScoreThreshold Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the score threshold to filter results.
public:
property Nullable<double> ScoreThreshold { Nullable<double> get(); void set(Nullable<double> value); };
public double? ScoreThreshold { get; set; }
member this.ScoreThreshold : Nullable<double> with get, set
Public Property ScoreThreshold As Nullable(Of Double)
Property Value
Remarks
The meaning of the score depends on the distance function configured for the vector property. For similarity functions (e.g. CosineSimilarity, DotProductSimilarity), higher scores indicate more similar results, and results with scores lower than the threshold will be filtered out. For distance functions (e.g. CosineDistance, EuclideanDistance), lower scores indicate more similar results, and results with scores higher than the threshold will be filtered out.
The range of scores also depends on the distance function; for example, cosine similarity/distance scores fall within 0 to 1, while Euclidean distance is unbounded. Scores can also differ between vector databases.