Skip to main content
The governance engine is PromptWall’s core — a deterministic decision pipeline that produces one of four outcomes for every request:
ActionMeaning
allowAnswer passes all checks; return as-is
rewriteAnswer modified (caveats added, content redacted)
regenerateAnswer rejected; LLM asked again with stronger grounding
blockPolicy violation; no answer returned

The deciders

1

Scanner

Regex + heuristics on input. Blocks known injection patterns.
2

Policy engine

Tenant-specific allow/block rules. Highest priority.
3

Judge (LLM)

Validates answer consistency with source data.
4

Evidence evaluator

Confidence scoring + secret pattern detection.
5

Enforcement

Combines all signals into the final governance_action.

Configuration

Set POLICY_MODE per deployment:
  • enforce (default) — apply decisions as-is
  • observe — log decisions but always allow (shadow mode, useful for rollout)

Custom policies

In the dashboard, create policies per tenant with:
  • Pattern matchers (regex)
  • Keyword lists
  • Severity (low / medium / high / critical)
  • Action (allow / rewrite / block)
Policies are evaluated in order. First match wins.