Evals, Trajectory Drift, Tracing & Safe Rollouts
Shipping an agent is only day one. Modern evals measure multi-step trajectory drift and tool failure modes—not just single-turn answers—backed by self-verification critics, versioned canary prompts, and OpenTelemetry traces.
An agent can produce a polite final sentence while secretly wasting 6 redundant tool calls or drifting off policy mid-run. Tracing full trajectories, grading tool precision on golden suites, and rolling out versioned prompts via canaries keeps quality measurable.
Mental Model
Before a chef serves a new recipe: taste-test it (Self-Reflection), pass full process inspection (Trajectory Evals), test on 10% of tables (Canary Versioning), and time every station (Observability).
What Breaks Without This
Grading only final text misses an agent that loops 5 times or calls the wrong tool before stumbling on a lucky answer—and a 1-line prompt edit silently breaks 15% of workflows.
Key Concepts
- Verification & Self-Reflection: Letting an agent double-check its own work with critics, linters, or tests before answering. Critic loops, static linters, or unit-test runners allowing the agent to catch and fix its own errors before replying.
- Evaluations (Evals): Automated report cards testing accuracy and regressions before and after launch. Automated offline golden datasets and online LLM-as-a-judge checks measuring accuracy, tool precision, and regressions.
- Prompt & Config Versioning: Saving prompts and settings like versioned code and testing updates on a small slice of users. Treating system prompts, tool definitions, and hyperparameters as versioned artifacts with canary rollouts.
- Observability & Tracing: X-ray timelines showing prompt trees, tool speeds, token counts, and where errors happened. Distributed OpenTelemetry traces capturing prompt trees, tool latencies, token counts, and error rates.
Key Takeaway
Verify outputs automatically, test every prompt change on golden datasets, roll out gradually, and trace every step.