AI Guardrails & Limits

Guardrails are safety controls that apply to your AI agents' responses whatever each agent's prompt says. This guide covers the Guardrails tab: content moderation and your own moderation categories, topics your AI must not engage with, masking of personal information, prompt-injection detection and the event logs. It also covers the Rate Limits tab, which caps how much AI a single contact can use.

Before you start

Guardrails are available on every plan with AI. The tab is at Admin > Advanced > AI Settings > Guardrails. Seeing and changing guardrails needs the ai:guardrails:manage permission, which Owners and Admins hold. Your own moderation categories and restricted topics, and your own content-moderation settings, come with every plan except Starter. Every workspace starts protected, so you don't have to do anything before using AI:

  • the restricted topics' Default action is Conservative;
  • personal-data Masking level is Strict;
  • prompt-injection detection is on. A new workspace starts on Replace the reply, so a detected attempt gets a safe reply in place of the bot’s answer. A workspace that had guardrails before this choice was offered is on Log only, unless an admin had set an action on content moderation’s Prompt injection category: Safe reply carried over as Block the message, Escalate to a person and Block and end the bot session as Hand off to a person, and Log only and Flag for a supervisor as Log only. Every workspace can change it under When an attempt is detected.

The tab opens with What your guardrails do right now: one line per guardrail saying what happens to a customer's message with your current settings, each with Change to jump to its setting.

Setting It Up: the Decisions

The defaults above protect every workspace. To make the guardrails fit your business, make these choices, top to bottom. Each links to its full explanation further down.

  1. Default action for restricted topics: what a topic set to Use default does on a match: Relaxed (log), Conservative (replace the reply) or Strict (block the message). How strictly topics are enforced.
  2. Restricted topics: the six required safety topics are always on and need nothing from you; add topics of your own for subjects your business wants the bot to stay away from, each with its own action. Required topics, Adding topics.
  3. Your own moderation categories: the same topics, built with examples and tested before you save. Your own moderation categories.
  4. Content moderation, per category: for each safety category, whether it is checked, its minimum confidence and its action. The defaults are listed in a table. Content moderation, Defaults.
  5. Who reviews flagged messages: categories set to Flag for a supervisor send messages to Moderation review, which supervisors work through. Moderation review.
  6. Masking level: Standard or Strict, which decides whether email addresses and phone numbers reach the AI. Personal information protection.
  7. Prompt-injection action: what happens to a message that tries to override the bot's instructions. Prompt injection detection.
  8. Outage behaviour: whether the bot keeps answering or hands every conversation to a person while content moderation can't be reached. When moderation is unavailable.
  9. Rate limits: how much AI one contact may use. If you set none, every contact gets 200,000 tokens per rolling 24 hours. Rate limits per contact.

To check the result, read what the customer sees when a guardrail acts, and the guardrail events it records.

How the Checks Run on Each Message

Restricted topics and content moderation are separate layers, and both apply on every turn; neither is a fallback for the other. Moderation covers general safety; restricted topics cover the subjects your business wants the bot to avoid. The order on each customer message is:

  1. Personal data is masked, possible injection attempts are flagged, and the required safety topics are screened by the platform's patterns.
  2. Content moderation and your restricted topics check the message while the bot prepares its answer. A topic that blocks is checked before the bot answers.
  3. An injection attempt that content moderation finds is handled as you chose before the customer sees an answer.
  4. Content moderation checks the bot's reply before the customer sees it, and the reply is checked for the bot's own instructions (prompt-leak protection).

Moderation acts on the customer bot. On reply suggestions and on the agent @mention bot it checks the AI's draft and only flags it, never changing the text: the agent sees “Content moderation flagged this draft. Read it carefully before you insert or send it.” Triage, summaries and evaluations of a conversation in which moderation flagged a message carry a banner such as “Content moderation flagged a message in this conversation (…). Review the conversation, not only the triage.”

Restricted Topics

Restricted topics are subjects the bot must not discuss. Each topic of your own is recognised by meaning: on every turn an AI check reads the customer's message against every topic's description, in the same call that checks the bot's hand-off conditions, and acts when it is at least as sure as the topic's confidence bar. Six required safety topics are always included; the platform's own patterns screen them before the message reaches any AI.

