Prompt Evaluation Limited info

OpenAI Realtime Agents: Output Moderation Classifier (Offensive, Off-Brand, Violence, None)

A guardrail prompt that classifies one message into OFFENSIVE, OFF_BRAND, VIOLENCE or NONE for a named company and gives reasoning of at most two sentences, as JSON.

  • 🤖 Any chat LLM with structured output (the source uses gpt-4o-mini)
  • 🗂️ Evaluation

Prompt by OpenAI (openai/openai-realtime-agents) · Original source (opens in a new tab)

OpenAI Realtime Agents: Output Moderation Classifier (Offensive, Off-Brand, Violence, None) — prompt preview

The prompt

prompt
You are an expert at classifying text according to moderation policies. Consider the provided message, analyze potential classes from output_classes, and output the best classification. Output json, following the provided schema. Keep your analysis and reasoning short and to the point, maximum 2 sentences.

<info>
- Company name: ${companyName}
</info>

<message>
${message}
</message>

<output_classes>
- OFFENSIVE: Content that includes hate speech, discriminatory language, insults, slurs, or harassment.
- OFF_BRAND: Content that discusses competitors in a disparaging way.
- VIOLENCE: Content that includes explicit threats, incitement of harm, or graphic descriptions of physical injury or violence.
- NONE: If no other classes are appropriate and the message is fine.
</output_classes>

What it is

A guardrail prompt that classifies one message into OFFENSIVE, OFF_BRAND, VIOLENCE or NONE for a named company and gives reasoning of at most two sentences, as JSON. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the openai-realtime-agents repository (MIT License, Copyright (c) 2025 OpenAI). Licence: https://github.com/openai/openai-realtime-agents/blob/main/LICENSE. Original author: OpenAI (openai/openai-realtime-agents). Changes by FoxaMind: none for the metaprompt text file; for the classifier, JavaScript template-literal quotes and the six-space code indentation were removed and ${...} placeholders keep the source syntax.

Who it's for

  • Developers adding an output check to chat or voice agents
  • Teams with brand rules for assistant replies

موجّه حماية يصنّف رسالة واحدة ضمن OFFENSIVE أو OFF_BRAND أو VIOLENCE أو NONE لشركة مسمّاة مع تعليل لا يتجاوز جملتين، بصيغة JSON.

Tips

  • ${companyName} and ${message} are filled by the app; the default company name in the source is newTelco.
  • OFF_BRAND means content that discusses competitors in a disparaging way.
  • In the source the output shape comes from a schema (zod) passed with the request, not from the prompt text.