.Net: Align Chroma memory store behavior with other stores#2215
.Net: Align Chroma memory store behavior with other stores#2215lemillermicrosoft merged 13 commits intomicrosoft:mainfrom
Conversation
merge upstream
merge upstream
merge upstream
merge upstream
merge upstream
Merge upstream
merge upstream
Merge upstream
…sting collections and collection lookups.
dmytrostruk
left a comment
There was a problem hiding this comment.
@jsboige thank you for contribution.
Based on our conversation in this PR #1989 and my comment:
Regarding alignment between different connectors - we should definitely do that at some point. And I think that for
Searchoperation:
- If collection exists but it's empty - we should return empty collection.
- If collection doesn't exist - we should throw an exception to the caller, because it will clearly describe that something is wrong with memory connector setup.
In this case it will be easier to differentiate two scenarios and react on them appropriately.
For example, in Qdrant, memory record operations like Get, Upsert, Remove will throw exception in case you try to perform operation in non-existent collection. I don't see any reasons for Search operation to behave in different way and return empty result instead.
In case we make an agreement on this, then we should leave Chroma implementation as it is and align other connectors which don't follow this pattern.
Please let me know what you think about it.
dmytrostruk
left a comment
There was a problem hiding this comment.
@jsboige please see my comment above.
|
@dmytrostruk OK I'm happy either :
Can you make a firm decision? |
|
@jsboige Please use this option for now:
We will focus on aligning every connector to follow the same flow, I created issue for that - #2269 The preferred way would be to throw an exception when collection doesn't exist. Thank you! |
… non existing collections and collection lookups." This reverts commit 55b3505.
|
@dmytrostruk I reverted the over reach to only keep the logger update |
…#2215) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This is an attempt to account for the [following PR](microsoft#1989 (comment)). Chroma logs an error when calling DoesCollectionExistAsync on a non existing collection, it should log at debug level instead Also Volatile Store and QDrant return an empty collection when calling GetNearestMatchesAsync whereas Chroma throws an exception. This PR aligns behavior with other stores. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Align chroma store behavior with other common memory stores ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
…#2215) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This is an attempt to account for the [following PR](microsoft#1989 (comment)). Chroma logs an error when calling DoesCollectionExistAsync on a non existing collection, it should log at debug level instead Also Volatile Store and QDrant return an empty collection when calling GetNearestMatchesAsync whereas Chroma throws an exception. This PR aligns behavior with other stores. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Align chroma store behavior with other common memory stores ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
Motivation and Context
This is an attempt to account for the following PR.
Chroma logs an error when calling DoesCollectionExistAsync on a non existing collection, it should log at debug level instead
Also Volatile Store and QDrant return an empty collection when calling GetNearestMatchesAsync whereas Chroma throws an exception. This PR aligns behavior with other stores.
Description
Align chroma store behavior with other common memory stores
Contribution Checklist