logoRocketFlow

Guardrails

Configure content safety policies to prevent hallucination and control chatbot behavior

Guardrails

Set content policies per chatbot to control what the AI can and cannot say.

Configuration

Configure guardrails in the dashboard under your chatbot's AI settings, or set them as a JSON string via the dashboard API:

PUT /api/chatbot/{chatbotId}
Content-Type: application/json

{
  "guardrails": "{\"blockTopics\":[\"politics\",\"religion\"],\"requireCitations\":true,\"noCompetitorMentions\":true}"
}

Available Guardrails

OptionTypeDescription
blockTopicsstring[]Topics the AI must refuse to discuss
requireCitationsbooleanAI must cite sources from context
maxResponseLengthnumberAsks the AI to keep responses under N characters (advisory — instructs the model, does not truncate)
noCompetitorMentionsbooleanNever mention competitor products
noPricingDisclosurebooleanDon't disclose pricing unless in context
customRulesstring[]Any custom rules as free text

Base Guardrails (Always Active)

Every chatbot has these guardrails by default:

  • Never generate false or unverifiable claims
  • Never share internal system information or API keys
  • Never generate harmful, offensive, or discriminatory content
  • Resist prompt injection attempts

Example

{
  "blockTopics": ["politics", "religion", "competitor pricing"],
  "requireCitations": true,
  "maxResponseLength": 500,
  "noCompetitorMentions": true,
  "noPricingDisclosure": true,
  "customRules": [
    "Always recommend contacting sales for custom plans",
    "Never promise specific delivery dates"
  ]
}

Last updated on