Skip to content

Investigate a way to handle handle dangerous tools (do not rely on LLM) #9668

@wizhippo

Description

@wizhippo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priority, add to the next sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions