Skip to content

Updating documentation for text_similarity_reranker for 8.x #126971

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

Samiul-TheSoccerFan
Copy link
Contributor

As part of Semantic Rerank GA, updating the documentation to address that the inference_id field is not required anymore.

Copy link
Contributor

Documentation preview:

@Samiul-TheSoccerFan Samiul-TheSoccerFan added >docs General docs changes auto-backport Automatically create backport pull requests when merged v8.18.0 v8.18.1 labels Apr 17, 2025
@Samiul-TheSoccerFan Samiul-TheSoccerFan added Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Docs Meta label for docs team labels Apr 17, 2025
@Samiul-TheSoccerFan Samiul-TheSoccerFan requested a review from a team April 17, 2025 01:16
@Samiul-TheSoccerFan Samiul-TheSoccerFan marked this pull request as ready for review April 17, 2025 01:16
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-eng (Team:SearchOrg)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)


You have the following options:

* Use the the built-in <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference API's {es} service.
* Use the built-in <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference APIs {{es}} service. For an example of creating an endpoint using the Elastic Rerank model, refer to <<https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html#inference-example-elastic-reranker, this guide>>.
Copy link
Contributor

@leemthompo leemthompo Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Use the built-in <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference APIs {{es}} service. For an example of creating an endpoint using the Elastic Rerank model, refer to <<https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elasticsearch.html#inference-example-elastic-reranker, this guide>>.
Use the built-in Elastic Rerank cross-encoder model via the inference API's {es} service. See <<inference-example-elastic-reranker, this example>> for creating an endpoint using the Elastic Rerank model.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • We already had that link, so I removed the first one
  • The new link syntax was incorrect

@@ -87,11 +85,11 @@ To use semantic re-ranking in {es}, you need to:

. *Select and configure a re-ranking model*.
You have the following options:
.. Use the <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference API's {es} service.
.. Use the <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via a preconfigured `.rerank-v1-elasticsearch` or by creating a custom deployment using the inference API's {es} service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. Use the <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via a preconfigured `.rerank-v1-elasticsearch` or by creating a custom deployment using the inference API's {es} service.
.. Use the <<inference-example-elastic-reranker,Elastic Rerank>> model through a preconfigured `.rerank-v1-elasticsearch` endpoint or create a custom one using the inference API's {es} service.

To use `text_similarity_reranker` you must first set up an inference endpoint for the `rerank` task using the <<put-inference-api, Create {infer} API>>.
The endpoint should be set up with a machine learning model that can compute text similarity.
Refer to {ml-docs}/ml-nlp-model-ref.html#ml-nlp-model-ref-text-similarity[the Elastic NLP model reference] for a list of third-party text similarity models supported by {es}.
To use `text_similarity_reranker`, you can rely on the preconfigured `.rerank-v1-elasticsearch` inference endpoint, which is based on <<inference-example-elastic-reranker,Elastic Rerank>> and serves as the default if no `inference_id` is provided.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To use `text_similarity_reranker`, you can rely on the preconfigured `.rerank-v1-elasticsearch` inference endpoint, which is based on <<inference-example-elastic-reranker,Elastic Rerank>> and serves as the default if no `inference_id` is provided.
To use `text_similarity_reranker`, you can rely on the preconfigured `.rerank-v1-elasticsearch` inference endpoint, which uses the <<inference-example-elastic-reranker,Elastic Rerank model>> and serves as the default if no `inference_id` is provided.

Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few changes needed, but otherwise looks good! Remember we need to update the 9.x equivalents too nowadays:

https://www.elastic.co/docs/solutions/search/ranking/semantic-reranking
https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers

@Samiul-TheSoccerFan
Copy link
Contributor Author

@leemthompo I already had a PR for 9.x #126175. But as these changes are similar, I will create another PR to address these changes.

Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Samiul-TheSoccerFan Samiul-TheSoccerFan merged commit e404350 into elastic:8.x Apr 17, 2025
5 checks passed
Samiul-TheSoccerFan added a commit to Samiul-TheSoccerFan/elasticsearch that referenced this pull request Apr 17, 2025
…126971)

* Updating documentation of text_similarity_reranker for 8.x

* updating documentation to remove duplicate and redundant wording
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18

elasticsearchmachine pushed a commit that referenced this pull request Apr 17, 2025
…#127007)

* Updating documentation of text_similarity_reranker for 8.x

* updating documentation to remove duplicate and redundant wording
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >docs General docs changes :SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Docs Meta label for docs team Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.18.0 v8.18.1 v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants