Skip to content

Commit 080aaef

Browse files
Updating documentation for text_similarity_reranker for 8.x (#126971) (#127007)
* Updating documentation of text_similarity_reranker for 8.x * updating documentation to remove duplicate and redundant wording
1 parent 4522eb7 commit 080aaef

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

docs/reference/reranking/semantic-reranking.asciidoc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[[semantic-reranking]]
22
== Semantic re-ranking
33

4-
preview::[]
5-
64
[TIP]
75
====
86
This overview focuses more on the high-level concepts and use cases for semantic re-ranking. For full implementation details on how to set up and use semantic re-ranking in {es}, see the <<text-similarity-reranker-retriever,reference documentation>> in the Search API docs.
@@ -87,11 +85,11 @@ To use semantic re-ranking in {es}, you need to:
8785

8886
. *Select and configure a re-ranking model*.
8987
You have the following options:
90-
.. Use the <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference API's {es} service.
88+
.. 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.
9189
.. Use the <<infer-service-cohere,Cohere Rerank inference endpoint>> to create a `rerank` endpoint.
9290
.. Use the <<infer-service-google-vertex-ai,Google Vertex AI inference endpoint>> to create a `rerank` endpoint.
9391
.. Upload a model to {es} from Hugging Face with {eland-docs}/machine-learning.html#ml-nlp-pytorch[Eland]. You'll need to use the `text_similarity` NLP task type when loading the model using Eland. Then set up an <<inference-example-eland,{es} service inference endpoint>> with the `rerank` endpoint type.
94-
+
92+
+
9593
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} for semantic re-ranking.
9694

9795
. *Create a `rerank` endpoint using the <<put-inference-api,{es} Inference API>>*.
@@ -137,4 +135,4 @@ POST _search
137135
* Read the <<retriever,retriever reference documentation>> for syntax and implementation details
138136
* Learn more about the <<retrievers-overview,retrievers>> abstraction
139137
* Learn more about the Elastic <<inference-apis,Inference APIs>>
140-
* Check out our https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/integrations/cohere/cohere-elasticsearch.ipynb[Python notebook] for using Cohere with {es}
138+
* Check out our https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/integrations/cohere/cohere-elasticsearch.ipynb[Python notebook] for using Cohere with {es}

docs/reference/search/retriever.asciidoc

+7-6
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,14 @@ Refer to <<semantic-reranking>> for a high level overview of semantic re-ranking
536536

537537
===== Prerequisites
538538

539-
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>>.
540-
The endpoint should be set up with a machine learning model that can compute text similarity.
541-
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}.
539+
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.
540+
This model is optimized for reranking based on text similarity. If you'd like to use a different model, you can set up a custom inference endpoint for the `rerank` task using the <<put-inference-api, Create {infer} API>>.
541+
The endpoint should be configured with a machine learning model capable of computing text similarity.
542+
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}}.
542543

543544
You have the following options:
544545

545-
* Use the the built-in <<inference-example-elastic-reranker,Elastic Rerank>> cross-encoder model via the inference API's {es} service.
546+
* Use the built-in Elastic Rerank cross-encoder model via the inference APIs {{es}} service. See <<inference-example-elastic-reranker, this example>> for creating an endpoint using the Elastic Rerank model.
546547
* Use the <<infer-service-cohere,Cohere Rerank inference endpoint>> with the `rerank` task type.
547548
* Use the <<infer-service-google-vertex-ai,Google Vertex AI inference endpoint>> with the `rerank` task type.
548549
* Upload a model to {es} with {eland-docs}/machine-learning.html#ml-nlp-pytorch[Eland] using the `text_similarity` NLP task type.
@@ -582,9 +583,9 @@ The document field to be used for text similarity comparisons.
582583
This field should contain the text that will be evaluated against the `inferenceText`.
583584

584585
`inference_id`::
585-
(Required, `string`)
586+
(Optional, `string`)
586587
+
587-
Unique identifier of the inference endpoint created using the {infer} API.
588+
Unique identifier of the inference endpoint created using the {infer} API. If you don’t specify an inference endpoint, the `inference_id` field defaults to `.rerank-v1-elasticsearch`, a preconfigured endpoint for the elasticsearch `.rerank-v1` model.
588589

589590
`inference_text`::
590591
(Required, `string`)

0 commit comments

Comments
 (0)