feat: add support for multi filter retriever#11028
feat: add support for multi filter retriever#11028bogdankostic merged 14 commits intodeepset-ai:mainfrom
Conversation
|
@srini047 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
bogdankostic
left a comment
There was a problem hiding this comment.
Hi @srini047, thank you very much for the PR! I left a few comments on how we can simplify the MultiFilterRetriever.
releasenotes/notes/feat-multi-filter-retriever-266283c61e693da3.yaml
Outdated
Show resolved
Hide resolved
|
Thanks for addressing the requested changes @srini047! Looking at the current implementation, since |
@bogdankostic If we look at the issue that was the ask to take filters as input: WDYT? |
|
Sorry @srini047, I think I was not communicating precisely enough. What I'm suggesting does not affect the run method, it should still take a list of filters as input. I'm only suggesting to change the Here's a skeleton to illustrate what I mean: @component
class MultiFilterRetriever:
def __init__(self, document_store: DocumentStore, max_workers: int = 3) -> None:
self.document_store = document_store
self.max_workers = max_workers
self._retriever = FilterRetriever(document_store=document_store)
@component.output_types(documents=list[Document])
def run(self, filters: list[dict[str, Any]]) -> dict[str, list[Document]]:
...This way users don't need to create a |
@bogdankostic Thanks for the clarification yes I get the crux and modified the code accordingly. This makes more sense now. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bogdankostic
left a comment
There was a problem hiding this comment.
Thank you @srini047 :)
Related Issues
MultiFilterRetriever#10995Proposed Changes:
Add support for
MultiFilterRetriever, a new retriever component that executes multiple filter queries against a document store in parallel and returns a single, de-duplicated list of documents sorted by relevance score.How did you test it?
Added unit tests around the new filter and ensured older doesn't break.
Notes for the reviewer
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.