Issue with Agents decisions in llama-index==0.11.5.
Hello everyone,
I am currently working on building an agent that can execute queries in a database OR perform RAG through several documents. The agent is functional, but I am struggling with enhancing the decision-making process for choosing whether to query the database or perform RAG with documents. Any advice or suggestions on how to improve this decision-making logic would be greatly appreciated. Thank you!
My db is neo4j and im executing cypher queries in one side. Also my embeddings from text are located in another neo db.
Summary of the code:
# Filter all the FunctionTools from a module
tools = [getattr(module, attr_name) for attr_name in dir(module)
if isinstance(getattr(module, attr_name), FunctionTool)]
query_engine_tool = QueryEngineTool(query_engine=query_engine, metadata=ToolMetadata(
name='get_document_info',
description=(f"Useful for extract information from documents.")))
tools.append(query_engine_tool )
agent_worker = FunctionCallingAgentWorker.from_tools(
tools,
verbose=True,
system_prompt=system_prompt,
)
agent = AgentRunner(agent_worker)
agent.chat(query)