Trajectory
Trajectory rates how closely an agent's step sequence follows the expected trajectory, as a single 0–3 level. It mirrors UiPath's LLMJudgeTrajectoryEvaluator; for one probability per step use trajectory_steps.
What the evaluator does
Jev compares `trajectory` with `expected_trajectory` for the task and rates adherence in steps and order.
Compare the agent's steps in `trajectory` with `expected_trajectory`. Rate adherence in steps and order.
The question, verbatim
This is the question the API sends for the example below, generated from the same code path the playground and API use. Jev sees the request fields as state and returns a probability for each outcome. Nothing is generated, so there is nothing to parse.
Compare the agent's steps in `trajectory` with the reference steps in `expected_trajectory` for the task in `input`. Rate adherence in steps and order.
- 0The agent's trajectory bears no resemblance to the expected trajectory
- 1Some expected steps appear but order or key steps are wrong
- 2Most expected steps appear in a sensible order with minor deviations
- 3The trajectory matches the expected steps and order
Reach for it when
- One number per run for a trajectory dashboard.
- Legacy compatibility with a single trajectory score.
Not the right tool when
- You need to know which step was skipped (use trajectory_steps).
Watch out for
- Paraphrased steps are fine; the rubric allows different wording. Extra steps are penalised only if they break the order or intent.
What to send
score 0–1 (expected level ÷ top level), label “x.x / n”, confidence, a probability per level, passed at 75% of the scale.
{
"evaluators": [
"trajectory"
],
"output": "…",
"trajectory": [
"search flights",
"pick cheapest direct",
"book flight",
"send confirmation email"
],
"expected_trajectory": [
"search flights",
"select cheapest direct option",
"book",
"email confirmation"
]
}Level 3: matches in steps and order.
Aggregate with
One result per item is a fact; a dataset of them is a metric. These are the aggregations that fit this evaluator's output shape.
- Trajectory vs trajectory_steps?
- Trajectory is one graded level for the whole run. trajectory_steps asks one question per expected step and returns a probability for each, plus an order check.