Find answers from the community

Updated 3 months ago

Why filters are ignored when querying document summary index

Why is it not possible to apply filters to DocumentSummaryIndex?

I want to query things related to a specific document doing
doc_summary_retriever = doc_summary_index.as_retriever(filters=filters) but the retriever ignores my filters... I saw that the retrievers for this do not pass the kwargs to the suoer().init function
This for example is how the DocumentSummaryIndexLLMRetriever looks like
Plain Text
        super().__init__(
            callback_manager=callback_manager or Settings.callback_manager,
            object_map=object_map,
            verbose=verbose,
        )
L
1 comment
Seems like a missing feature. IMO I feel like it would only work for the summary embedding retriever

Feel free to make a PR though -- imo, you probably don't need the document summary index, and could replicate the same flow using workflows (https://docs.llamaindex.ai/en/stable/module_guides/workflow/#workflows) so that you can manage stuff however you want
Add a reply
Sign up and join the conversation on Discord