Restricted topics of your own come with every plan except Starter (see the pricing page). On Starter the six required topics still apply; topics you made on a higher plan are kept but marked Not enforced on your plan, and you can delete them. They are enforced again when you upgrade.

How strictly topics are enforced

Default action, above the list, applies to every topic whose action is Use default. The required safety topics keep their own action.

Adding topics

The add button stays greyed out until the topic has a name and a description. The list shows each topic's Category, what it is Recognised by (“Its description, at 80% or more”, or Managed by RapiDesq for a required topic) and its Action, which you can change from the row.

The Add from Templates dialog with a search box, a category filter and the template library, each template with its category and an Add button The template library opened from Add from Templates. The Add Restricted Topic dialog filled in for Warranty decisions: topic name, category, what the topic is, the confidence bar and Hand off to a person chosen as the action Add Restricted Topic, written by hand.

What happens when a topic matches

Each topic follows the default action or has an action of its own:

If the check cannot run, a topic that changes the reply fails closed: no unchecked reply is sent, the customer is told the bot cannot answer right now (the exact reply), and the conversation is handed to a person if the bot may hand off. Topics that only log let the bot keep answering.

When a topic hands a conversation off, the agent and the Interactions page see why, for example “Restricted topic “Warranty decisions” hands off (86% confident, bar 80%)”. A bot turn a topic stopped shows “Guardrail stopped the message (restricted topic)” or “Guardrail replaced the reply (restricted topic)”.

Required compliance topics

The six required safety topics are marked Required and Managed by RapiDesq. They are always present and always on, and their detection criteria are hidden for legal compliance. They are:

The rules for them:

What happens on a match:

Your Own Moderation Categories

The Moderation categories list comes right after the summary at the top of the Guardrails tab. It shows everything your bots check customer messages for:

The Moderation categories list with the platform categories, each with a lock, its action, sensitivity and on/off switch, and the New category and Start from a template buttons Moderation categories before you add your own: the platform’s, each with a lock.

New category and Start from a template open the category wizard. Start from a template opens it on the first step; New category skips it and opens on Define:

  1. Start: Start from scratch, or one of the industry templates in your language. The category wizard's Start step with a Start from scratch button and the list of industry templates Start: from scratch or from an industry template.
  2. Define: a name and a definition in plain words, with guidance on writing one. The Define step filled in from the Price or discount promises template: the name, the plain-language definition and the guidance on writing one Define: the name and definition, here from the Price or discount promises template.
  3. Examples: three to five messages the category applies to and three to five it does not. Suggest examples has one of your bots' AI models write some for you to review; nothing is saved until you save. The Examples step with the bot picker, the Suggest examples button and two columns of example messages, those the category applies to and those it does not Examples: messages the category applies to, and messages it does not.
  4. Test: run the bot's real check on your examples and on up to five messages you type. Each shows Match or No match with the check's confidence, and whether an example is judged as you expect. The Test step after Run test, listing each example and two typed messages with Match or No match, the confidence and whether it was judged as expected Test: each message judged by the bot’s real check.
  5. Action: the action on a match and the sensitivity. The Action step with the action on a match and the sensitivity slider Action: what happens on a match, and how sure the check must be.
The Moderation categories list with the saved Price or discount promises category beside the platform categories, marked as your own with its action, sensitivity and examples count Your own category in the list, beside the platform’s.
Which plans include it

Moderation categories and restricted topics of your own come with every plan except Starter; see the pricing page. On Starter, New category and Start from a template are unavailable and the list says which plans include them. Every message is still checked against the platform's categories, at their default settings. Categories you made on a higher plan are kept, marked Not enforced on your plan, and apply again when you upgrade.

Content Moderation

Content moderation is your account's own policy for the safety categories. It sets, for each category, these columns:

The categories and their defaults

