-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add documentation for query rules retriever #115696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for query rules retriever #115696
Conversation
Documentation preview: |
@elasticmachine update branch |
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/search-relevance (Team:Search - Relevance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, a few nits from me, many of which edit preexisting text.
[WARNING] | ||
==== | ||
The `rule` retriever will apply rules to any documents returned from its defined `retriever` or any of its sub-retrievers. | ||
This means that for the best results, the `rule` retriever should be the outermost defined retriever. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could hammer this home with an annotation on the example?
results of a nested retriever to its parent. In this scenario, we'll make use of all 4 (currently) available retrievers, i.e. `standard`, `knn`, `text_similarity_reranker` and `rrf`. | ||
The following example demonstrates the powerful queries that we can now compose, and how retrievers simplify this process. | ||
We can use any combination of retrievers we want, propagating the results of a nested retriever to its parent. | ||
In this scenario, we'll make use of all 4 (currently) available retrievers, i.e. `standard`, `knn`, `text_similarity_reranker` and `rrf`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to update this too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. I think no for now - the reasoning being that rules are a niche use case, and as we have plans to add more retrievers it will soon become unwieldy to have one monster example. Instead, I'll reword to say that we're using some retrievers and that others are available.
Co-authored-by: Liam Thompson <[email protected]>
@elasticmachine run docs-build |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I left a few minor comments.
docs/reference/search/search-your-data/search-using-query-rules.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/search/search-your-data/search-using-query-rules.asciidoc
Outdated
Show resolved
Hide resolved
Co-authored-by: Mike Pellegrini <[email protected]>
Co-authored-by: Mike Pellegrini <[email protected]>
Co-authored-by: Mike Pellegrini <[email protected]>
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs-build-pr
build is failing because of an id collision.
INFO:build_docs:asciidoctor: WARNING: redirects.asciidoc: line 1610: id assigned to section already in use: _parameters_8
Smells like an edge case! 👃
You haven't explicitly set this in any of the files you changed. However, you did add a ==== Parameters
headings without explicit ids and I'm wondering if there isn't some dynamic auto-generation going on behind the scenes that's causing the collision.
I've made a couple of suggestion to add explicit ids to these to see if that changes anything...
* Upload a model to {es} with {eland-docs}/machine-learning.html#ml-nlp-pytorch[Eland] using the `text_similarity` NLP task type. | ||
** Then set up an <<inference-example-eland,{es} service inference endpoint>> with the `rerank` task type | ||
** Refer to the <<text-similarity-reranker-retriever-example-eland,example>> on this page for a step-by-step guide. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[discrete] | |
[[text-similarity-reranker-retriever-parameters]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the other suggestion is the important one, so committed that first to see 👁️
The build is fixed 🎉 , but there are some formatting issues (misaligned subheadings) in the preview that need to be fixed :) |
@leemthompo I think I've fixed the formatting issues, would love one more 👀 before merging. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thank you! 🚀
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* Add initial query rules retriever docs * Add docs tests * Apply suggestions from code review Co-authored-by: Liam Thompson <[email protected]> * PR feedback * Make query rules guide retriever-first * Add warning to DSL doc * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Apply suggestions from code review Co-authored-by: Mike Pellegrini <[email protected]> * Give parameters subheading an explicit id * Fix formatting --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Liam Thompson <[email protected]> Co-authored-by: Mike Pellegrini <[email protected]> (cherry picked from commit 14a7b8f)
* Add initial query rules retriever docs * Add docs tests * Apply suggestions from code review Co-authored-by: Liam Thompson <[email protected]> * PR feedback * Make query rules guide retriever-first * Add warning to DSL doc * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Apply suggestions from code review Co-authored-by: Mike Pellegrini <[email protected]> * Give parameters subheading an explicit id * Fix formatting --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Liam Thompson <[email protected]> Co-authored-by: Mike Pellegrini <[email protected]>
* Add initial query rules retriever docs * Add docs tests * Apply suggestions from code review Co-authored-by: Liam Thompson <[email protected]> * PR feedback * Make query rules guide retriever-first * Add warning to DSL doc * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Update docs/reference/search/retriever.asciidoc Co-authored-by: Mike Pellegrini <[email protected]> * Apply suggestions from code review Co-authored-by: Mike Pellegrini <[email protected]> * Give parameters subheading an explicit id * Fix formatting --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Liam Thompson <[email protected]> Co-authored-by: Mike Pellegrini <[email protected]>
Adds documentation for the query rules retriever introduced in #114855