-
Notifications
You must be signed in to change notification settings - Fork 127
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 BM25 and Hybrid Search Retrievers to Azure AI Search Integration #1175
Conversation
..._ai_search/src/haystack_integrations/components/retrievers/azure_ai_search/bm25_retriever.py
Show resolved
Hide resolved
Enable kwargs for semantic ranking in retrievers
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.
Can merge this with one more approval.
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.
Looks quite good to me already. I have a couple of very small change requests. Another suggestion for improvement would be to cover the run method with a unit test and mock for example _bm25_retrieval. The test could check that _bm25_retrieval is called with the expected parameters. Similarly for the hybrid retriever.
..._ai_search/src/haystack_integrations/components/retrievers/azure_ai_search/bm25_retriever.py
Outdated
Show resolved
Hide resolved
...i_search/src/haystack_integrations/components/retrievers/azure_ai_search/hybrid_retriever.py
Outdated
Show resolved
Hide resolved
...i_search/src/haystack_integrations/components/retrievers/azure_ai_search/hybrid_retriever.py
Show resolved
Hide resolved
...i_search/src/haystack_integrations/components/retrievers/azure_ai_search/hybrid_retriever.py
Show resolved
Hide resolved
...i_search/src/haystack_integrations/components/retrievers/azure_ai_search/hybrid_retriever.py
Outdated
Show resolved
Hide resolved
..._ai_search/src/haystack_integrations/components/retrievers/azure_ai_search/bm25_retriever.py
Show resolved
Hide resolved
..._ai_search/src/haystack_integrations/components/retrievers/azure_ai_search/bm25_retriever.py
Outdated
Show resolved
Hide resolved
..._ai_search/src/haystack_integrations/components/retrievers/azure_ai_search/bm25_retriever.py
Show resolved
Hide resolved
.../azure_ai_search/src/haystack_integrations/document_stores/azure_ai_search/document_store.py
Show resolved
Hide resolved
…nts/retrievers/azure_ai_search/bm25_retriever.py Co-authored-by: Julian Risch <[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.
Looks good to me! 👍
Edit: I talked to @Amnah199 offline about adding unit tests for the run methods.
Related Issues
Proposed Changes:
This PR includes the following features:
How did you test it?
Notes for the reviewer
Used the existing embedding retriever code as a template and primarily just changed the parameters in the calls to the Azure AI Search Python SDK.
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.