SubQuestionQueryEngine
and I’m stumped as to why. Does OpenAIAgent.from_tools
transform the user’s input query_str
?List all of the insurance providers covering medical costs for the patient, including entities providing Letters of Protection (LOP)
insurance providers
SubQuestionQueryEngine
, so it generates an incomplete question: What insurance providers does {patient} have?
top_level_sub_tools = [ QueryEngineTool( query_engine=tool_set["tool_subq"], metadata=ToolMetadata(name=tool_set["index_id"], description=tool_set["description"]), ) for tool_set in vector_query_engine_tools ] chat_llm = OpenAI( temperature=0.1, model=OPENAI_CHAT_LLM_NAME, streaming=True, api_key=OPENAI_API_KEY, ) curr_date = datetime.utcnow().strftime("%Y-%m-%d") chat_engine = OpenAIAgent.from_tools( tools=top_level_sub_tools, llm=chat_llm, verbose=True, system_prompt=SYSTEM_MESSAGE.format(curr_date=curr_date), max_function_calls=3, )
top_level_sub_tools = [ QueryEngineTool( query_engine=tool_set["tool_subq"], metadata=ToolMetadata(name=tool_set["index_id"], description=tool_set["description"]), ) for tool_set in vector_query_engine_tools ]
question_gen
which is used here: (file)Hello! How are you?
and keeps track of chat history