You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Fixed sorting for negative DOT product (#13071)
### Motivation and Context
When using negative dot product scoring, the more negative the value,
the closer the vector is to the query vector.
### Description
Fixed the sorting used for negative dot product distance calculations
### Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
---------
Co-authored-by: westey <[email protected]>
Copy file name to clipboardExpand all lines: dotnet/test/VectorData/VectorData.ConformanceTests/VectorSearch/VectorSearchDistanceFunctionComplianceTests.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ public virtual Task DotProductSimilarity()
/// Tests vector search using <see cref="DistanceFunction.NegativeDotProductSimilarity"/>, computing -(u · v) as a distance metric per Weaviate's convention.
21
-
/// Expects scores of -1 (exact match), 1 (opposite), and 0 (orthogonal), sorted ascending ([0, 2, 1]), with lower scores indicating closer matches.
/// Tests vector search using <see cref="DistanceFunction.NegativeDotProductSimilarity"/>, computing -(u · v) as a distance metric per Weaviate's convention.
38
-
/// Expects scores of -1 (exact match), 1 (opposite), and 0 (orthogonal), sorted ascending ([0, 2, 1]), with lower scores indicating closer matches.
0 commit comments