-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: adding Maximum Margin Relevance Ranker #8554
Conversation
Pull Request Test Coverage Report for Build 11974762094Details
💛 - Coveralls |
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 addition!
I had a first look and left some comments.
Let's also add some unit tests.
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[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.
I will let @shadeMe take a final look, but LGTM
test/components/rankers/test_sentence_transformers_diversity.py
Outdated
Show resolved
Hide resolved
Merge main to remove linting failures. |
Related Issues
Proposed Changes:
I've added a new strategy to rank the documents based on diversity. The function implements the Maximum Marginal Relevance (MMR) scoring and uses it for ranking the documents based on similarity with the query and diversity from the already selected documents (see: PDF)
Added to new init parameters, to decide which diversity strategy is used, and another one to set the threshold between similarity with the query and document diversity.
Extracted some common code from both strategies into a new private function.
How did you test it?
Notes for the reviewer
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.