SentrySergiy DybskiyExplainer
Reading the agent traces is how you make the call your eval can't
Summary
Automated evaluations often miss unknown failure modes in AI agents because developers only write tests for anticipated errors. While building an itinerary agent for AI Engineer World's Fair, an open-weight model routed a speaker query to a tool returning only tracks, leading the model to hallucinate famous speakers and falsely claim the tool provided that data. Because a tool was executed, the trace appeared grounded until inspectable tool outputs revealed the discrepancy. To resolve this, the author retained the inexpensive model, corrected query routing, tightened system prompts against ungrounded entities, and added a custom entity-diffing eval in CI. Ultimately, directly reading agent telemetry traces alongside errors and logs is essential for diagnosing root causes and deciding trade-offs between model costs, prompt adjustments, and routing fixes.
Context
Building an AI itinerary builder for AI Engineer World's Fair using cheap open-weight models for anonymous visitors and larger models for signed-up users, with automated evals that initially failed to anticipate specific agent hallucinations.
Approach / What changed
Inspect agent telemetry traces directly in Sentry, fix query routing so speaker questions reach proper tools, tighten system prompts to forbid naming unreturned entities, and implement a CI groundedness check using a custom entity-matching scorer.
Takeaways
Tool execution can disguise hallucinations in traces unless developers inspect the actual payload returned by the tool call.
A custom CI evaluation scorer comparing named entities against a database can verify groundedness without requiring an LLM judge.
Automated evaluations quantify failure rates but cannot decide trade-offs among model upgrades, prompt tightening, routing repairs, or accepting errors.
Source and freshness
- Source
- blog.sentry.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.