-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add multi-vector support to search requests #24614
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
Merged
+7
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to have both
VectorandVector[]in the model? Should this be made into a singleVector[]property where users of a single vector search just passes one Vector in the request?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to fully retire the single "Vector" parameter in our next GA version. We had agreed on the first API review to replace the single vector parameter by an array of vectors instead for better long-term support, but unfortunately given how fast the feature was released, at that point we already had too many build demos and private customers using that parameter, so to be kind with all of those client apps, we decided to support both in the private preview. There is validation on the back end to let the customer know they should only use one or the other.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. We prefer to have only
Vector[], and a singleVector[]would represent a single vector search.However, we didn't want to break any existing customers so we support both until our next GA version, where we'll end support for singular
Vector. In the meantime, customers can only pass in either avectorsarray orvectorsingular and we have validation to throw if both are provided.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanations @shmed and @robertklee.
Given this is getting merged in close to the SDKs releasing for preview we won't have time to regenerate with this change. So, the first release will go out with only single vector support, the next release we will add this change in and handle single vector calling with the multi-vector value so we won't need to make changes before GA.
For customers calling in with the single vector property is there any way to warn them the API will be removed before GA? Or is there an expectation most will be using the SDKs where we will handle this as I called out above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I'm not sure if we can surface that in the API response, since a 2xx status code wouldn't contain any error messages or warnings.
We can call it out in the GA API version as new behavior. Maybe there's a way we can return a custom error message in the GA version that calls out this change.
Do you have any suggestions for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any recommendations at this time. I think for now the best would be having it mentioned somewhere in documentation that the
Vectorusage will be deprecated in favor ofVector[]and for the SDKs we'll just always call intoVector[]and hideVector.