Improve search/query interface guidance and update for ES|QL reranking#6447
Improve search/query interface guidance and update for ES|QL reranking#6447leemthompo wants to merge 9 commits into
Conversation
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
Vale Linting ResultsSummary: 1 suggestion found 💡 Suggestions (1)
The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
kderusso
left a comment
There was a problem hiding this comment.
Overall looks good, added a few comments, will defer to the Search Relevance team for approval :)
| Both approaches require an inference endpoint configured for the `rerank` task. You have the following options: | ||
|
|
||
| To use semantic re-ranking in {{es}}, you need to: | ||
| 1. Use the Elastic Rerank cross-encoder model through a preconfigured `.rerank-v1-elasticsearch` endpoint or create a custom one using the [{{infer}} API’s {{es}} service]({{es-apis}}operation/operation-inference-put-elasticsearch). |
There was a problem hiding this comment.
I would be inclined to add an option for EIS as the first listed option, and recommend jina v3 reranker.
We might also consider whether using the preconfigured endpoint should be as high on the list of options, considering that jina v2 and v3 are both significantly better than the preconfigured endpoint.
| ### Step 2: Choose an implementation approach | ||
|
|
||
| Refer to [the Elastic NLP model reference](../../../explore-analyze/machine-learning/nlp/ml-nlp-model-ref.md#ml-nlp-model-ref-text-similarity) for a list of third party text similarity models supported by {{es}} for semantic re-ranking. | ||
| You can use either retrievers or {{esql}} to implement semantic re-ranking in your search pipelines. |
There was a problem hiding this comment.
This wording feels a little awkward, as "implement" and "pipeline" imply the need for more than simply sending a search request in the appropriate manner. Maybe something like "you can perform semantic reranking using either retrievers or {{esql}}"?
|
|
||
| #### Use the {{esql}} `RERANK` command | ||
|
|
||
| Use the {{esql}} [`RERANK` command](elasticsearch://reference/query-languages/esql/commands/rerank.md) to add re-ranking as a step in a piped query. This is a good fit when you want to combine re-ranking with other [{{esql}}](elasticsearch://reference/query-languages/esql.md) capabilities like transformations, aggregations, or text generation with `COMPLETION`. |
There was a problem hiding this comment.
Another reason to use ES|QL RERANK would be for multi field support, which is a technical limitation of the retriever reranker.
| {{es}} supports semantic re-ranking through two interfaces: | ||
|
|
||
| * The [`text_similarity_reranker` retriever](ranking/semantic-reranking.md) for composable retrieval pipelines via the `_search` API | ||
| * The [ES|QL `RERANK` command](ranking/semantic-reranking.md) for piped search workflows via the `_query` API |
There was a problem hiding this comment.
Is workflows an overloaded term here, considering Workflows is a product offered in Kibana?
Contributes to https://github.com/elastic/docs-content-internal/issues/1190
Summary
The search query docs needed updates and didn't help readers choose between Query DSL, Retrievers, and ES|QL. The semantic reranking page only documented the retriever path, missing ES|QL RERANK entirely. Several newer capabilities (diversify retriever, MMR command, EMBEDDING function, vector similarity functions) were absent.
Test plan