Adding common rerank options to Perform Inference API#125239
Merged
ymao1 merged 14 commits intoelastic:mainfrom Mar 25, 2025
Merged
Adding common rerank options to Perform Inference API#125239ymao1 merged 14 commits intoelastic:mainfrom
ymao1 merged 14 commits intoelastic:mainfrom
Conversation
Contributor
Author
|
run elasticsearch-ci/8.19.0/bwc-snapshots |
Contributor
Author
|
run elasticsearch-ci/bwc-snapshots |
Collaborator
|
Hi @ymao1, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
jonathan-buttner
approved these changes
Mar 21, 2025
| import java.util.List; | ||
| import java.util.Objects; | ||
|
|
||
| public record GoogleVertexAiRerankRequestEntity(String query, List<String> inputs, @Nullable String model, @Nullable Integer topN) |
Contributor
There was a problem hiding this comment.
How about we move the logic to determine which topN to use in the GoogleVertexAiRerankRequest. That way this class does need both variables.
Contributor
Author
|
run elasticsearch-ci/rest-compatibility |
Contributor
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
ymao1
added a commit
to ymao1/elasticsearch
that referenced
this pull request
Mar 25, 2025
* 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
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 25, 2025
) * 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
omricohenn
pushed a commit
to omricohenn/elasticsearch
that referenced
this pull request
Mar 28, 2025
* 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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #111273
Summary
Exposes the
return_documentsandtop_nparameters as root level fields in the Perform Inference API forreranktask 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_documentsortop_nparameters so throws validation exception if either is specifiedCohere - docs
Elasticearch
Updated to respect the
top_noption if definedGoogle Vertex AI - docs
Jina AI - docs
Voyage AI - docs