安全与社区 · 基础

内容审核

判断回复属于哪种类型,并单独判断是否需要人工审核。

ChoiceNoul

适合什么时候使用

  • 社区路由
  • 评论分流
  • 人工审核队列

示例 state

{
  "reply": "This number is wrong — the release notes say 1.8%, not 18%. Here is the source.",
  "context": "Reply to a technical product post"
}

决策问题

Choicereply_type

这条回复主要属于哪一类?

  • question — 真实的信息请求
  • correction — 相关的事实纠正
  • joke — 幽默或玩笑式讽刺
  • promotion — 未经请求的推广或垃圾信息
  • hostility — 意图挑衅的人身攻击
  • other — 以上都不是
Noulhuman_review

根据社区审核流程,这条回复是否应该由人工审核?

预期输出

一个回复类型,以及需要人工审核的概率。

TypeScript 示例

import { choice, noul, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();

const result = await client.systemOne({
  state: {
    reply:
      "This number is wrong — the release notes say 1.8%, not 18%. Here is the source.",
    context: "Reply to a technical product post",
  },
  questions: {
    reply_type: choice("Classify the primary role of this reply.", {
      question: "Genuine request for information",
      correction: "Relevant factual correction",
      joke: "Humor or playful sarcasm",
      promotion: "Unsolicited promotion or spam",
      hostility: "An attack meant to provoke",
      other: "None of the above",
    }),
    human_review: noul(
      "Should a human moderator review this reply under the community's moderation workflow?"
    ),
  },
});

为什么这样设计

  • 内容类型和是否需要人工审核,是两个独立判断。
  • 类别集合将事实纠正与敌意表达区分开。

注意事项

  • 实际审核政策必须定义删除、警告或升级的条件。
  • 这个示例不是通用安全政策,也不是法律合规系统。

来源与参考

这个模板和来源链接最近核验:2026-09-21

继续浏览

先在Playground中运行这个模式,浏览全部模板,了解官方 SDK 用法,或使用成本计算器估算实际使用成本。