-
Notifications
You must be signed in to change notification settings - Fork 15.5k
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
Exposes Kendra result item DocumentAttributes in the document metadata #7781
Exposes Kendra result item DocumentAttributes in the document metadata #7781
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
6c45518
to
5738df0
Compare
I will propose more points of refactoring soon in separate PRs/issues. Thank you in advance for your review and all the work moving this forward! |
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.
@wnleao
Thanks for making these updates. I have a minor comment, the code looks good otherwise 🚀 .
@3coins |
- Refactors retriever by providing a ResultItem base class in order to avoid duplicate code; - Exposes the ResultItem DocumentAttributes as document metadata with key 'document_attributes'.
Co-authored-by: Piyush Jain <[email protected]>
9237bd1
to
63c44a0
Compare
Why?
Some use cases depend on specific document attributes returned by the retriever in order to improve the quality of the overall completion and adjust what will be displayed to the user. For the sake of consistency, we need to expose the DocumentAttributes as document metadata so we are sure that we are using the values returned by the kendra request issued by langchain.
I would appreciate your review @3coins @hupe1980 @dev2049. Thank you in advance!
References