Banned term in output
This page explains what the Banned term in output rule checks, what it needs, and how to set it up.
Definition
Banned term in output (banned_term) flags a model completion that mentions something it must not, such as a competitor, an internal codename, or a deprecated product.
Property | Value |
Key |
|
Unit | span (one model call) |
Check kind | deterministic |
Category | Output integrity |
Score type | Pass or fail |
Default severity | HIGH |
The rule checks only LLM spans. It fails a span when the completion matches the pattern you enter in Banned terms. When the completion doesn't match, the span passes.
When a span fails, the finding records:
- The output length as the observed value.
- An excerpt of the text, up to 500 characters.
- A reasoning sentence that names your pattern, for example: "completion matches the banned pattern (?i)\b(acme|globex)\b".
Why it matters
A banned term in a reply can reach your users even when the call itself works. This check doesn't call a model, so it costs little to run on all your traffic. If findings suddenly rise, a prompt change is usually the cause, not a change in what your users ask.
What it requires
- LLM spans in your telemetry. The rule only checks model calls. To start sending traces, see Instrument your code.
- Permission to change rules. To create the rule, you need the modify permission on the project. For details, see Project permissions.
- A value for Banned terms. This parameter is required and has no default. Enter an RE2 regular expression. The rule matches it against the completion.
Because the check doesn't call a model, it doesn't need a judge or classifier model.
Configuration examples
Set up the rule
For the full procedure, see Create a rule. The steps for this rule are:
- On the Rules page, select + New rule.
- On the New rule page, in Search templates, enter
banned_term. You can also select the Deterministic chip or choose Output integrity in the Category rail.
- On the Banned term in output card, select Configure ›.
- On the Configure rule page, fill in the fields shown in the following table.
- Select Save & enable.
Field | What to enter |
Name | Keep the suggested name or enter your own. Each name must be unique in your tenant. |
Project | The project this rule watches. |
Severity | HIGH by default. Choose LOW, MEDIUM, HIGH, or CRITICAL. |
Banned terms | Your pattern, for example |
Under the Banned terms field, select the example to insert it into the field, and then edit it.
If you save without a pattern, the form shows "Banned terms is required." The browser doesn't check whether your regular expression is valid.
Use word boundaries
Wrap your terms in \b so they match only whole words. Without \b, a short term also matches inside longer words.
Pattern | Does "placement" match? |
| Yes, because "ace" appears inside the word |
| No |
Example patterns
Pattern | Use |
| Two competitor names. The form shows this pattern as its placeholder. |
| A longer list of names. The form offers this pattern as its example. |
Related
- Refusal detected also matches a pattern against the completion, but it looks for refusal phrases.
- Personal data in completion uses a classifier to find personal data that a pattern can't catch.
- Expected format absent fails a completion that doesn't match a pattern.
- Missing citation fails a completion that has no citation marker.
Next steps
- Create a rule
- Rules overview
- Explore traces to find the traces this rule flagged

Have a suggestion?