CategoryRequiredSeverityDefault actionDefault minimum confidence
Child sexual abuseYesCriticalEscalate to a personMedium and above
Self-harmYesCriticalEscalate to a personMedium and above
Violence and threatsYesHighEscalate to a personLow and above
Illicit goods and activitiesYesHighEscalate to a personLow and above
HarassmentNoMediumFlag for a supervisorLow and above
Hate speechNoMediumSafe replyLow and above
Sexual content (adult)NoMediumSafe replyMedium and above
Prompt injectionNo, but always checkedMediumSet under Prompt injection detectionLow and above
Malicious linksNoHighFlag for a supervisor on a customer's message; Safe reply on a bot replyMedium and above

The four required categories are always checked, and the Required minimum column shows their floor: “Always checked; minimum confidence no higher than Medium and above; action no weaker than Escalate to a person”. You can make one stricter, never weaker. So Violence and threats, which starts at Low and above, can be relaxed to Medium and above but not to High. A choice outside the floor is marked above the required minimum or below the required minimum and is refused (see Troubleshooting).

Prompt injection is always checked too, and only its minimum confidence can be changed here. What a detected attempt does is set under Prompt Injection Detection, so its row shows Set under Prompt injection detection in place of an action.

Choosing your own settings comes with every plan except Starter. On Starter the tab says “Every category runs at the platform's defaults on your plan”: every category is checked at its default minimum confidence and with its default action, and these cannot be changed. Settings you chose on a higher plan are kept and apply again when you upgrade.

Weekly false-positive review

Each week, late on Sunday night (11:00 PM Central, or midnight while daylight saving time is in effect), the flags supervisors reviewed in the last four weeks are counted per category, your own categories included. A category needs at least 20 reviewed flags. When more than a quarter of them were marked False positive in Moderation review, a higher minimum confidence is suggested: the lowest one at which no more than a quarter of the remaining flags would have been false positives. The table shows False positives (for example “6 of 20 (30%)”), Current minimum, Suggested minimum (or No change suggested) and Computed. Nothing changes until you change the category yourself. Required categories are never included. Until supervisors have reviewed flags it says No reviewed flags yet.

When moderation is unavailable

When moderation is unavailable has one switch, off by default: Hand every bot conversation to a person while moderation is unavailable.

Either way, each affected turn records a Moderation Unavailable event.

The When moderation is unavailable setting with its single switch, off When moderation is unavailable: one switch, off by default.
On for every bot conversation

Once content moderation is on for your workspace, every customer message to your bots and every reply they write is checked on your moderation policy before the customer sees an answer, and uses no AI credits. RapiDesq turns it on region by region; until then the tab shows no Moderation categories, Content moderation or outage settings, and the required safety checks still run on every message. See what content moderation checks.

Personal Information Protection

Personal data masking replaces personal information in customer messages with placeholders before they reach the AI model, and restores it in the reply. Choose the Masking level:

Names are not masked at either level. Your users still see the original message in the conversation, so someone taking over a handed-off chat has what they need to help.

What counts as each kind of data, in plain words:

The AI sees a numbered placeholder in each place, such as [SSN_1], [CC_2], [ACCT_3], [EMAIL_4] or [PHONE_5], and the original is put back into the reply before the customer sees it. System identifiers in the standard 36-character ID format (groups of 8, 4, 4, 4 and 12 letters and digits) are never masked. Masking applies to the bot and to the other AI features that read conversation text, such as reply suggestions and triage. Each masked message records a PII Masked event, whose Level is the masking level. Supervisors in Moderation review see the masked text, exactly as the check saw it.

Prompt Injection Detection

Prompt Injection Detection is always on and cannot be turned off. It spots messages written to subvert the bot, such as “ignore your previous instructions and…”. Whatever you choose below, the customer’s text always reaches the AI marked as the customer’s message, never as instructions.

Attempts are found by content moderation’s Prompt injection category on the platform’s mandatory safety check, which reads every customer message in every workspace, with content moderation’s settings on or off. Where those settings are on for your workspace, you set the category’s sensitivity under Content moderation, and this section names it. Every workspace chooses what happens under When an attempt is detected:

