Skip to content

Policy Engine Administration

The Arbitex policy engine evaluates every AI request against an ordered sequence of policy packs. Each pack contains rules that match on request properties (groups, entity types, content patterns, and more) and apply an action when matched. This guide covers all policy administration tasks available under Admin → Policy.

  • Policy pack — a named collection of rules. Two types exist: bundle packs (managed by Arbitex, read-only) and custom packs (defined by your org, fully editable).
  • Policy rule — a condition/action pair within a pack. Each rule specifies when it fires (conditions) and what to do (action). Rules within a pack are evaluated in sequence order.
  • Policy chain — the ordered list of packs evaluated for every request. Evaluation proceeds top-to-bottom across packs, and within each pack, rule by rule in sequence order.
  • Combining algorithm — controls how the chain resolves multiple matching rules (first match wins vs. deny overrides).

Navigate to Admin → Policy → Packs to see the full list of policy packs.

TypeIconDescription
BundleLockArbitex-managed compliance pack. Read-only; you can enable or disable it but cannot add, edit, or delete its rules. Labeled Managed by Arbitex.
CustomOrg-defined pack. Full CRUD access to rules.

Click the expand arrow on any pack row to see its rules. Each rule row shows:

  • Sequence number
  • Rule name
  • Direction (input / output / both)
  • Action type badge
  • Active / inactive status
  • Edit button (custom packs only)
  1. Navigate to Admin → Policy → Packs.
  2. Click New Pack.
  3. Enter a Name and optional Description.
  4. Click Create. The pack is created with is_active: true and added to the list.

Toggle the active/inactive switch on any pack row to enable or disable it without deleting it. Disabled packs are skipped during chain evaluation.

Click Delete on a custom pack row and confirm. Bundle packs cannot be deleted.

Terminal window
# List all policy packs
GET /api/admin/policy-packs/
# Create a custom pack
POST /api/admin/policy-packs/
{
"name": "Engineering Overrides",
"description": "Custom rules for the engineering group",
"pack_type": "custom",
"version": "1.0",
"is_active": true
}
# Update a pack (name, description, is_active)
PUT /api/admin/policy-packs/{pack_id}
# Delete a custom pack
DELETE /api/admin/policy-packs/{pack_id}

Rules live inside custom packs. Click the expand arrow on a custom pack row, then click + Add Rule to open the rule editor.

Each rule can match on any combination of the following conditions. All specified conditions must match for the rule to fire (logical AND).

ConditionTypeDescription
User groupsTag listMatches requests from users who belong to any of the listed groups (logical OR within the list)
Entity typesMulti-select chipsMatches when the DLP pipeline detects any of the selected entity types in the request content (e.g., credit_card, ssn, api_key, bearer_token)
Entity confidence minSlider (0–1)Only shown when entity types are selected. Minimum confidence score for the detection to trigger the rule.
Content regexText + Test buttonMatches when the request content matches the provided regular expression. Click Test to validate the regex against a sample string using /api/admin/dlp-rules/test.
ProvidersMulti-select chipsMatches requests routed to any of the selected AI providers
ModelsTag listMatches requests targeting any of the listed model IDs
User risk score minNumber (0–1)Matches users whose calculated risk score meets or exceeds this threshold
ChannelCheckboxesMatches requests from interactive (web UI) or api (programmatic) channels, or both
Intent complexityRadio (simple / medium / complex)Only shown when no entity types are selected. Matches based on the detected complexity of the user’s intent.

A rule with no conditions matches all requests.

Specify when the rule applies:

  • Input — evaluate on the user’s prompt before it is sent to the model
  • Output — evaluate on the model’s response before it is returned to the user
  • Both — evaluate on both the prompt and the response

Each rule has exactly one action:

ActionDescription
ALLOWExplicitly permit the request. Stops evaluation (terminal).
BLOCKReject the request. Optional: provide a custom message returned to the user. Terminal.
CANCELCancel the in-flight model call and return an error. Terminal.
REDACTReplace matched content with a redaction string (default: [REDACTED]). You can set a custom replacement string. Non-terminal — evaluation continues after redaction.
ROUTE_TORedirect the request to a specified tier (haiku / sonnet / opus) and optionally a specific model. Terminal.
PROMPTSurface a challenge message to the user before proceeding. Terminal.
ALLOW_WITH_OVERRIDEPermit the request but record that the user acknowledged a policy notice. Provide the notice message. Terminal.
  1. Expand a custom pack and click + Add Rule (or the edit pencil on an existing rule).
  2. Enter a Rule Name.
  3. Set the Direction (input / output / both).
  4. Configure one or more Conditions.
  5. Select an Action and fill in any action-specific fields.
  6. Click Save Rule.
Terminal window
# Create a rule in a pack
POST /api/admin/policy-packs/{pack_id}/rules/
{
"name": "Block SSN in output",
"applies_to": "output",
"conditions": {
"entity_types": ["ssn"],
"entity_confidence_min": 0.85
},
"action": "BLOCK",
"action_config": {
"message": "Social security numbers cannot be returned in responses."
},
"is_active": true
}
# Update a rule
PUT /api/admin/policy-packs/{pack_id}/rules/{rule_id}
# Test a regex condition
POST /api/admin/dlp-rules/test
{ "pattern": "\\b\\d{9}\\b", "sample": "My SSN is 123456789" }

