safety · basic

Content Moderation

Classify community replies by their role and separately decide when a human moderator should review them.

choicenoul

When to use it

Example 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"
}

Decision questions

choicereply_type

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
noulhuman_review

Should a human moderator review this reply under the community's moderation workflow?

Expected structured output

A semantic reply category plus an independent probability that human review is warranted.

TypeScript example

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?"
    ),
  },
});

Why this design works

Limits and boundaries

Sources and inspiration

Continue

Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.