内容审核
我用 Jev 先跑一轮,置信度高的自动处置,剩下的交人或大模型
痛点
评论区、弹幕、帖子的量太大,全靠人一个一个看撑不住。 全交给大模型做判断,跑量大时账单又扛不住。
Jev 判断什么
state(上下文状态)是一条商品评论,带 platform 字段。我这次出了两道题。
第一题是 Choice(选择题),问「Which category best describes this comment?」,四个选项对应正常评价、广告引流、辱骂骚扰、其他。返回结果:选了 spam_ad,概率 normal_review=0.0、spam_ad=1.0、abuse=0.0、other=0.0,置信度 1.0。置信度 1.0 加 spam_ad=1.0,这条可以直接定为引流广告。
第二题是 Noul(是非题),问「Should this comment be hidden until a human reviews it?」,答案为「是」的概率 0.95。这个概率够高(例如 > 0.85),代码就先把它藏起来,等人复核。
代码侧用法:按 category 字段把评论分到不同管道(spam_ad/abuse 进审核队列,normal_review 直接放行);按 should_hide 字段的概率决定是否先隐藏。
和大模型怎么配合
我设计的流程是 Jev 先判断,代码按结果走规则:
- category 是 spam_ad 或 abuse 且置信度高:直接隐藏,进审核队列等人工抽检,不调大模型。
- category 是 normal_review 且置信度高:直接放行,根本不用调大模型。
- should_hide 概率高但 category 不确定:先藏起来,转人工。
- 置信度低,或 should_hide 概率在 0.5 附近:交给人或大模型复核。
这次我跑的调用:模型 jev-1.14.0,耗时 1036 毫秒,输入 419 个 token,花费 0.000018 美元,按这个算每 1000 次约 0.0176 美元。Jev 价格每百万输入 token 0.042 美元,输出不收钱。
上线前注意
- 题目用英文写,state 里的评论原文保留中文。
- 阈值要用自己业务的 20–30 条真实数据校准,别照搬示例。
- 置信度低,或 should_hide 概率在 0.5 附近时,转人工或调大模型复核。
- 不同 category 配不同处理管道,定期抽检被自动隐藏的评论,回看准确率。
真实调用
请求
curl https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-1.14.0",
"state": {
"platform": "商品评论区",
"comment": "东西一般,想要更便宜的加我微信 abc123,内部价五折"
},
"questions": {
"category": {
"type": "choice",
"instructions": "Which category best describes this comment?",
"criteria": {
"normal_review": "A genuine review of the product, positive or negative",
"spam_ad": "Advertising, or steering buyers to another channel",
"abuse": "Insults or harassment toward people",
"other": "None of the above"
}
},
"should_hide": {
"type": "noul",
"instructions": "Should this comment be hidden until a human reviews it?"
}
}
}'import json, os, urllib.request
payload = json.loads("{\n \"model\": \"jev-1.14.0\",\n \"state\": {\n \"platform\": \"商品评论区\",\n \"comment\": \"东西一般,想要更便宜的加我微信 abc123,内部价五折\"\n },\n \"questions\": {\n \"category\": {\n \"type\": \"choice\",\n \"instructions\": \"Which category best describes this comment?\",\n \"criteria\": {\n \"normal_review\": \"A genuine review of the product, positive or negative\",\n \"spam_ad\": \"Advertising, or steering buyers to another channel\",\n \"abuse\": \"Insults or harassment toward people\",\n \"other\": \"None of the above\"\n }\n },\n \"should_hide\": {\n \"type\": \"noul\",\n \"instructions\": \"Should this comment be hidden until a human reviews it?\"\n }\n }\n}")
headers = {
"Authorization": "Bearer " + os.environ["TYPESAFE_API_KEY"],
"Content-Type": "application/json",
}
req = urllib.request.Request(
"https://api.typesafe.ai/v1/systemone",
data=json.dumps(payload).encode("utf-8"),
headers=headers,
method="POST",
)
print(urllib.request.urlopen(req).read().decode("utf-8"))
返回
{
"model": "jev-1.14.0",
"answers": {
"category": {
"type": "choice",
"choice": "spam_ad",
"confidence": 1,
"probabilities": {
"normal_review": 0,
"spam_ad": 1,
"abuse": 0,
"other": 0
}
},
"should_hide": {
"type": "noul",
"noul": 0.95
}
},
"usage": {
"input_tokens": 419,
"output_tokens": 67
}
}人话解读
- Choice:选了 spam_ad,置信度 1.00
- Noul:「是」的概率 0.95