New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skipping USER when using a tool #456
Comments
Indeed, there's a SEND_TO routing you can add as prefix to the string returned by the tool handler method, see example here: We haven't gotten around to documenting this yet. |
Incidentally, we don't want to enforce that after |
@pchalasani thanks for the response! Will give it a go. I'm new to the field, maybe we are thinking about different use cases. I am interested in RAG, where I don't want user to see/act upon the response from a tool/function. As far as user is concerned, tool is just a part of the agent not a separate entity. I want LLM to transform the response and tailor it to the original user prompt. Huge amount of text, in this case, should be handled by the tool/function itself. For example, limit the result of the sql query to a manageable size. Don't get me wrong, I think |
I only listed on possible reason (i.e. result size) why we'd want the user to have a chance to "intervene" before an LLM sees a tool result. As you said this scenario can be handled by putting the burden on the tool handler method to cut the result size (which still may not be perfect, since the handler method would potentially need to do some parsing etc). Another reason for user intervention could be that the tool result may contain sensitive info, and the user gets a chance to check and override. So we made a design choice here: instead of creating a special rule ("send all tool results directly to LLM") and have possible undesirable scenarios where results shouldn't be seen by the LLM, we rather put the onus on the developer who is writing the tool handler, to add a Another way is to have two separate agents. |
This could be one way, e.g. via a config flag. We're thinking about this or other good ways to let the developer control message flow in various states. |
Forgot to mention one other thing. When you set up a task with
If you really want a scenario where it takes your first question, and then subsequently becomes non-interactive, then you can either use SEND_TO or a multi-agent set up as mentioned above.
|
Is your feature request related to a problem? Please describe.
When I use tools, the sequence of messages goes:
Describe the solution you'd like
I think the right (at least for my use) sequence should be:
So USER should not be added to the list of responders in
Task.step()
if pending message is a response from the AGENT.Describe alternatives you've considered
I know I can skip human prompt. Is there another way? Maybe there is a way to tag a tool such that it adds "LLM" as a recipient?
Additional context
The text was updated successfully, but these errors were encountered: