Skip to main content
The Custom Prompt Check guardrail allows you to define custom moderation rules using natural language.
Its purpose is to block instructions that do not meet the criteria you define, ensuring the agent operates within the intended scope.
This guardrail uses an LLM model to evaluate each input and determine whether it matches the conditions described in your control prompt. Custom Prompt Check configuration panel in Devic

What Custom Prompt Check Detects

Custom Prompt Check compares the user’s content against the rule prompt you define.
If the message does not meet the rules or goes beyond the permitted context, the guardrail blocks it before it reaches the model.

Example Use Cases

  • Support agents: prevent questions outside the scope of technical support.
  • Sales agents: discard inquiries unrelated to products or sales.
  • Internal assistants: restrict instructions attempting to trigger unauthorized processes.
  • Specialized chatbots: ensure they only respond within their professional domain.

How to Configure It in Devic

To enable Custom Prompt Check:
  1. Open your agent in Devic.
  2. Go to the ⋮ menu in the upper-right corner.
  3. Select Guardrails.
  4. Click Add guardrail.
  5. Choose Custom Prompt Check.
  6. Write your rules in the Prompt field.
  7. Adjust advanced settings if needed.
  8. Save your changes.

Example Prompt

You can define the conditions under which the guardrail should activate: You are a customer support assistant. Raise the guardrail if questions aren’t focused on customer inquiries, product support, and service-related questions.

Advanced Configuration

Model

Allows you to select the LLM that will analyze inputs.
Devic recommends using gpt-4.1-mini, which offers good accuracy at low cost.

Confidence Threshold

Defines the minimum confidence level (0.0 to 1.0) required to activate the guardrail.
A typical value is 0.70:
  • ≥ 0.70 → the message violates the rule and is blocked.
  • < 0.70 → the message is allowed to pass through to the agent.

Next Step

Discover how to launch and manage your agents’ execution directly through Devic’s public API.