-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net: Bug: Some vector DBs return scores that do not match the definition of the distance function #10103
Labels
bug
Something isn't working
memory connector
.NET
Issue or Pull requests regarding .NET code
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Comments
4 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 10, 2025
Loading
Loading status checks…
…10144) ### Motivation and Context Adds tests for verifying the scores as mentioned in #10103 Only adding tests for passing connectors right now. ### Description Adding a common base test class with integration tests for checking the returned vector scores. Adding subclasses for InMemory, Qdrant and Postgres, since these are passing end to end. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [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 😄
4 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 15, 2025
Loading
Loading status checks…
…adding integration tests for score testing for these. (#10170) ### Motivation and Context #10103 ### Description - Adding integration tests for Pinecone, Weaviate and Redis. - Changing EuclideanDistance to EuclideanSquaredDistance for Redis and Pinecone - Changing DotProductSimilarity to NegativeDotProduct for Weaviate ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [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 😄
Where vector stores match standard distance functions, we have aligned the naming, but for those that do not match anything, we will continue to use the naming provided in the documentation of the database. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
memory connector
.NET
Issue or Pull requests regarding .NET code
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Describe the bug
For the purposes of this bug description the following vectors have been used:
[1, 0, 0, 0]
[-1, 0, 0, 0]
Examples:
We should test all distance functions for all connectors to ensure that they return the expected values.
To Reproduce
Create a redis vector store collection using DotProductSimilarity. Add a record with the following vector [1, 0, 0, 0] and do a vector search using the same vector. The score returned is -1.
Expected behavior
The score returned is 1.
Platform
The text was updated successfully, but these errors were encountered: