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

Set guardrails as a JSON string on your chatbot:

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
maxResponseLengthnumberMaximum characters per response
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