Closed austintlee closed 1 year ago
@msfroh Tagging you to get feedback on this change. Is this generally in the right direction? Thanks in advance.
Can we assign this one to me and remove the 'untriaged' label?
@austintlee can you please add a sample response on where this new key will be added in Search Response.
https://github.com/opensearch-project/OpenSearch/pull/9379#discussion_r1297694637
Note that I fixed the indenting issue in the sample. @navneet1v
@austintlee lets add the sample here too. So that we understand what is scope of this issue.
@austintlee lets add the sample here too. So that we understand what is scope of this issue.
Sample added to the description above. Thanks!
PRs merged into main
and 2.x
, thanks for the contribution @austintlee! 🎉
Is your feature request related to a problem? Please describe. In conversational search where the result of Retrieval Augmented Generation (RAG) is a single "hit" (answer), I would like a way to include this answer in the search response separately from the search hits.
Describe the solution you'd like As RAG is accomplished via a search pipeline, I would like a solution that makes it easy for users to match a part of the response with the search pipeline that generated the part. SearchRequest already provides this through SearchExtBuilders. Adding support for SearchExtBuilders to SearchResponse will probably solve a number of use cases.
Describe alternatives you've considered For conversational search specifically, a generated answer could be returned as an additional search hit, but this feels hacky and won't generalize to solve other, similar problems that require something in the search response that does not alter SearchHits.
Additional context
6794 also proposes a way to include extra information in SearchResponse.
Sample