Skip to content
BIASED

Tool use and function calling

Block 1 of 6~2 min

From parsing free text

Chain of thought gave the model room to compute, but no new facts and no actuators. Early LM agents wrote actions as free text (search[Dunmore]) and a regex parsed them. The format is only a convention: wrong casing, quotes, or a missing tool name each cost a step. If one action in 50 is malformed (ε=0.02\varepsilon=0.02), twenty actions fail at least once with probability 1−0.9820≈0.331-0.98^{20}\approx 0.33.

Key idea. Declare every tool as a typed function — name, model-facing description, JSON Schema for arguments. The model emits structured calls; the runtime validates, executes, and returns results (including errors) as messages. Where validity must be guaranteed, constrain decoding.

Answers are saved on the server and tied to this browser until you sign in.