Skip to content

Commit 6ee8747

Browse files
authored
[DOCS] Additional reranking docs updates (#111350) (#111404)
* Simplify overview, specify available rerank options * Update links * Clarify eland-uploaded models is for hugging face
1 parent 72cfb0b commit 6ee8747

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

docs/reference/search/retriever.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ GET /index/_search
209209

210210
The `text_similarity_reranker` is a type of retriever that enhances search results by re-ranking documents based on semantic similarity to a specified inference text, using a machine learning model.
211211

212+
[TIP]
213+
====
214+
Refer to <<semantic-reranking>> for a high level overview of semantic reranking.
215+
====
216+
212217
===== Prerequisites
213218

214219
To use `text_similarity_reranker` you must first set up a `rerank` task using the <<put-inference-api, Create {infer} API>>.

docs/reference/search/search-your-data/retrievers-reranking/semantic-reranking.asciidoc

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ preview::[]
55

66
[TIP]
77
====
8-
This overview focuses more on the high-level concepts and use cases for semantic reranking. For full implementation details on how to set up and use semantic reranking in {es}, see the <<retriever,reference documentation>> in the Search API docs.
8+
This overview focuses more on the high-level concepts and use cases for semantic reranking. For full implementation details on how to set up and use semantic reranking in {es}, see the <<text-similarity-reranker-retriever,reference documentation>> in the Search API docs.
99
====
1010

1111
Rerankers improve the relevance of results from earlier-stage retrieval mechanisms.
@@ -89,11 +89,16 @@ In {es}, semantic rerankers are implemented using the {es} <<inference-apis,Infe
8989

9090
To use semantic reranking in {es}, you need to:
9191

92-
. Choose a reranking model. In addition to cross-encoder models running on {es} inference nodes, we also expose external models and services via the Inference API to semantic rerankers.
93-
** This includes cross-encoder models running in https://huggingface.co/inference-endpoints[HuggingFace Inference Endpoints] and the https://cohere.com/rerank[Cohere Rerank API].
94-
. Create a `rerank` task using the <<put-inference-api,{es} Inference API>>.
92+
. *Choose a reranking model*.
93+
Currently you can:
94+
95+
** Integrate directly with the <<infer-service-cohere,Cohere Rerank inference endpoint>> using the `rerank` task type
96+
** Integrate directly with the <<infer-service-google-vertex-ai,Google Vertex AI inference endpoint>> using the `rerank` task type
97+
** Upload a model to {es} from Hugging Face with {eland-docs}/machine-learning.html#ml-nlp-pytorch[Eland]
98+
*** Then set up an <<inference-example-eland,{es} service inference endpoint>> with the `rerank` task type
99+
. *Create a `rerank` task using the <<put-inference-api,{es} Inference API>>*.
95100
The Inference API creates an inference endpoint and configures your chosen machine learning model to perform the reranking task.
96-
. Define a `text_similarity_reranker` retriever in your search request.
101+
. *Define a `text_similarity_reranker` retriever in your search request*.
97102
The retriever syntax makes it simple to configure both the retrieval and reranking of search results in a single API call.
98103

99104
.*Example search request* with semantic reranker
@@ -127,20 +132,6 @@ POST _search
127132
// TEST[skip:TBD]
128133
==============
129134

130-
[discrete]
131-
[[semantic-reranking-types]]
132-
==== Supported reranking types
133-
134-
The following `text_similarity_reranker` model configuration options are available.
135-
136-
*Text similarity with cross-encoder*
137-
138-
This solution uses a hosted or 3rd party inference service which relies on a cross-encoder model.
139-
The model receives the text fields from the _top-K_ documents, as well as the search query, and calculates scores directly, which are then used to rerank the documents.
140-
141-
Used with the Cohere inference service rolled out in 8.13, turn on semantic reranking that works out of the box.
142-
Check out our https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/integrations/cohere/cohere-elasticsearch.ipynb[Python notebook] for using Cohere with {es}.
143-
144135
[discrete]
145136
[[semantic-reranking-learn-more]]
146137
==== Learn more

0 commit comments

Comments
 (0)