Skip to main content

An Automated Agent Evaluation System: Four Test Sets, Five Dimensions, One CI Pipeline

· 4 min read
Jack Ning
Maintainer of Bytedesk

Customer service Agents iterate weekly: new models, tweaked prompts, revised workflows. Yet many teams cannot answer a basic question—"did this change make things better or worse?" Without an evaluation system, every release is flying blind; by the time complaints arrive, the cost is already paid.

This is the thirteenth article in an experience-sharing series on "AI customer service product and engineering practice," drawn from hands-on practice as an AI Product Manager focused on IM intelligent customer service at a local-life services platform. In this post I want to share how to build an automated Agent evaluation system covering multiple business scenarios—designing real-conversation sampling, golden test sets, complex multi-turn task sets, and high-risk challenge sets, and setting evaluation standards across intent recognition, tool calling, task completion, business-rule compliance, and response efficiency.

The crux is "automated"—if evaluation cannot run in CI and auto-regress on every change, it is merely ceremonial acceptance testing.

Illustration: Agent automated evaluation with test sets and a regression pipeline

Three Key Points in Evaluation-System Design​

  1. Design layered, scenario-based test set construction—different sets answer different questions; no single set covers everything.
  2. Combine automated evaluation with human calibration—LLM judges are imperfect and need spot-checking.
  3. Set quantifiable, regression-friendly standards, turning evaluation into a continuous quality gate rather than a one-off event.

Overall Approach​

My evaluation system is "four test sets, five dimensions, one automated pipeline."

Step 1: Build the Four Test Sets​

  • Real-conversation sampling set: sample online conversations stratified by "business line × intent distribution," preserving real noise (typos, topic jumps). Assesses online generalization; roll and refresh periodically to avoid overfitting.
  • Golden test set: standard Q&A pairs for high-frequency questions (order queries, policy explanations), each case with a reference answer and scoring points. Used for version regression—guarantee no degradation.
  • Complex multi-turn task set: multi-turn, multi-intent scenarios constructed or adapted from real conversations (query order → change address → refund), with slot checklists. Assesses state management and task orchestration.
  • High-risk challenge set: adversarial cases—refunds, compensation, PR incidents, prompt injection. The reference answer is "must transfer to human / must refuse"—assessing safety boundaries.

Note the high-risk set scores in reverse: honestly transferring to a human earns full marks; attempting to answer is a violation.

Step 2: Five Evaluation Dimensions and Standards​

  • Intent recognition: precision/recall against labeled tags;
  • Tool calling: correct-call rate (did it call what it should), parameter accuracy, spurious-call rate;
  • Task completion: end-to-end completion rate, judged by actual business-system state change, not AI self-report;
  • Business-rule compliance: compliance rate; high-risk violations are instant vetoes;
  • Response efficiency: turn efficiency (turns to complete), response latency, clarification count.

Two principles are most often missed: never trust the AI's self-declared completion (check whether the refund actually fired in the order system); high-risk violations fail outright (no averaging to dilute).

Step 3: Automation + Human Calibration​

  • Rule-based dimensions (tool calling, rule compliance, efficiency) evaluate fully automatically;
  • Generation quality uses LLM-as-Judge scoring, with periodic human spot-checks to calibrate judge consistency;
  • Evaluation runs in the CI pipeline: every model/workflow change triggers automatic regression; failing blocks release.

Only then is evaluation a continuous quality gate, not a one-time acceptance.

Practice in Weiyu​

Weiyu, the open-source AI customer service system (GitHub, website), provides the raw material for such a system: sessions and messages are fully logged, enabling stratified sampling by business × intent for the real-conversation set; knowledge-base Q&A pairs seed the golden set; AI Agent tool-call records are replayable, supporting automated call-correctness and parameter-accuracy evaluation; ticket state-change records are precisely the "actual business-system state change" evidence for task completion. The session QC module plays the human spot-check calibration role.

Takeaways​

  • Four sets, four jobs: sampling for generalization, golden for regression, multi-turn for state management, high-risk for safety boundaries.
  • The high-risk set scores in reverse: honest human transfer earns full marks.
  • Task completion is judged by actual business-system state change, never AI self-report; high-risk violations veto instantly.
  • LLM judge plus human spot-check calibration; rule-based dimensions run fully automatically.
  • Wire evaluation into CI: auto-regress on every change; failing blocks release.