AI-103 Practice Question 46: Parallel Tool Call Handling
Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 5 · question 6 of 10
An application defines get_weather and get_traffic as tools on a chat completions deployment. A user asks: "What's the weather and traffic like in Seattle and in Denver?" The model's response comes back with four entries in the tool_calls array, each with its own id, instead of one call at a time.
What should the application do next?
Show answer and explanation
Answer:
Parallel tool calling lets a model "perform multiple function calls together, allowing for parallel execution and retrieval of results." The correct handling is to iterate through every entry in tool_calls, execute each one, and add one tool-role message per result to the conversation, with each message's tool_call_id matching the id the model assigned to that call, before sending the conversation back for a final response.
- B is wrong because the model asked four questions across two tools and two cities; ignoring three of the four calls leaves the application without the data it needs to answer the user completely. - C is wrong because parallel tool calls are valid, intended behavior for a deployment that supports them; forcing single-call turns discards the latency benefit parallel calling exists to provide, and there's nothing invalid about the response to reject. - D is wrong because correlating each result back to its call depends on returning it as its own message with the matching tool_call_id; this matters most here, since two of the four calls invoke the same function (get_weather for two different cities) and would be indistinguishable without their ids.
Reference: How to use function calling with Microsoft Foundry Models