cd /news/ai-agents/how-do-you-build-agent-trajectory-da… · home › topics › ai-agents › article
[ARTICLE · art-176042] src=discuss.huggingface.co ↗ pub= topic=ai-agents verified=true sentiment=· neutral

How do you build agent trajectory datasets for post-training?

Building agent trajectory datasets for post-training should preserve failed attempts and dead ends as negative examples, since datasets of only "golden paths" produce brittle agents that cannot recover from errors, according to guidance recommending the OpenAI messages format as a baseline. The recommended structure extends the assistant message with a `tool_calls` list and adds a `tool_outputs` list to a subsequent `tool` role message, while tracking the original `task_description`, the full `tool_definitions`, and a final `outcome` status such as `success` or `failure`. The guidance cites the ToolBench dataset and its "ToolLLM" paper as a comprehensive reference for instruction generation, solver-model response generation and evaluation, and names the GAIA benchmark as an example of complex multi-step tasks requiring robust trajectories for training and evaluation.

recommendation

Retain failed trajectories and dead ends as negative examples when building SFT or preference-tuning data, and use model-generated trajectories with human review rather than purely human-authored data to scale.

more in playbook: Fine-tuning and data
read1 min views2 publishedNov 25, 2026

The OpenAI messages format is a solid baseline. It’s common to extend it by adding a tool_calls list to the assistant message and a tool_outputs list to a subsequent tool role message. For metadata, track the original task_description, the full tool_definitions available, and a final outcome status (e.g., success, failure). This structure is flexible and maps well to most inference APIs.

Definitely keep failed attempts and dead ends; they are your most valuable negative examples. A dataset of only “golden paths” produces brittle agents that can’t recover from errors. For generation, model-generated trajectories with human review and correction is the most scalable approach. Purely human-authored data is too slow and expensive for large-scale SFT or preference tuning.

The ToolBench dataset and its accompanying paper (“ToolLLM”) are a comprehensive reference. They detail a full pipeline for instruction generation, response generation with a solver model, and evaluation. The GAIA benchmark is another good example of complex, multi-step tasks requiring robust trajectories for both training and evaluation.

── more in #ai-agents 4 stories · sorted by recency
── more on @openai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-do-you-build-age…] indexed:0 read:1min 2026-11-25 · —