Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions explore-analyze/machine-learning/nlp/ml-nlp-rerank.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ Refer to this [Python notebook](https://github.com/elastic/elasticsearch-labs/bl

::::

::::{note}
The relevance scores produced during reranking depend on the text similarity model used and can include negative values.
::::

### Create an inference endpoint [ml-nlp-rerank-deploy-steps]

1. In {{kib}}, navigate to the **Dev Console**.
Expand Down
11 changes: 7 additions & 4 deletions solutions/search/ranking/semantic-reranking.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ To use semantic re-ranking in {{es}}, you need to:
2. **Create a `rerank` endpoint using the [{{es}} Inference API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put)**. The Inference API creates an inference endpoint and configures your chosen machine learning model to perform the re-ranking task.
3. **Define a `text_similarity_reranker` retriever in your search request**. The retriever syntax makes it simple to configure both the retrieval and re-ranking of search results in a single API call.

::::{dropdown} Example search request with semantic reranker
:::::{dropdown} Example search request with semantic reranker
The following example shows a search request that uses a semantic reranker to reorder the top-k documents based on their semantic similarity to the query.

::::{note}
The relevance scores produced during reranking depend on the text similarity model used and can include negative values.
::::

```console
POST _search
{
Expand All @@ -122,14 +126,13 @@ POST _search
"field": "text",
"inference_id": "elastic-rerank",
"inference_text": "How often does the moon hide the sun?",
"rank_window_size": 100,
"min_score": 0.5
"rank_window_size": 100
}
}
}
```

::::
:::::



Expand Down
Loading