Skip to main content
Checks inspect model inputs and outputs. Use them to measure response quality, detect policy violations, remove sensitive data, or stop unsafe content before it continues through your application.
Saved checks with their direction, action, and scope
Each row shows what the check reads, the engine it uses, the action it takes, its scope, and its activity over the last 24 hours.

Start from a template

When you have no checks, Rules shows a gallery of common starting points. Select a template to add a pre-filled draft, then review it before saving.
The check template gallery
After you save your first check, open New check to find the same templates and custom options.
The New check picker with templates and a description pane
The description pane explains what each template detects and what its default action will do.
The Answer quality template and its score action

Choose an action

The action determines when a check runs and whether it can change the call. Score checks are stored and run differently from enforcement checks. Changing a saved check between Score and another action creates a new check, so its previous activity history is not carried over.

Choose an engine

Fast checks

Use a fast check when the rule is a yes/no question about the text: is this a prompt injection, is it abusive, does it ask for medical advice. A decision model scores each category from 0 to 1, and the check fires when a score reaches its threshold. Fast checks can flag or block; they cannot redact, because they score the text as a whole rather than pointing at the part to remove.
A fast check with its categories, model, and on-error setting
Add Opper’s presets, your own categories, or both: For a category of your own, give it a short name and one sentence that is true when the text should be caught, such as medical and “The text asks for medical advice.” Thresholds. Presets use thresholds Opper calibrates for each decision model on public benchmarks, because scores are not comparable across models. Your own categories fire at 0.5. Select Set thresholds yourself under the categories to set a threshold for a category; a threshold you set applies on every model. Tool results. On input, a fast check reads the user’s messages and the tool results added since the model last answered, and scores the two apart. Prompt injection asks tool results its own question, because instructions hidden in an email or a web page rarely look like an attack.

LLM checks

Use an LLM check when the rule depends on meaning or context, for example tone, intent, toxicity, or whether an answer addressed the question.
An LLM check with an action, direction, criteria, and scope
The model picker: Default, the recommended models, then every model your rules allow
Every check model is admitted by your model access rules, including zero data retention, like any model call you make. With Default, a recommended model your rules refuse is skipped and the next one is tried. If no model your rules allow can answer, the check follows On error, and Rules shows that the check could not run. LLM checks are billed at the price of the model that answers.
On error defaults to allow: if no model can answer, the call continues without the check. Choose block for checks the call must not skip. The failure is recorded on the trace when trace storage is enabled.

Regex checks

Use a regex check for predictable formats such as email addresses, credit card numbers, SSNs, and API keys. Regex checks do not call a model and cannot use the Score action.
A regex check with patterns and a replacement value
Select a pattern chip to edit and test it.
The regex pattern editor with validation and a match tester
Test the pattern with examples that should match and examples that should not.

Redaction behavior

When the action is Redact, a regex check replaces each match with *** by default. An LLM check uses [REDACTED]. Enter a replacement value if you want a different result. If an LLM check detects a violation but cannot identify the exact text to replace, Opper flags the call instead of changing its content. This can happen with broad findings such as toxicity.

Score checks

Choose Score to evaluate response quality after a call completes.
A score check with score type, threshold, sampling, and criteria

Score type

Sampling

Sampling controls how many outputs the judge evaluates and therefore how much the check costs. Adaptive sampling keeps evaluation costs more predictable during traffic spikes. If its counter is unavailable, Opper evaluates every output rather than silently skipping them.
Score checks need stored outputs. They do not run when effective retention is unset or set to 0 days. See Opper retention.
The judge model is managed by Opper and billed at the same flat rate for checks. Disabling a score check stops queued evaluations before the next judge call begins.

Run a check on request

A check set to Runs: on request stays off until a call names it in the X-Opper-Guards header, by its handle (shown on the check, for example prompt-injection) or its id. Checks set to Always run on every call either way.
Name several checks with commas, up to 8 per call. A name that matches no enabled check in the project is refused with a 400, so a typo never runs the call unchecked. A call a check blocks is answered with 400 content_blocked and the reason, for example:

Set the scope

Run a check across the organization or limit it to selected projects. If you choose Projects, select at least one project before saving.

When checks overlap

Every matching check runs; there is no priority order. If several checks apply to the same call, the strictest result wins. One blocking result is enough to reject the call. Rules highlights checks with the same name and overlapping scope so you can confirm that the overlap is intentional.
Opper evaluates up to 32 checks per request, counting input and output together. Any additional checks are skipped.

See checks in Logs

In Logs, each request shows the checks that ran on it, their cost, and whether any flagged or blocked it. A request a check blocked appears too, with the check that stopped it. Open a request to see each check’s model, latency, cost, and verdict. What a check found, such as a category and its score, follows the request’s retention like the rest of its content.

Disable a check or review activity

Use a row’s toggle to stop a saved check without deleting its configuration. Disabled checks stop immediately and are excluded from validation until you enable them again. The activity label covers the last 24 hours:
Start a new enforcement check with Flag. Review its matches before switching to Block or Redact. Changing the action does not change the price: the same model runs either way.
Last modified on October 14, 2026