Skip to main content

Building an AI Customer Service Evaluation System: Test Sets and Layered Metrics

· 5 min read
Jack Ning
Maintainer of Bytedesk

"The new AI version feels a bit better" — this sentence is the most dangerous form of feedback in AI customer service iteration. Without an evaluation system, every prompt tweak, model swap, or retrieval parameter change is flying blind: you don't know why it improved, and you find out it regressed only when users complain. An evaluation system is not a post-launch luxury; it is the foundation that makes continuous iteration possible.

This is the eighth post in an experience-sharing series for AI customer service product managers and developers, drawn from hands-on practice as an AI product manager at a Southeast Asian cross-border e-commerce platform. In this post I want to share how to build a technical evaluation system for AI customer service — constructing test sets that cover intent recognition accuracy, retrieval recall, answer correctness, tool-call success rate, task completion rate, and multi-turn dialogue stability, and determining the evaluation method for each metric.

Illustration: Eval set construction, machine review, and the regression loop

Three Key Points in Evaluation System Design​

  • Systematic evaluation design: six metrics spanning the whole chain from understanding to execution, organized in layers rather than a scattered pile.
  • Combining automated metrics with human evaluation: which can be computed automatically, which require humans, and how to calibrate an LLM judge — all practical craft.
  • Dataset construction methodology: where samples come from, how they are labeled, and how to prevent overfitting determine whether evaluation results are trustworthy.

The Overall Design​

1. Test set construction: three sources + structured labeling​

I draw from exactly three sources:

  1. De-identified sampling of real online conversations, stratified by language × site × question type so the distribution mirrors real traffic;
  2. High-frequency FAQs accumulated by operations — the baseline that must never regress;
  3. Purpose-built edge cases: multi-intent, ellipsis and coreference, malicious input, questions with no answer in the knowledge base — precisely the "tricky" samples that expose system boundaries.

Each sample is labeled with four things: standard intent, the knowledge chunks that should be hit (gold standard), the tool sequence that should be called, and the expected final result. Multi-turn samples additionally label state dependencies (e.g., query order first, then ask about refund).

Split the data into a fixed regression set (rarely changed, for cross-version comparability) + an iteration set (updated with each version), plus an adversarial subset to prevent overfitting to the test set.

2. Metrics and evaluation methods​

MetricEvaluation method
Intent recognition accuracyCompare against human-labeled intents; output a confusion matrix to locate confusable intents
Retrieval recallRecall@K / MRR against gold-standard knowledge chunks
Answer correctnessLLM-as-judge scoring by rubric (factuality, completeness, citation consistency), with sampled human review to calibrate the judge
Tool-call success rateAutomated replay: tool selection accuracy + parameter validity + execution success
Task completion rateEnd-to-end simulated dialogue judged on whether the user goal was achieved (query returned correctly / operation executed)
Multi-turn stabilityConstruct multi-turn follow-up chains; check context retention, state persistence, no repeated questions

The key point: each metric has an explicit automation level — the first two are fully automatic, answer correctness requires sampled human calibration of the model judge, and task completion relies on end-to-end simulation.

3. Operating mechanism: evaluation in CI, results feed root-cause analysis​

  • Wire evaluation into CI: every model, prompt, or retrieval config change automatically runs regression; a metric drop blocks release;
  • Establish metric baselines and alert thresholds — fluctuation near baseline is normal; breaching thresholds triggers alerts;
  • Results feed root-cause analysis: whichever layer's metric drops, investigate that layer — intent accuracy fell, check routing; recall fell, check the knowledge base; tool success fell, check parameter validation.

How This Maps to Weiyu​

The Weiyu open-source customer service system (GitHub: https://github.com/bytedesk/bytedesk , website: https://www.weiyuai.cn ) supplies the data foundations for building such a system: full-channel conversation records are retained and exportable by channel, time, and agent dimensions — raw material for de-identified sampling into test sets; conversation statistics continuously output business-layer metrics like resolution rate, handoff rate, and satisfaction — precisely the top-layer proxy for "task completion rate"; QA capabilities support manual sampled review of AI conversations, feeding the human calibration of the LLM judge. Layer automated evaluation on top of this data and you have a complete loop.

Key Takeaways​

  • Three test-set sources: stratified real traffic + high-frequency FAQs + purpose-built edge cases — all three are mandatory.
  • Four labeling elements per sample: intent, gold chunks, tool sequence, expected result; add state dependencies for multi-turn.
  • Layered metrics, each with a method: automate what can be automated; answer correctness requires human calibration of the model judge.
  • Evaluation in CI: metrics below baseline block release — turning "feels better" into "measures better."
  • Results feed root-cause analysis: whichever layer's metric drops, investigate that layer.