Lesson 4 of 9 · 3 min read
Parallel Tool Calls
Models can return several tool calls in one turn. A dispatcher that runs them all concurrently is fast and wrong. Classify each tool as read or write and name the resource it touches; run independent reads in parallel; run writes in order; refuse conflicting writes to the same resource in one turn; give each call its own timeout and failure; and return results paired with their call ids in the order the model issued them.
Get full Premium access · $25
All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.
6 months · One payment · No auto-renewal
Practise it as an interviewer asks it
What is tool calling, and what actually happens when a model 'calls a tool'?What does an agent task cost? Show where the tokens, the seconds and the money go in one run, and what you would cut first.Design the tool definitions an agent sees for an order-management API.An agent task costs too much and takes 90 seconds. How do you cut both systematically?A plan-and-execute agent keeps running an obsolete plan after the world changes. Fix it.Your forty-turn agent is slow and expensive. Where do the seconds and dollars go?