Skip to content
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

Added optional bool to disable parallel tool calling in prebuilt react agent #1720

Conversation

akshatjain546
Copy link

Hey folks,

I wanted to way to disable parallel tool calls in the prebuilt react agent so decided to modify this.
Reason: A lot of times the agent calls the same tool in parallel, leading to increased hallucinations and sub-optimal answers. I want the agent to call one tool at a time, think about the answer, and then call the next tool if necessary.
Unfortunately, this is not solved entirely through prompting.

Relevant Discussion: #1461

cc: @vbarda

@vbarda
Copy link
Collaborator

vbarda commented Sep 27, 2024

Hi @akshatjain546 thank you for your contribution -- we have a different PR that solves this (#1647), will be merged shortly! You will be able to control this directly on the model you're passing to create_react_agent. Stay tuned. In the meantime, will close this PR

@vbarda vbarda closed this Sep 27, 2024
@vbarda
Copy link
Collaborator

vbarda commented Sep 30, 2024

This is released as of langgraph==0.2.29

@apthagowda97
Copy link

what about create_tool_calling_agent ?? @vbarda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants