Teaching Models to Work: Data for Agent Post-Training
By Dataline Editorial Team
6 min readSource: Dataline Blog
A simple work request can leave many decisions unstated. Gathering information, preparing a document, or updating a shared record all require an AI agent to work out how to move from an instruction to a useful result.
The agent has to find the right inputs, choose an action, inspect the result, and decide how to continue. New information can change the plan. A tool can fail. An apparently finished result may need another check.
For teams training models, these interactions provide valuable learning material. They capture the conditions the model encountered, the actions it took, and the feedback available at each step.
Data for agent post-training can capture this process through tasks, execution trajectories, interactive environments, and feedback. Each serves a different purpose. Understanding what these assets help a model learn is the starting point for choosing the right data.
What an execution trajectory can teach a model
In a task with multiple steps, the final outcome provides only part of the feedback. A model also needs to learn how to gather information, diagnose problems, use tools, and adjust its approach when an attempt fails.
Training data for tool use can bring together tool descriptions, task instructions, and complete sequences of calls and responses. For browser and computer use, it can pair page states and screenshots with the corresponding actions. This grounds the learning objective in a concrete interaction: given the current observation, what action should come next?
These trajectories can capture information that a final answer alone leaves out: what led the agent to inspect a particular file, which tool response changed its next step, which attempts failed, and how it eventually completed the task.
This makes the data relevant to post-training teams, coding agent developers, and teams building browser and computer-use models. They need experience from which models can learn strategies for taking action.
Trajectories, environments, and evaluations serve different purposes
Three types of assets are particularly important to distinguish.
| Data or asset | How teams use it | Core requirements |
|---|---|---|
| Execution trajectories from completed tasks | Learn demonstrated behavior through supervised fine-tuning and related methods | Clear correspondence between observations, actions, tool responses, and outcomes |
| Executable task environments and scorers | Let models make fresh attempts, collect their own trajectories and feedback, and support reinforcement learning | Reproducible environments, reliable action execution, and scoring that distinguishes outcomes |
| Held-out evaluation tasks | Compare models, agent frameworks, and training versions | Separation from training data, with stable tasks and acceptance criteria |
These distinctions shape what a team needs to build or acquire.
If the goal is to teach a particular pattern of tool use, high-quality demonstrations may be the priority. If the goal is to let a model explore different solution paths, the team needs tasks it can run repeatedly and a mechanism for feedback. To determine whether training improves generalization, it needs separate evaluation tasks.
Task environments and trajectory generation can also be developed separately. For example, a team can run the same terminal tasks with different teacher models or agent frameworks to collect different approaches. It can also let the model being trained attempt the tasks itself and use the scores to improve its policy. The same task pool can therefore support learning from demonstrations, reinforcement learning, and comparisons between frameworks.
Start with the learning objective
Two datasets may both contain extensive code, conversations, or tool messages while serving very different training objectives.
A repository-level code completion task might provide the code before and after a missing section, along with relevant snippets from other files in the repository. The model learns to fill in the missing code using the surrounding project context.
A task involving a long interaction history can use earlier exchanges and tool responses as input, while computing the supervised fine-tuning loss only on the final answer. Here, the objective is to retrieve evidence from the history, track state, and produce an answer. The earlier actions provide context; they are not all training targets.
Assessing fit therefore requires looking at the inputs, which parts receive supervision, where the feedback comes from, and whether the target behavior can be verified. File formats and record counts tell only part of the story.
The hard part is building effective tasks
A work task that can be used repeatedly for training requires engineering and domain judgment.
Repository dependencies must install, and the specified revision must run. The task must provide enough information to solve the problem while keeping the answer hidden. The scorer must accept valid approaches and reject plausible but incorrect ones.
To calibrate a verifier, teams can run a reference solution, a no-op baseline, and representative incorrect approaches, then check whether the scores distinguish them. These checks help identify environment failures and scoring loopholes, making the feedback more representative of the intended capability.
Consider a task that asks an agent to implement a new software requirement. Tests for the new behavior should fail on the original code and pass on the reference implementation. Tests covering existing behavior should continue to pass. These positive and negative controls check both the implementation of the new requirement and the preservation of existing behavior.
Building the data therefore includes reconstructing environments, designing tasks, organizing trajectories, and engineering the evaluation process. Packaging this work into reusable tasks can reduce the need for model teams to rebuild experimental conditions, allowing them to focus more on model behavior. The practical value depends on how well the tasks match the training objective.
Beyond software engineering: science and model development
The same approach applies beyond software engineering.
Scientific computing tasks connect raw data, method selection, code execution, numerical results, and research conclusions. Checks for units, error tolerances, statistical assumptions, and consistency across outputs can extend the definition of success to scientific validity.
Machine learning engineering tasks can require an agent to prepare data, train a model, inspect validation results, and produce a valid submission. The learning objective also includes organizing experiments and using evaluation results to decide what to try next.
These scenarios show how agent training data can capture an entire approach to work: the starting state, the process of exploration, the use of feedback, and the final deliverable.
Choose data around the capability you need
Model and agent teams can describe their data needs in concrete terms. What work should the model learn to do? Where does it currently struggle? Does the team need demonstrations, or tasks the model can attempt for itself? What results would demonstrate improvement?
Dataline Datasets offers a sample request form for data covering agent tasks, reasoning, and model evaluation. Including the target task, current model or agent framework, and intended training and evaluation methods makes it easier to discuss which data would fit.
As models use tools and take on longer tasks, datasets can capture a richer range of experience. Organizing tasks, execution, and feedback gives teams a foundation for turning each attempt into an opportunity to improve model capabilities.