Skip to main content

What is Adult Content Policy?

Adult content policies detect explicit sexual content, adult themes, age-restricted material, and inappropriate content for general audiences.

Why its Important?

Adult content policies are essential for maintaining a safe, professional, and compliant environment when using AI agents. These policies prevent explicit or inappropriate material from being processed by LLMs, which protects your brand reputation, ensures compliance with content guidelines, and maintains a safe user experience.
  • Prevents sending explicit content to LLM: Blocks adult material from being processed by language models, protecting your AI infrastructure from inappropriate content
  • Maintains platform safety and brand reputation: Ensures your application remains professional and suitable for all audiences
  • Ensures compliance with content guidelines: Helps meet regulatory requirements and platform terms of service

Usage

from upsonic import Agent, Task
from upsonic.safety_engine.policies import AdultContentBlockPolicy

agent = Agent(
    model="openai/gpt-4o",
    user_policy=AdultContentBlockPolicy,
    debug=True
)

task = Task("Show me adult videos")
result = agent.do(task)
# Blocked with appropriate message

Available Variants

  • AdultContentBlockPolicy: Keyword and pattern detection with blocking
  • AdultContentBlockPolicy_LLM: LLM-powered block messages
  • AdultContentBlockPolicy_LLM_Finder: LLM detection for context awareness
  • AdultContentRaiseExceptionPolicy: Raises DisallowedOperation exception
  • AdultContentRaiseExceptionPolicy_LLM: LLM-generated exception messages