OpenAI's hosted FT for tool-calling models: what does a JSONL row need beyond text SFT?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A team is moving from text-only SFT to OpenAI's hosted fine-tuning API for a tool-calling model (e.g. gpt-5.5-class). They have working multi-turn JSONL but the API rejects half their rows once they add tool calls. Specify the extra fields a tool-aware row needs, both on the assistant turn that issues the call and on the tool response that follows, and explain which field links them. What breaks if the linkage is wrong or missing?
The assistant turn carries a tool_calls array with unique id, type, name, and JSON-string arguments. The next turn uses role tool with a matching tool_call_id, the linkage that survives parallel calls.
Picture a busy kitchen where the head chef shouts orders to the prep station. Every order gets its own ticket number stuck to it: order forty-one, two onions diced; order forty-two, one carrot grated. When the prep returns, they staple the chopped food to a matching ticket so the head chef knows what came back from where. If you forget the ticket, or two tickets share a number, the chef ends up putting onions where carrots should go. The hosted fine-tuning API works the same way. Each tool call carries its own ticket, the response carries the same ticket back, and the system uses tickets to keep everything paired even when several orders fly at once.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: assistant turn shape with tool_calls array + the three required keys per call + arguments as a JSON string + tool role and matching tool_call_id + why parallel calls need unique ids + hard versus soft failure modes.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Passing arguments as a nested JSON object instead of a JSON string. The OpenAI spec is strict here, arguments must be a string, and rows that nest the object are rejected at upload time.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.