Tool Calling· Lesson 4 of 7
Tool Choice & Selection
In one line · The model decides on its own which tool (if any) to use, and you can steer it: let it choose freely, force a specific tool, or block tools entirely.
The more tools you add, the more the model gets confused and picks wrong. Controlling selection separates a precise assistant from one that fires off pointless tool calls.
Like a conductor facing many instruments: sometimes you let him pick, sometimes you say 'use only the violin'. And sometimes you want him to answer in words without touching any instrument.
Like a good doctor: sometimes you let him decide whether to prescribe, sometimes you say 'just use the stethoscope', and sometimes you want him to reassure the patient with words without reaching for any instrument.
In a data-extraction form, you force the model to the extract_fields tool every time so it always returns structured JSON — instead of chatting when it should act.
Most APIs give you a tool_choice parameter with roughly four modes: auto (default — the model decides between a tool and a text reply), any/required (it must use a tool, its pick which), a specific tool (use exactly this one), and none (tools forbidden — text only). The selection itself is probabilistic: the model weighs each tool's description against the question's context, so good descriptions and a short tool list are what raise selection accuracy.
🧪 Try it yourself: your bot has 3 tools (search_products, create_order, get_order_status) and the requirement says 'every message must become a system operation, no chatty replies'. Pick the right tool_choice value, then write one user message where this setting backfires (hint: 'thanks, you're great!') — and propose the fix.
Top mistakes: (1) throwing 50 tools at the model at once and wondering why it picks wrong — trim the list or stage it. (2) Forcing a tool on a question that needs a text answer, so it stuffs in meaningless inputs to comply. (3) Two tools with overlapping descriptions, so it falls between them. (4) Forgetting that auto means it may use no tool at all — if the operation is mandatory, force it.
Force a specific tool when the output must always be structured (JSON extraction). Use any when a text reply is unacceptable. Use none when you want the model's reasoning with no actions.
Don't force a tool in open-ended conversation — many questions are naturally answered in words, and forcing will produce contrived calls with invented inputs.