-
Notifications
You must be signed in to change notification settings - Fork 126
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: Add Cohere ranker #643
feat: Add Cohere ranker #643
Conversation
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.
Very good work. Thanks! 💙
-
I found some small opportunities for improvement (see the comments).
-
for security reasons, the integration tests that require an API key do not run on community PRs. Have you had the chance to try your component locally?
-
I also (moved and) update the corresponding issue (CohereRanker #645) to keep track of all the work needed (by you and us) to declare this feature ready.
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
integrations/cohere/src/haystack_integrations/components/rankers/cohere/ranker.py
Outdated
Show resolved
Hide resolved
Address review comments Co-authored-by: Stefano Fiorucci <[email protected]>
Hi @anakin87! Thank you for your feedback! :) To your second point, yes I've tried the component locally. I ran integration tests by setting the |
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.
Excellent work!
I have tried the component and works as expected.
Related Issues
Proposed Changes:
Add
CohereRanker
for Haystack 2.0.Performs reranking of documents using Cohere reranking models. Reranks retrieved documents based on semantic relevance to a query.
For more information refer to Cohere reranker
How did you test it?
test_cohere.py
cohere_ranker_in_a_pipeline.py