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
- Community routing
- Comment triage
- Human-review queues
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 informationcorrection— Relevant factual correctionjoke— Humor or playful sarcasmpromotion— Unsolicited promotion or spamhostility— An attack meant to provokeother— 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
- Classification and review escalation are separate decisions.
- The category set distinguishes factual correction from hostility.
Limits and boundaries
- Your actual moderation policy must define what gets removed, warned, or escalated.
- This demo is not a universal safety policy or legal compliance system.
Sources and inspiration
Continue
Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.