You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/reranking/semantic-reranking.asciidoc
+3-5
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
[[semantic-reranking]]
2
2
== Semantic re-ranking
3
3
4
-
preview::[]
5
-
6
4
[TIP]
7
5
====
8
6
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:
87
85
88
86
. *Select and configure a re-ranking model*.
89
87
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.
91
89
.. Use the <<infer-service-cohere,Cohere Rerank inference endpoint>> to create a `rerank` endpoint.
92
90
.. Use the <<infer-service-google-vertex-ai,Google Vertex AI inference endpoint>> to create a `rerank` endpoint.
93
91
.. 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
+
+
95
93
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.
96
94
97
95
. *Create a `rerank` endpoint using the <<put-inference-api,{es} Inference API>>*.
@@ -137,4 +135,4 @@ POST _search
137
135
* Read the <<retriever,retriever reference documentation>> for syntax and implementation details
138
136
* Learn more about the <<retrievers-overview,retrievers>> abstraction
139
137
* 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}
Copy file name to clipboardExpand all lines: docs/reference/search/retriever.asciidoc
+7-6
Original file line number
Diff line number
Diff line change
@@ -536,13 +536,14 @@ Refer to <<semantic-reranking>> for a high level overview of semantic re-ranking
536
536
537
537
===== Prerequisites
538
538
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}}.
542
543
543
544
You have the following options:
544
545
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 API’s {{es}} service. See <<inference-example-elastic-reranker, this example>> for creating an endpoint using the Elastic Rerank model.
546
547
* Use the <<infer-service-cohere,Cohere Rerank inference endpoint>> with the `rerank` task type.
547
548
* Use the <<infer-service-google-vertex-ai,Google Vertex AI inference endpoint>> with the `rerank` task type.
548
549
* 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.
582
583
This field should contain the text that will be evaluated against the `inferenceText`.
583
584
584
585
`inference_id`::
585
-
(Required, `string`)
586
+
(Optional, `string`)
586
587
+
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.
0 commit comments