Find answers from the community

Updated 3 months ago

I am using RouterQueryEngine

I am using RouterQueryEngine
query_engine = RouterQueryEngine(
selector=PydanticSingleSelector.from_defaults(),
query_engine_tools=[
sql_tool1,
sql_tool2,
vector_tool,
]
)

the selector works and but there is always followup question which triger LLM returns new answer. Is there way to skip trigger the extra question
working selector:
"""
Thought: Do I need to use a tool? Yes
Action: Query Engine Tool
Action Input: How to configure Qualys Connector in AWS?
"""
Extra question to LLM:
"""
Do I need to use a tool? No
AI: Is there anything else I can help you with?
"""
L
c
3 comments
Are you usng the router query engine in an agent? Those logs look like langchain stuff
Not sure what the extra question means or comes from lol
@Logan M I am using chatengine. Since query engine seems not support conversation. Not see the extra question if switch to just query engine.

memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
# create_llama_chat_agent()
chat_engine = ReActChatEngine.from_query_engine(
query_engine=query_engine(),
memory=memory,
verbose=True)
return chat_engine
Add a reply
Sign up and join the conversation on Discord