- Notifications
You must be signed in to change notification settings - Fork 25.5k
Adding common rerank options to Perform Inference API #125239
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
Conversation
run elasticsearch-ci/8.19.0/bwc-snapshots |
run elasticsearch-ci/bwc-snapshots |
Hi @ymao1, I've created a changelog YAML for you. |
Pinging @elastic/ml-core (Team:ML) |
import java.util.List; | ||
import java.util.Objects; | ||
| ||
public record GoogleVertexAiRerankRequestEntity(String query, List<String> inputs, @Nullable String model, @Nullable Integer topN) |
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.
How about we move the logic to determine which topN to use in the GoogleVertexAiRerankRequest
. That way this class does need both variables.
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.
Updated in 458ff31
run elasticsearch-ci/rest-compatibility |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* wip * Adding rerank common options * Linting * Linting * [CI] Auto commit changes from spotless * Update docs/changelog/125239.yaml * PR feedback --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> (cherry picked from commit a6f685c) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/InferenceActionRequestTests.java
) * wip * Adding rerank common options * Linting * Linting * [CI] Auto commit changes from spotless * Update docs/changelog/125239.yaml * PR feedback --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> (cherry picked from commit a6f685c) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/InferenceActionRequestTests.java
* wip * Adding rerank common options * Linting * Linting * [CI] Auto commit changes from spotless * Update docs/changelog/125239.yaml * PR feedback --------- Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Resolves #111273
Summary
Exposes the
return_documents
andtop_n
parameters as root level fields in the Perform Inference API forrerank
task types. Previously, this setting was available for certain services as a task setting. The root option, if specified, will now take precedence over the task settings option.Services that support rerank
AlibabaCloud AI Search - docs
Does not accept
return_documents
ortop_n
parameters so throws validation exception if either is specifiedCohere - docs
Elasticearch
Updated to respect the
top_n
option if definedGoogle Vertex AI - docs
Jina AI - docs
Voyage AI - docs