-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Docs: Add weight parameter documentation for Weighted RRF retriever #136698
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
base: main
Are you sure you want to change the base?
Docs: Add weight parameter documentation for Weighted RRF retriever #136698
Conversation
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.
Pull Request Overview
This PR adds documentation for the weight
parameter in the Weighted RRF retriever, which was previously introduced but lacked proper documentation. The changes provide comprehensive examples and parameter descriptions to help users understand how to adjust retriever influence in RRF ranking.
- Added detailed documentation for
retriever
andweight
sub-parameters in the RRF retriever - Added weighted hybrid search example showing different weight configurations
- Updated the main RRF example to demonstrate weighted retrievers with semantic vs lexical search weighting
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md | Added weight parameter documentation, sub-parameters section, and weighted hybrid search example |
docs/reference/elasticsearch/rest-apis/retrievers/retrievers-examples.md | Updated main RRF example to use weighted format with semantic search having higher influence |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md
Outdated
Show resolved
Hide resolved
docs/reference/elasticsearch/rest-apis/retrievers/retrievers-examples.md
Outdated
Show resolved
Hide resolved
Pinging @elastic/search-relevance (Team:Search - Relevance) |
Pinging @elastic/core-docs (Team:Docs) |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
Hey @mridula-s109 remember per the comment, that we can't just overwrite info from a previous version, we need to use applies_to tags to make it clear what changed in 9.2 without deleting any information that's relevant to 9.0 + 9.1 :) |
Ah yes, it slipped my mind. i will update the changes accordingly. |
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 overall, some comments on vocabulary
docs/reference/elasticsearch/rest-apis/retrievers/retrievers-examples.md
Outdated
Show resolved
Hide resolved
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md
Outdated
Show resolved
Hide resolved
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md
Outdated
Show resolved
Hide resolved
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md
Outdated
Show resolved
Hide resolved
…xamples.md Co-authored-by: Kathleen DeRusso <[email protected]>
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.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
docs/reference/elasticsearch/rest-apis/retrievers/rrf-retriever.md
Outdated
Show resolved
Hide resolved
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 work, I think we're almost there!
docs/reference/elasticsearch/rest-apis/retrievers/retrievers-examples.md
Outdated
Show resolved
Hide resolved
"query_string": { | ||
"query": "(information retrieval) OR (artificial intelligence)", | ||
"default_field": "text" | ||
"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.
The old syntax still works when not specifying weights, correct? Should we keep both examples in the docs?
|
||
Applies the specified [boolean query filter](/reference/query-languages/query-dsl/query-dsl-bool-query.md) to all of the specified sub-retrievers, according to each retriever’s specifications. | ||
|
||
Each entry in the `retrievers` array can be specified in two ways: |
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 still seems confusing. I would replace this paragraph with bringing back the earlier example, and have two complete examples, one specifying weights and one not.
4. This retriever has a weight of 1.0 (default weight). | ||
|
||
::::{note} | ||
You can mix weighted and non-weighted formats in the same query. |
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 OK, provided you link to the more explicit examples in the retriever docs that I suggested above.
…xamples.md Co-authored-by: Kathleen DeRusso <[email protected]>
Summary
Adds missing documentation for the
weight
parameter introduced with the Weighted RRF retriever (GA'd in #130658).Closes #136477
Changes
rrf-retriever.md (REST API Reference):
retriever
andweight
fieldsretrievers-examples.md (Examples Guide):
Testing
./gradlew :docs:check
passed (917 tasks completed)Checklist
gradle check
Related