How to force my agent to use a certain tool?
I have a web searcher tool:
tools.append(Tool(
name="Search",
func=search.run,
description="Always use this tool first!",
return_direct=True
))
agent_chain = initialize_agent(tools, llm, agent="conversational-react-description", memory=memory,
verbose=True, return_intermediate_steps=True)
But when I ask: "When was gpt-4 released?"
I see in logs that the agent is not using the tool:
Thought: Do I need to use a tool? No
AI: As of now, there is no official release date for GPT-4. OpenAI has not announced any plans to release it yet. However, they have been working on improving GPT-3 and releasing new versions of it.