Research
Building verified tool-use training data
Build tool-use training examples around executable tasks, then verify the tool calls and the resulting application state.
By Haolin Chen
Referral 042 has a consultation note available and is waiting for packet preparation. A user asks the agent to attach the note and prepare the packet for review. In this simulated application, a training example has a concrete destination: the correct note attached to the correct referral, with the packet in its review-ready state.
Begin with that executable task. Its initial state, visible information, available tools, and expected outcome give the generator and verifier a shared target. The conversation can then be built around the decisions needed to reach it.
Specialty referral request
Physician's order pending
Generate decisions from a task blueprint
The environment provides tools to retrieve the referral, find supporting documents, attach a document, and update the packet. A successful continuation reads the relevant records, associates the correct note, advances the packet, and reports the confirmed result. These dependencies form a blueprint for generating natural conversations.
The blueprint also identifies where a task can teach a different decision. One version supplies the note’s identifier. Another requires a lookup among similar document titles. A third leaves the requested document unclear and requires the agent to ask the user. Each version retains an outcome that the environment can verify.
Track those variations by behavior. A dataset ledger can record entity resolution, argument construction, dependency ordering, clarification, recovery, and final reporting. Explicit sampling weights give paraphrases and examples that teach new decisions a deliberate place in the training mixture.
Follow one example through verification
The generated conversation travels with its tool calls, observations, and resulting artifact. Reviewing that connected record lets a pipeline check several distinct properties:
- Structural checks validate roles, registered tool names, argument types, and matching call identifiers.
- Execution checks reset the environment, replay the calls, and inspect the resulting packet and attached document.
- Semantic review checks whether the executed result and final message satisfy the user’s request.
records.getExecutedcase_id: "referral-042"Matching order found
packet.attachExecuteddocument: "referral-order.pdf"Document attached to referral-042
Referral 042
Clinical note and signed order
For Referral 042, execution should reach review-ready status with a note belonging to that referral’s patient. Semantic review connects those records to the requested work. A successful update needs the correct target, and the final message needs to describe the packet actually prepared.
Retain environment and tool versions with the replay evidence. When a later check fails, the team can reproduce the starting state, inspect the observations, and identify the call that changed the wrong record. Precise feedback then guides regeneration of the example.
Let the model’s mistakes shape the next batch
After training, inspect failed trajectories for a concrete cause. If the agent repeatedly selects the first matching document, generate cases that require disambiguation. If it reports completion before checking a tool response, build cases where the environment’s confirmation determines the answer.
Keep a few replayable examples for each failure type and compare the next checkpoint on the target behavior and established tasks. Evaluation families remain separate from the generated training pool. The development record connects the observed mistake to a specific data intervention and the resulting model behavior.
As sources expand, preserve the observation-and-action sequence in a common trajectory representation. Source labels and sampling weights keep the mixture inspectable across environments. The reusable asset is the executable task and its verification record, from which the team can generate further examples when another decision needs practice.

Written by
Haolin Chen
Lead AI Researcher
Haolin Chen is Lead AI Researcher at ACTAVA, working on agent learning and interactive evaluation.