DiversitySampling with Memory for DocumentQA #639
joowon-dm-snu
started this conversation in
2. Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Moved from semantic-kernel
For document QA, when using Memory and filtering solely by relevance_score, you end up with results that are mostly from similar sections of the same document. However, when a comprehensive answer considering the overall content is necessary, utilizing various parts from diverse documents rather than just including sections from a single document in the prompt can be beneficial.
After reading the provided link, I found it to be a good idea and propose integrating it as a feature used in conjunction with Memory.
This post introduces the concepts of DiversityRanker and LostInTheMiddleRanker. The concept of LostInTheMiddleRanker is closely related to the overall structure of prompts, so I didn't include it in this proposal for now, as it might be challenging to integrate solely with Memory.
Implementation code in haystack is here
Beta Was this translation helpful? Give feedback.
All reactions