Tracing explains one run by recording model calls, tools, handoffs, guardrails, and custom spans. Evaluation measures behavior across a representative task suite. Use traces to discover failure mechanisms, turn those mechanisms into scored cases, compare against a baseline, and block releases that regress quality, safety, latency, or cost.
You will group related runs in a trace, define a multi-dimensional evaluation scorecard, and convert a production failure into a regression test.
trace_demo.py:
Built-in tracing is normally enabled on the server-side SDK path. Review data governance before sending sensitive inputs to any observability system, and use SDK controls where tracing must be reduced or disabled.
Keep dimensions separate:
An average score must not hide a safety failure. Use hard gates for critical invariants.
Start with real task shapes: normal, boundary, ambiguous, adversarial, provider-error, and historical incident cases. Remove secrets and personal data while preserving the failure mechanism. Version cases, rubrics, judge prompts, and expected tool/policy events.
Use deterministic graders whenever possible. Use model graders for semantic qualities with a specific rubric and calibration against human labels. Never let the same generated reference leak the answer into the candidate context.
Failure injection: Change the billing specialist’s handoff description so cancellation requests route incorrectly. A routing evaluation should fail before deployment; a trace should show why.
Sample and retain traces by risk, connect trace IDs to business outcomes, monitor distributions rather than anecdotes, and require baseline comparison in CI. Separate online monitoring from offline release evaluation.
Create a 30-case SupportOps suite and a scorecard with hard safety gates. Run multiple samples for ambiguous cases and report variance, not only a mean.