Single-policy documents
Verdictan supports two top-level declarative structures:
ConfigDocumentfor complete gateway configurations withpack,policies, and optionalprovidersSinglePolicyDocumentfor one of four standalone policy structures
A single-policy document lets you lint and test one supported policy without a
complete gateway configuration. A running gateway uses a complete
ConfigDocument with pack and policies.chain.
Supported policy types
Only these four policy types support the standalone document structure:
prompt-injectionagent-firewallcitation-verifierquality-scorer
Shared structure
Each single-policy document starts with a policy data object.
policy:
name: prompt-injection
version: 1.0.0
enabled: true
| Field | Type | Necessary | Description |
|---|---|---|---|
policy.name | string | yes | The value must be one of the four supported standalone policy types. |
policy.version | string | yes | This field contains a SemVer string. |
policy.enabled | boolean | yes | This field enables or disables the standalone policy. |
A single-policy document can have no pack, policies.chain, or providers.targets top-level object.
Prompt injection document
policy:
name: prompt-injection
version: 1.0.0
enabled: true
detection:
embedding_threshold: 0.8
attack_patterns:
- "ignore.*previous.*instructions"
- "forget.*system.*prompt"
encoding:
decode_base64: true
normalize_unicode: true
detect_homoglyphs: true
boundaries:
enforce_delimiters: true
reject_fake_boundaries: true
response:
action: block
This structure has these top-level sections:
detectionencodingboundariesresponse
Agent firewall document
policy:
name: agent-firewall
version: 1.0.0
enabled: true
tools:
roles:
analyst:
allowed:
- "search_*"
- "read_*"
denied:
- "delete_*"
admin:
allowed:
- "*"
rate_limits:
default: 60
search_records: 120
transaction_limits:
max_single_transaction: 10000.0
max_daily_total: 50000.0
require_approval_above: 5000.0
kill_switches:
halt_on_pii_in_action: true
halt_on_suspicious_pattern: true
max_actions_per_session: 500
This structure has these top-level sections:
toolsrate_limitstransaction_limitskill_switchesmax_actions_per_session
Citation verifier document
policy:
name: citation-verifier
version: 1.0.0
enabled: true
verification:
require_source_match: true
min_groundedness: 0.8
extract_patterns:
- academic
- url
rag_context:
verify_against_context: true
min_context_overlap: 0.7
output_action:
unverified_action: flag
response:
include_verification_report: true
This structure has these top-level sections:
verificationrag_contextoutput_actionresponse
Quality scorer document
policy:
name: quality-scorer
version: 1.0.0
enabled: true
benchmarks:
ragas_faithfulness: true
ragas_relevancy: true
assertions:
- type: contains
config:
value: "source"
- type: word-count
config:
min: 50
- type: llm-rubric
config:
rubric: "The answer should be accurate, concise, and grounded in evidence."
threshold: 0.8
thresholds:
min_aggregate: 0.75
min_faithfulness: 0.75
weights:
faithfulness: 0.4
relevancy: 0.35
bleu: 0.25
failure_action:
action: block
This structure has these top-level sections:
benchmarksassertionsthresholdsweightsindustry_profilesfailure_action
Document differences
| Capability | Full config | Single-policy doc |
|---|---|---|
pack metadata | yes | no |
policies.chain | yes | no |
| Multiple policies | yes | no |
| Tests for one standalone policy | possible | ideal |
Validation workflow
Lint the standalone file with the command that you use for a complete configuration:
verdictan policy lint --file prompt-injection.yaml
Move to a full configuration
When a complete configuration is necessary, move the policy-specific sections into policy.<kind>. Add a pack object and a policies.chain list:
pack:
name: example-gateway
version: 1.0.0
enabled: true
policies:
chain:
- prompt-injection
policy:
prompt-injection:
embedding_threshold: 0.8
response:
action: block