The action is set only here: the Prompt injection category’s row under Content moderation says so instead of offering one, so an attempt is never acted on twice. Built-in phrases also flag a possible attempt as a guardrail event, but never change the conversation. Each decision is an Injection Detected event that names what found the attempt, how sure it was and the action taken. Its What matched reads, for example, “Prompt injection: Content moderation, Medium and above (minimum Low and above)”, or “Possible prompt injection: built-in patterns (a hint, never acted on)” with the level Flagged only. When Hand off to a person hands a conversation over, the agent and Interactions see “A prompt-injection attempt was detected, and your setting hands such attempts to a person”.

Prompt-injection detection cannot be switched off. Every change to When an attempt is detected is recorded in the audit log with who made it.

Prompt-leak protection

If a bot reply contains the bot's own instructions, the reply is replaced with the safe reply before the customer sees it and a Prompt Leak Detected event is recorded. This protection is always on and has no setting. The bot turn shows “Guardrail replaced the reply (the bot's instructions appeared in the reply)”.

The Guardrails tab's Personal data masking level, and Prompt injection detection, always on, with When an attempt is detected set to Replace the reply Personal data masking, and Prompt Injection Detection with what a detected attempt does.

What the Customer Sees

When a guardrail stops or replaces a bot reply, the customer gets one of these fixed replies. They cannot be edited.

WhenThe reply
A guardrail stops or replaces the reply: a restricted topic (including the required topics other than self-harm), a moderation category set to Safe reply, the prompt-injection setting, or prompt-leak protection“I'm not able to discuss that topic. Is there something else I can help you with?”
Content moderation hands the conversation to a person (Escalate to a person or Block and end the bot session)“I can't help with that here, so I'm passing your conversation to a member of our team. They'll be with you shortly.”
The required Self-harm and suicide topic matches“I'm really sorry you're going through this, and I'm glad you reached out. You don't have to face it alone. I'm connecting you with a member of our team now. If you are in immediate danger, please contact your local emergency services.” It names no hotline, because the right number depends on the customer's country.
Your restricted topics could not be checked, so no unchecked reply is sent“I'm not able to answer that right now. Please try again in a moment.”

The replies exist in English, German, Spanish, French, Portuguese and Chinese. With multi-language support on your plan, the customer gets the reply in their own language when the conversation knows it, otherwise in your workspace's default language. Without multi-language support the reply is always in your workspace's default language.

Rate limits send their own messages; see What the visitor sees when limited.

Guardrail Events

Guardrail Events lists what was caught, newest first, with its Type, Level, What matched and Time. It shows the 50 most recent events and updates as new ones arrive. Events are kept for 90 days. An event from a conversation whose ticket you may not see, because of your team's access, is left out. The types are:

TypeWhat happened
Topic BlockedA restricted topic stopped a message before the bot answered.
Topic FilteredA restricted topic replaced the bot's reply.
Topic FlaggedA required safety topic matched in a conversation evaluation; nothing was stopped.
PII MaskedPersonal data was masked before the message reached the AI.
Injection DetectedA message tried to override the bot's instructions.
Prompt Leak DetectedA reply contained the bot's instructions and was replaced.
Moderation FlaggedContent moderation matched a category set to Log only or Flag for a supervisor, or flagged a reply suggestion or @mention bot draft; the turn went on.
Moderation BlockedContent moderation sent a safe reply.
Moderation EscalatedContent moderation handed the conversation to a person.
Moderation UnavailableContent moderation could not be reached for this turn.

Level is the action taken for a topic (for example Replace the reply), the masking level for a PII event (Standard or Strict), or Flagged only for an injection hint. What matched names the topic and how it was found, for example “Warranty decisions: by meaning, 86% sure (bar 80%)” or “Self-harm and suicide: by the platform's patterns”.

The list is empty until something is caught: “No guardrail events yet. Topic matches, masked personal data and flagged messages appear here.” Each conversation's AI Details panel also shows its count of guardrail events, and the Guardrails column of the supervisor's bot conversation list shows the same count (see AI Oversight).

The Guardrail Events section before anything is caught, with its empty-list message Guardrail Events before anything is caught.

Compliance Events (Owners)

