Nyraxis/ docs
Providers
Developer documentation

Topic restrictions

Configuration, evaluation scope, and practical limits for topic_restriction.

topic_restriction is the policy type used by the API and policy editor.

What it checks

Classifies LLM input against configured permitted and restricted topics, using zero-shot classification or an available judge.

Configure the policy

Create a policy under Dashboard → Security → Policies. Choose this policy type, set the agent scope, and start in warning mode while you measure results. Use blocking only after verifying the application’s decision gate.

The following is the config object, not a complete policy-creation request:

{
  "valid_topics": [
    "account support",
    "billing support"
  ],
  "invalid_topics": [
    "investment advice"
  ],
  "threshold": 0.3
}

Scope and limits

The current provider checks input, not final output. Empty topic lists provide no meaningful domain restriction. Thresholds belong to the classifier path; a judge fallback uses its configured criteria. Test ambiguous and multi-topic prompts and explicitly evaluate any additional boundary your product requires.

Verify before rollout

Test a representative safe input, a synthetic positive case, and an unavailable-detector case. Inspect evaluation_status, errors, policies_evaluated, findings and allowed. A clean empty finding list is useful only when the required checks completed.

The policy mode determines the decision: warning findings can coexist with allowed: true. Your application must act on a blocking decision before the protected operation. Evaluation does not automatically redact text or cancel an operation that already happened.

On this page