关于「实证闭环:客服意图标注队列与证伪方案」,《主动学习与客服意图标注》给出的定量结论是什么?
结论:第八章给出客服意图标注队列、蒸馏小工具「标注优先级排序器」与预注册检验方案;分类器只做分派与转人工建议,不对客户自动做出不利决定。书中以标注框区分已发表的证据、可运行的 Python 计算(23 段程序)、原典与作者的假说。
数据口径:书中意图先验、词概率与成本均为示意参数;全部计算由书中程序生成;本书属于非个人化经营建议。 第一章在合成的四意图客服数据上重算:达到目标准确率,随机抽样的中位数是 1,600 条,最小间隔采样是 640 条,后者只用前者的 0.400;全部标注训练的模型准确率为 0.893,这一倍数随目标逼近天花板而变化。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| ok | hi my name is [NAME], where is order [ORDER] |
|---|---|
| ok | refund please, card [CARD] was charged twice |
| ok | call me on [PHONE] about the wrong size |
| ok | email [EMAIL], parcel [ORDER] is late |
| ok | I want to speak to a manager, phone [PHONE] |
| ok | exchange size M for L please, thanks |
| replacements: EMAIL=1 ORDER=2 CARD=1 PHONE=2 NAME=1 | |
| messages with a digit run of 4 or more left: 0 of 6 |
查看完整验算程序
# Chapter 8. p82: de-identify messages before they enter the label queue.
# 只用店内客服对话;入队前用正则把邮箱、电话、订单号、长数字串与
# 自报姓名替换为占位标记,再检查是否残留 4 位以上连续数字。
# 下列消息为虚构样例(example.com 域名、虚构号码),不含任何真实数据。
import re
RULES = (
("EMAIL", re.compile(r"[\w.+-]+@[\w-]+(\.[\w-]+)+")),
("ORDER", re.compile(r"\b(?:ORD|SO)-?\d{4,}(?:-\d+)*\b", re.I)),
("CARD", re.compile(r"\b\d(?:[ -]?\d){12,18}\b")),
("PHONE", re.compile(r"(?<!\w)\+?\d[\d -]{7,14}\d(?!\w)")),
("NAME", re.compile(r"(?<=\bmy name is )[A-Z][a-z]+", re.I)),
)
MSGS = (
"hi my name is Dana, where is order ORD-20261113-0042",
"refund please, card 4111 1111 1111 1111 was charged twice",
"call me on +60 12-345 6789 about the wrong size",
"email dana.k@example.com, parcel SO998877 is late",
"I want to speak to a manager, phone 0123456789",
"exchange size M for L please, thanks",
)
counts = {name: 0 for name, _ in RULES}
leaks = 0
for m in MSGS:
out = m
for name, rx in RULES:
out, k = rx.subn("[" + name + "]", out)
counts[name] += k
left = re.findall(r"\d{4,}", out)
leaks += 1 if left else 0
print(("ok " if not left else "LEAK") + " " + out)
print("replacements: " + " ".join(
"{}={}".format(name, counts[name]) for name, _ in RULES))
print("messages with a digit run of 4 or more left: {} of {}".format(
leaks, len(MSGS)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《主动学习与不确定性采样、最少人工标注让客服意图分类器达标母典》第 8 章「实证闭环:客服意图标注队列与证伪方案」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-312 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026312,
author = {Fan, Yafu},
title = {Active Learning and Uncertainty Sampling: the Fewest Human Labels a Customer-Intent Classifier Needs to Reach Its Target},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}