Owners also see Compliance events on the Guardrails tab; it needs the tenants.compliance:read permission, which only Owners hold. This is the legal-grade record of every match on a required compliance topic, with its Time, Topic, Severity, Action and Feature. It lists the 50 most recent records; a record from a test workspace carries a Test mark.

Until a required topic has matched, the section says “No compliance events recorded for this tenant.”

The Compliance events section on the Guardrails tab, shown to owners, before any required topic has matched Compliance events, shown to owners.
Guardrails are safety nets, not a substitute for a good prompt

Guardrails catch what is clearly out of bounds. Tone, scope and rules of engagement belong in each agent's prompt, and when to hand off belongs in its hand-off settings. See When the chatbot hands off.

What the audit log records

These guardrail changes appear in the audit log, in its compliance category, with who made them:

Changes to the Default action, the Masking level, the outage switch and restricted topics are not listed there.

Rate Limits per Contact

Admin > Advanced > AI Settings > Rate Limits (Contact AI Rate Limits) caps how many AI tokens one contact can use within a time window. For example, it can stop one visitor from running up your credits. Seeing the list needs the ai:view permission; adding, editing and deleting limits needs ai:manage. Admins and Owners hold both.

Every contact is limited, even before you add a limit

Until your workspace has a default limit of its own, every contact may use up to 200,000 tokens per rolling 24 hours with the bot. Add a default limit to choose your own figure.

  1. Click Add Rate Limit.
  2. Fill in the fields:
    • Name (required, up to 100 characters, and different from every other limit in your workspace). For a named limit (see below) this is the value your identity token sends;
    • Max Tokens: a whole number, at least 1;
    • Time Window: Hour, Day (the default), Week or Month;
    • an optional Rate Limit Message, shown to the contact when they reach the limit. Leave it blank for the default message, which is in English; write your own in your customers' language if they don't read English.
  3. Choose what it Applies to (see Who a limit applies to).
  4. For your workspace-wide limit, keep Default (all contacts) and turn on Default Rate Limit, then click Save.

The list shows each limit's Name, Max Tokens, Time Window, Rate Limit Message and Applies to (Default, Specific contact or blank for a named limit), with edit and delete in Actions. Deleting asks “Are you sure you want to delete this rate limit configuration? Contacts using this tier will fall back to the default limit.”

The Add Rate Limit dialog with name, maximum tokens, time window, message, applies to and default switch A per-contact AI rate limit.

Time windows are rolling

A window counts back from now, not from the start of a calendar period: Hour is the last 60 minutes, Day the last 24 hours, Week the last 7 days and Month the last 30 days. A contact who reaches the limit can use the bot again as their oldest usage in the window ages out.

Only the customer bot's turns count, and the check runs before each turn. So the turn that takes a contact over the limit still completes, and the next one is refused.

Who a limit applies to

When several could apply, the most specific wins: a specific contact's limit, then a named limit from the visitor's identity token, then your default limit, then the platform's 200,000 tokens per rolling 24 hours. Deleting a limit sends its contacts down that list.

What the visitor sees when limited

When a contact reaches their limit, the bot replies with the limit's Rate Limit Message, or by default “You have reached the AI usage limit. Please try again later.” It replies the same way to every later message until the window rolls on. The conversation is not handed to a person and no ticket is created, so make your message tell the visitor how else to reach you.

Separately from token limits, one visitor can hold at most 20 bot conversations per hour. A visitor who opens more gets “You've started several conversations in a short time, so I can't take on another one right now. Please try again a little later.” This cap has no setting.

Example: a daily limit for website visitors

To stop any website visitor using more than a day's fair share, follow these steps:

  1. Add “Website visitors” with 50,000 tokens per Day.
  2. Set it to apply to Default (all contacts) and switch on Default Rate Limit.
  3. Set the message “You've reached today's limit for the assistant. Please try again tomorrow, or email our support team.”
  4. Click Save.
The Rate Limits tab listing the Website visitors limit of 50000 tokens per day, marked as the default The saved limit on the Rate Limits tab, marked as the default.

Troubleshooting

A setting will not save

The category wizard refuses an example or a test

The bot answers differently than expected