From the course: Claude with Amazon Bedrock by Anthropic

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Batch tool use

Batch tool use

In this video, we're going to take a look at how we can paralyze tool calls by implementing something called a batch tool. Now I first want to begin by reminding you something I told you about earlier on inside this module. Whenever Claude sends us back some tool use parts inside of a message, so essentially tool requests, there can potentially be more than one tool use part inside of one single message. So take this example I have on the right hand side really quickly. If I sent in an initial query of something like, what is March 12th plus 50 days? Also, what is March 12th plus 100 days? Then Claude, in theory, could send us back two separate tool use parts inside of one single message. The first one might try to calculate March 12th plus 50 days, and the second one, March 12th plus 100. These are two operations or two tool calls that are absolutely parallelizable. They can be executed at the same time without any issue whatsoever. Now Claude sometimes will try to do this in…

Contents