---
title: "Discussion on \"AI Agent Evaluation: Test Cases, Traces, Metrics, and Improvement\" | Hashnode"
description: "Discussion on \"AI Agent Evaluation: Test Cases, Traces, Metrics, and Improvement\". Evaluate agent answers and trajectories using datasets, traces, precision, recall, human review, experiments, and monitored improvement."
url: "https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [AI Agent Evaluation: Test Cases, Traces, Metrics, and Improvement](https://blog.sant.sh/evaluate-and-observe-agents?utm_source=hashnode&utm_medium=feed)

Evaluate agent answers and trajectories using datasets, traces, precision, recall, human review, experiments, and monitored improvement.

23h ago · 6 min read · blog.sant.sh  
Read the article

-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#testing](https://hashnode.com/tag/testing)

## Written by

[Santosh](https://hashnode.com/@sant-sh)

@sant-sh

  
[View profile](https://hashnode.com/@sant-sh)

Software Engineer

I write about AI agents, harness engineering, and reliable software. My guides turn learning notes and small experiments into clear explanations, diagrams, and exercises you can try.

## Responses 6

Markdown supported · ⌘↵ to post

[Tim Zinin](https://hashnode.com/@timzinin)

[12h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c76645fecb4bd472ca950)

Your example where answers get friendlier while correct exception cases drop from four to two shows why a style review alone can reward the wrong change. You also advise keeping some cases held out from prompt tuning, so that familiarity with the development set is not mistaken for improvement. When a held-out case fails and you inspect it to find the cause, do you move it into the development set and write a fresh replacement?

[Santosh](https://hashnode.com/@sant-sh)

[1h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c76645fecb4bd472ca950#reply-6b0d0de2d4de97113f71e700)

Inspecting a failure informs a prompt or implementation change, generally I keep that case as a development/regression test and stop treating it as unseen evidence. Then I think we should add independently written cases covering the same failure mode to a refreshed holdout. Also version the datasets so scores before and after that change aren’t silently compared as equivalent should be good option

[X1Y1](https://hashnode.com/@x1y1)

[13h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c6398a57672f677bfcf7a)

The line about sanitizing traces deserves more space than it gets. Traces are where API keys end up, because tool call arguments and headers get logged as-is, and the tracing backend usually has wider access than the app does.

[Santosh](https://hashnode.com/@sant-sh)

[1h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0c6398a57672f677bfcf7a#reply-6b0d0e78d4d0dccbe1429b8f)

Agreed, the sanitization point needs more emphasis. I would filter before exporting traces, maybe using an allowlist of required fields rather than logging everything and redacting afterward.

[Dr Srinivas Padmanabhuni](https://hashnode.com/@srinivaspadmanabhuni)

[21h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0bf40823b2d54d809c73bc)

Cheatsheet, built from your friendlier-answers-but-worse-exception-handling example:

-   Slice first: a blended score hides a drop from four correct exception cases to two. Report per slice and gate on the risky slice alone.
-   Hold out: tune prompts on one set and decide on another, or you are measuring familiarity.
-   Denominators: define what a metric returns on an empty slice, so a zero-division never quietly becomes a pass.
-   Execution: assert forbidden tools and repeated-call budgets straight from the trace; no judge needed.
-   Attribution: change one component per experiment and store the evaluator version with the result.

Do you pin the evaluator version so older runs stay comparable after a rubric change?

[Santosh](https://hashnode.com/@sant-sh)

[1h ago](https://hashnode.com/posts/evaluate-and-observe-agents/6b0bcf9da6a8bc71121a7ab8/comment/6b0bf40823b2d54d809c73bc#reply-6b0d0eefd4d0dccbe142a4f0)

Thank you for this clear summary.

Yes, pinning the evaluator version in my opinion should be the good approach including the rubric, scoring code and, for model judges, model and prompt configuration. After a rubric change, its better to re-score both baseline and candidate outputs with the new evaluator and retain the original scores separately. Otherwise, slight improvement could just be a change in how we measure it.
