awesome-everything RU
↑ Back to the climb

AI / LLM Integration

Tool calls: multiple-choice review

Crux Multiple-choice synthesis across the tool-calls unit — the round-trip loop, schema validation as a trust boundary, the iteration guard, parallel calls, and tool_choice.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. None is a definition to recite — each mirrors a decision you make wiring a real agent loop against real, sometimes-mutating tools.

Goal

Confirm you can connect the round-trip contract, the validation trust boundary, the runaway guard, parallelism, and tool_choice — the synthesis the lesson built toward.

Quiz

A user task needs four tool calls, all at distinct steps. Roughly how many model invocations does the loop make, and why does it matter for cost?

Quiz

The model returns a tool_use for cancel_order with id 'ord_9f3c', an id that never appeared in the conversation. What is the senior move?

Quiz

An agent in production occasionally racks up huge bills on single turns. Logs show it calling lookup_order, getting an error, and calling it again with identical arguments — over and over. What is the root cause and the fix?

Quiz

You have two chains. Chain A: get_weather(NYC) and get_weather(SF). Chain B: find_user(email) then cancel_user_order(userId). Which can the model parallelize, and why?

Quiz

You are building a classifier that must always return one of a fixed set of categories as structured JSON — prose is never an acceptable answer. Which tool_choice setting fits, and why not the others?

Quiz

A 10-tool agent runs a 6-step task and the latency and cost are far higher than expected even though each tool is fast. What is the dominant overhead, and the standard mitigation?

Recap

The through-line is one contract: the model only requests a tool, your code executes it, and the loop re-invokes the model after every result — so cost compounds, schemas are re-sent each round (cache them), and an unguarded loop runs away. Validation is a trust boundary: schema-validate, then authorize and existence-check, then execute, returning errors as tool_result so the model self-corrects. Parallelism only helps independent calls; tool_choice (auto/any/tool/none) controls whether and which tool fires.

Continue the climb ↑Tool calls: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources2
expand
  1. 01
  2. 02

Trademarks belong to their respective owners. Editorial reference only.