Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2496,6 +2496,13 @@
"vector": {
"$ref": "#/definitions/Vector",
"description": "The query parameters for vector and hybrid search queries."
},
"vectors": {
Copy link
Copy Markdown
Member

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 Vector and Vector[] in the model? Should this be made into a single Vector[] property where users of a single vector search just passes one Vector in the request?

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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 single Vector[] 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 a vectors array or vector singular and we have validation to throw if both are provided.

Copy link
Copy Markdown
Member

@alzimmermsft alzimmermsft Jun 27, 2023

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.

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member

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 Vector usage will be deprecated in favor of Vector[] and for the SDKs we'll just always call into Vector[] and hide Vector.

"type": "array",
"items": {
"$ref": "#/definitions/Vector"
},
"description": "The query parameters for multi-vector search queries."
}
},
"description": "Parameters for filtering, sorting, faceting, paging, and other search query behaviors."
Expand Down