-
Notifications
You must be signed in to change notification settings - Fork 480
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 ext object to search response #4959
Conversation
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
@austintlee Could you review this PR for technical accuracy please? |
_api-reference/search.md
Outdated
|
||
## The `ext` object | ||
|
||
Starting with OpenSearch 2.10, plugin authors can add an `ext` object to the search response. The purpose of the `ext` object is to contain plugin-specific response fields. For example, in conversational search, the result of Retrieval Augmented Generation (RAG) is a single "hit" (answer). Plugin authors can include this answer in the search response as part of the `ext` object so it is separate from the search hits. In the following example response, the RAG result is in the `ext.generative_qa.answer` field: |
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.
Can you change 'generative_qa' to 'retrieval_augmented_generation'. Both here and in the sample below.
_api-reference/search.md
Outdated
], | ||
}, // end of hits | ||
"ext": { | ||
"generative_qa": { // a search response processor |
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.
retrieval_augmented_generation
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Done |
@austintlee I've changed both instances. Could you review again please? |
Looks good! |
@austintlee Thanks! Could you approve then? |
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.
@kolchfa-aws Just one added word. Thanks!
Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
* Add ext object to search response Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update search.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _api-reference/search.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
* Add ext object to search response Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update search.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _api-reference/search.md Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
Fixes #4877
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.