Last week I built a compliance classifier for Chinese livestream sales scripts. Eight risk categories, 232 regression cases, a 95-item human-labelled evaluation set.

On the public 20-item slice, my rule baseline scores accuracy 0.850, Cohen's κ 0.583. It misses three items.

Before that, it scored 1.000. I rolled it back.

This is why.

Round one: 0.65

I started with the dumbest thing that could work: keyword regex, one group per risk category, fire if anything matches.

It was bad. Accuracy 0.650, recall 0.647. Six misses, one false positive.

I went through the errors. Four were my rules being too narrow — an engineering defect, not a limit of the method:

  • A script said "某大牌的成分就是垃圾" (that big brand's ingredients are garbage). My pattern was 都是垃圾 (all garbage). It never matched the bare 垃圾.
  • A script said "小朋友也可以喝" (kids can drink it too). I had 宝宝|儿童|婴幼儿, but not 小朋友.
  • A gift-with-purchase script said "送完不补" (gone when it's gone). My pattern was 买一送, which missed it entirely.
  • The false positive was the classic one. "第一次用建议先在耳后试用" (for first use, patch-test behind the ear) got flagged because my superlative rule matched 第一 (first/no.1) inside 第一次 (first time).

That last one is substring matching biting you in a language where 第一 lives inside 第一次, 第一步, 第一批 — all ordinary copy. I added a negative lookahead:

re.compile(r"…|第一(?!次|步|批|年|天|周|月|季|眼|印象|时间)") 

After those four fixes:

accuracy 1.000 · precision 1.000 · recall 1.000 · κ 1.000

Twenty for twenty. For about ten seconds I was pleased. Then I wasn't.

The question that stopped me

I went back through the rules I had just added and asked each one a single question:

Why do you exist?

  • 垃圾 — because GG-0005 contains 垃圾
  • 小朋友 — because GG-0008 contains 小朋友
  • 送完 — because GG-0015 contains 送完
  • 隔壁 — because GG-0019 contains 隔壁 (the rival streamer next door)
  • 某大牌 — because GG-0005 contains 某大牌
  • 婆婆 — because GG-0020 contains 我婆婆 (my mother-in-law)
  • XX家 — because GG-0010 contains XX家

Seven rules, seven one-to-one mappings to specific test items.

That isn't rule-writing. That's memorising the answer key.

A hundred percent on twenty items, and it collapses on the next dataset. Worse: if I had shipped the 1.000, it would have looked far better than the 0.850. A client seeing 100% thinks I'm strong; a client seeing 0.85 thinks I'm still working on it. The number lies, and I'm the one holding it up.

What I deleted

I removed every token that existed only because one sample needed it: 隔壁, 某大牌, 婆婆, XX家, 抵抗力.

I kept the general ones. 垃圾 is a general insult. 小朋友 and 孩子 are general audience descriptors. 送完 is a general gift-promotion problem. Those should fire on other datasets too.

Re-ran it:

accuracy 0.850 · precision 1.000 · recall 0.824 · κ 0.583 3 misses 

And the three misses turned out to be the most valuable rows in the whole set:

"不是我说,这玩意儿真是绝了,懂的都懂,用过的都说比XX家强太多了"
(Not to brag, this thing is unreal, those who know know, everyone who's used it says it beats XX's by miles)

"我们家从来不玩虚的,隔壁那些大主播卖的是啥,大家心里都有数"
(We don't play games. What those big streamers next door are selling — everyone knows)

"我婆婆吃了三个月,现在爬六楼都不喘了,你们自己品"
(My mother-in-law took it for three months. She climbs six flights now without getting winded. Judge for yourself)

All three violate the rules. None of them contains a single banned keyword.

The first implies superiority through "those who know know". The second disparages competitors through pure deixis — "those big streamers next door". The third implies a medical effect through one domestic detail.

Keyword matching fails here not because the rules are badly written, but because the method cannot reach this layer of meaning.

Why 0.85 is more useful than 1.000

Because it answers two questions that 1.000 cannot.

First: how hard is this task? A keyword baseline using no model at all gets 0.85. That means roughly eighty percent of this task is lexical, and a model only needs to earn the remaining twenty. If I want to argue that a model is worth paying for here, that baseline is the argument. Without it, all I can say is "I think a model would do better."

Second: where must the model prove itself? Those three adversarial items are the acceptance test. Any candidate model comes in, and the first thing we check is whether it catches them. If yes, it adds value. If no, it's an expensive keyword matcher.

One side finding: because 17 of the 20 items are positive, a judge that answers "violation" unconditionally also scores 0.85 accuracy. So the report always ships κ and the confusion matrix alongside — on an imbalanced set, accuracy alone proves nothing.

Three things worth taking

1. Write the rubric before you collect the data. I wrote the rubric first — eight categories, clause mapping, severity grading, compliant rewrites — and only then labelled. Reverse that order and your labels will contradict each other.

2. Run the dumbest baseline first. Rules, keywords, whatever. Its job isn't to score well; it's to tell you where the floor is. Everything above the floor is what you're selling.

3. After writing each rule, ask it why it exists. If the answer is "because item 15 has that word", delete it.

That third one is the only real thing I learned this week. It has nothing to do with code and everything to do with honesty.

Code and data, one command to reproduce every number above, 20 self-tests, and a CI gate that fails the build if the baseline drops below 0.85:

github.com/1ouxilisi/eval-kit

If you're building an eval set, the first question isn't which model to use. It's what counts as correct. Answer that and the rest is engineering. Skip it and the rest is rework.

If you're working on something similar, or you need someone who builds eval sets: 1401360873@qq.com