
Trajectory
A trajectory is the complete record of a process: every state, every decision, and every outcome, step by step in the correct order. In AI development, such logs of a process are the raw material from which systems learn how to solve multi-step tasks.
A trajectory is the seamless record of a process from beginning to end. It captures not just the outcome, but every single intermediate step. The word originally comes from physics and refers to the flight path of a ball: position and velocity at every point in time. In the world of computing, it means the same principle, only with decisions instead of meters. A program sees a situation, chooses an action, the situation changes, and this repeats. The entire chain of situations, actions, and feedback is called a trajectory.
Why the path matters more than the destination
For many tasks, what matters is not only whether the right result comes out at the end. It also matters how one got there. Two programs can deliver the same correct answer. One calculated cleanly, the other guessed and happened to hit the mark. Anyone looking only at the final result cannot tell the two apart.
This is exactly why trajectories are so valuable for training modern AI systems. They show at which point an error arose. If a task has twenty steps and step seven was wrong, that can be corrected in a targeted way. Without the recorded process, all that remains is the feedback “wrong overall,” which is barely helpful for improvement.
There is also an economic aspect. Good trajectories are expensive because they often have to be generated or verified by humans. Companies are now buying datasets consisting of such process logs: for example, records of how experienced programmers search for a bug in code. This data is scarcer than plain text from the internet and has therefore become a market of its own.
From the first step to the reward
Technically, a trajectory consists of a sequence of three alternating things. First, the state: everything the system currently sees or knows. Second, the action: what it does in response. Third, the feedback: whether this step accomplished anything. Then the cycle begins again, until the task is completed or aborted.
In so-called reinforcement learning, where a system improves through trial and reward, trajectories are the central material. The system generates many runs for the same task, often hundreds. These are then compared: which runs were successful, which were not? Actions from successful runs are made more likely, actions from unsuccessful ones less likely.
A common misunderstanding: a trajectory is not a program and not a fixed set of instructions. It is a log of a single concrete attempt. Two runs of the same task almost always produce different trajectories, because small random variations change the course. It is precisely this diversity that makes them useful as learning material, since many different paths allow one to infer which one usually works.
Where process logs show up in everyday life
Trajectories are most visible in AI assistants that independently carry out multiple work steps. Such an assistant might, for example, be tasked with fixing a bug in software. It reads files, changes a line, runs a test, sees the result, and changes it again. This entire chain is stored and evaluated later.
The term is also widespread outside of language models. A self-driving car plans a trajectory: the planned path for the next few seconds, including position, speed, and steering angle. A robotic arm in a factory is likewise given a trajectory so that it does not collide with an obstacle. Here the term is closer to its original physical meaning.
In news about AI companies, you will mostly encounter the word in connection with training data. When a company announces that it is collecting “agent trajectories,” it means records of real workflows. This should be distinguished from a simple chat history that contains only questions and answers. A trajectory additionally contains the actions and their effect on the environment.