The community member is using the QueryFusionTransformer and the QueryFusionRetriever, and has questions about injecting their own query into the generated queries list, how filtering works with multiple indexes, and how to do filtering using this retriever. The comments suggest that injecting a custom query may not be possible directly, but the community member could create the queries themselves and add them to the list. For filtering, the comments indicate that the community member is not sure how it works with multiple indexes. One community member suggests subclassing the retriever and updating a specific method to add extra queries, but does not have much idea about the filtering.
Hi, I am using the QueryFusionTransformer - retriever = QueryFusionRetriever( [index_1.as_retriever(), index_2.as_retriever()], similarity_top_k=5, num_queries=4, # set this to 1 to disable query generation use_async=True, verbose=True, # query_gen_prompt="...", # we could override the query generation prompt here ) Can we inject our own query into the generated queries list and then proceed ahead for the retrieval? Also, while doing filtering, will it be passed through both indexes? More importantly how to do filtering using this retriever.
I dont think you can inject your own query directly. Maybe create the queries at your side and add your queries and then pass it to the next intended operation.
Hi, getting this error - ImportError: cannot import name 'BaseNodePostprocessor' from 'llama_index.core.postprocessor' (/usr/local/lib/python3.10/dist-packages/llama_index/core/postprocessor/init.py)