LLM Learning Hub

workspace/llm-course/home

Tool Selection

Tool selection is the LLM's decision process of choosing which tool (if any) to call based on the user query and the available tool descriptions, emitting a structured tool-call request.

What is Tool Selection?

Tool selection is the LLM's decision process of choosing which tool (if any) to call based on the user query and the available tool descriptions, emitting a structured tool-call request.

Tool selection is the LLM's decision process of choosing which tool (if any) to call based on the user query and the available tool descriptions, emitting a structured tool-call request.

Where is it used?

GPT-4 Turbo, Claude 3.5, and Llama-3.1 use their instruction-tuning and tool-use training to select tools; the model outputs a tool name and arguments or a normal response.

How to build it

Send `messages` with `tools` to the LLM API, inspect `response.choices[0].message.tool_calls` — if present, the model selected a tool; parse `tool_call.function.name` and `.arguments`.