Simple Example
Typed Example
Common uses
- checking user prompts before sending them to a generation model
- screening chat messages, comments, or forum posts
- flagging risky text for review instead of hard-blocking it immediately
Common mistakes
- treating moderation as a perfect binary truth signal instead of a policy input
- hard-coding only one category when your policy may evolve later
- using plain strings everywhere when your pipeline may later need mixed typed inputs