If you want it to always query all three, you could make a custom tool that calls all threee query engines too
from llama_index.tools import FunctionTool
def query(input: str) -> str:
"""Useful for getting information about XX."""
response1 = query_engine1.query(input)
response2 = query_engine2.query(input)
response3 = query_engine3.query(input)
# you will want to format this better lol
return str(reaponse1) + "/n/n" + str(response2) + "\n\n" + str(response3)
# this parses the function schema for name + description/docstring
tool = FunctionTool.from_defaults(fn=query)
You could also use a
SubQuestionQueryEngine
as a
QueryEngineTool
, but this might be slower