-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
I am trying to sort out the best way to handle dangerous tools and was thinking of agent that is aware of tools decorated with "@requires_confirmation_tool" and will not run them without confirmation gist example
The current agent has exit_conditions, but this exits too late, the tool is already called and there is no built in way to intercept before the tool is called by the LLM.
Perhaps this may fit in the toolinvoker, and the invoker could guard tools with a dangerous attribute and require some sort of intervention external to the LLM to allow invocation...
I have experimented with a standard tool that has a "comfirmed" parameter but I don't trust the LLM enough to not be creative and just set it regardless if the context indicates otherwise.
This is kind of like human in the loop but maybe not? Not sure if the definition of human in the loop dictates that the LLM is not responsible for invoking the tool.
I would love some discussion on how others have handled this and perhaps a solution could be added to haystack natively