The policy chain defines the evaluation order of packs. Navigate to Admin → Policy → Chain to manage it.

Packs are evaluated top-to-bottom. Within each pack, rules are evaluated in sequence order. The first terminal match (BLOCK, CANCEL, ALLOW, ROUTE_TO, PROMPT, ALLOW_WITH_OVERRIDE) stops evaluation. REDACT is non-terminal and does not stop evaluation.

Drag a pack card to a new position using the drag handle, or use the / buttons to move a pack up or down in the chain. Changes take effect after you save.

AlgorithmBehavior
First match (first_applicable)The first terminal rule that matches determines the outcome. Recommended for most organizations.
Deny overrides (deny_overrides)Any BLOCK or CANCEL match in any pack overrides ALLOW matches. Use when strict blocking policy is required.

Select the algorithm from the dropdown in the chain editor header.

Use the Group filter dropdown to preview how the chain applies to a specific group. When a group is selected:

  • Packs containing rules that match the group are highlighted with a Has rules for this group badge.
  • Non-matching packs are dimmed.
  • A posture summary shows the count of ALLOW, DENY (BLOCK/CANCEL), and REDACT rules from matching packs.

The selected group is saved to sessionStorage and used to pre-fill the group field in the Policy Simulator.

Click Save Chain to persist the current pack order and combining algorithm.

Terminal window
PUT /api/admin/policy-chains/org
{
"packs": [
{ "id": "<pack-uuid>", "sequence": 1 },
{ "id": "<pack-uuid>", "sequence": 2 }
],
"combining_algorithm": "first_applicable"
}

The simulator lets you test the policy chain against a sample request before deploying changes. Navigate to Admin → Policy → Simulator.

  1. Enter a Prompt — the text content to evaluate.
  2. Optionally select a Provider and enter a Model to test provider/model-specific rules.
  3. Add one or more User groups to simulate the groups the requesting user belongs to. If you set a group filter in the chain editor, it pre-fills here.
  4. Click Run Simulation.

The result panel shows:

FieldDescription
ActionThe final decision (ALLOW / BLOCK / CANCEL / REDACT / ROUTE_TO), color-coded
Matched packThe name of the pack that produced the terminal match
Matched ruleThe name of the specific rule that fired
Match reasonA human-readable explanation of what condition triggered the match
Action detailsJSON payload of the action configuration (e.g., the BLOCK message or the ROUTE_TO tier)

Below the result, the Evaluation trace shows every pack and rule evaluated, in order. Each row shows:

  • Pack name → rule name
  • Pass (✓) or fail (✗) indicator
  • “group match” tag when the user_groups condition was the trigger

Use the trace to understand why a particular rule fired and which earlier rules were skipped.

Terminal window
POST /api/admin/policy-chains/simulate
{
"prompt": "My SSN is 123-45-6789",
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"user_groups": ["engineering", "contractors"]
}
# Response:
{
"matched": true,
"matched_pack_name": "PCI-DSS Bundle",
"matched_rule_name": "Block SSN in input",
"action": "BLOCK",
"match_reason": "Entity type ssn detected with confidence 0.97",
"evaluation_trace": [
{
"pack": "Allow All Bundle",
"rule": "Default allow",
"passed": false,
"tags": []
},
{
"pack": "PCI-DSS Bundle",
"rule": "Block SSN in input",
"passed": true,
"tags": ["group match"]
}
]
}

The Pattern Browser under Admin → Policy → Patterns shows all active DLP detection patterns and allows you to create org-specific regex-based patterns.

Patterns are organized by category:

  • secret — API keys, tokens, credentials
  • pii — names, emails, phone numbers, government IDs
  • financial — card numbers, bank accounts, routing numbers
  • medical — diagnoses, drug names, patient identifiers
  • infrastructure — IP addresses, hostnames, internal URLs

Use the category filter chips and search box to locate patterns. Each PatternCard shows the pattern name, entity type, confidence threshold, and action tier badge.

TierBehavior
log_onlyLog the detection event; allow the request to proceed unmodified
redactReplace the matched content with a redaction marker
blockBlock the request
promptSurface a challenge to the user before proceeding
  1. Navigate to Admin → Policy → Patterns.
  2. Click New Pattern.
  3. Fill in the fields:
FieldDescription
Detector nameHuman-readable identifier for this pattern
Entity typeThe semantic category this pattern detects (e.g., internal_project_code)
Action tierWhat happens when the pattern matches (log_only / redact / block / prompt)
Confidence thresholdMinimum match confidence (0–1, step 0.05) required to trigger the action
Regex patternA valid Python-compatible regular expression
  1. Click Save Pattern.
Terminal window
# Create a custom regex DLP pattern
POST /api/admin/dlp-rules/
{
"detector_name": "Project codename detector",
"detector_type": "regex",
"entity_type": "internal_project_code",
"action_tier": "redact",
"enabled": true,
"confidence_threshold": 0.9,
"config_json": {
"pattern": "\\bPROJ-[A-Z]{2,6}-\\d{3,6}\\b"
}
}