Skip to content

Trajectory

Spicy — senior dev territoryAI & ML

ELI5 - The Vibe Check

A trajectory is the full replay of everything an agent did to get from your prompt to its final result, not just the destination but the whole road trip: every thought, every tool call, every wrong turn it corrected along the way. Two agents can land on the exact same answer with wildly different, and wildly differently trustworthy, trajectories.

Real Talk

A trajectory is the ordered sequence of an agent's states, thoughts, actions, and observations across a single task run, used as the unit of analysis in agent evals and reinforcement learning. Comparing trajectories rather than just final outputs is how you diagnose whether an agent reached the right answer through sound reasoning or got there by accident.

Show Me The Code

[
  {"step": 1, "thought": "Need to find the failing test", "action": "run_tests", "observation": "3 tests failed in auth.spec.ts"},
  {"step": 2, "thought": "Check the auth module for the bug", "action": "read_file", "observation": "missing null check on line 42"},
  {"step": 3, "thought": "Apply the fix", "action": "edit_file", "observation": "patch applied, re-running tests"}
]

When You'll Hear This

"Look at the trajectory, not just the final diff, that's where the bad assumption is." / "Two agents got the same answer with completely different trajectories."

Made with passive-aggressive love by manoga.digital. Powered by Claude.