Find answers from the community

Updated 8 months ago

how can i pass a filter in a

how can i pass a filter in a RouterQueryEngine ? any example pls
L
l
6 comments
You can pass the filters to the underlying query engine tools

index.as_query_engine(filters=filters)
THx @Logan M , sorry but how can i pass the filter to the vectorAgent at runtime ? Attached screenshot, as how i have initialized my RouterQueryEngine
Attachments
Screenshot_2024-04-05_at_2.07.23_PM.png
Screenshot_2024-04-05_at_2.06.13_PM.png
what is index.get_query_engine() doing? Thats probably where the filters should go
it return the already created query_engine from the vector index which i construct at start of the project. Question: should i reconstruct the RouterQueryEngine for every prompt with the new filter values ? if yes is that a good thing ?
Constructing the query engine is basically a no-op, so I don't see an issue with doing that πŸ‘€
alrightyy, then I'm all set thx @Logan M .
Add a reply
Sign up and join the conversation on Discord