Government

Map U.S. federal AI controls for access, sensitive records, citations, human review and evidence.

Industry starter · Sovereign region

What it checks

Policies in the Government template, in the order the gateway runs them
PolicyOnChecksAction
prompt-injectionRequest4 attack patterns; similarity threshold 0.84Block
rbacRequestRequires the X-User-ID, X-Org-ID and X-PIV-Auth headersBlock
pii-detectorRequest8 custom identifier patternsRedact
dlp-filterRequest9 blocked terms such as “FOUO” and “CUI”; 5 custom patterns; classification markers; near-miss spellingsBlock
agent-firewallBothAllows 3 tools; denies 6 tools; at most 3 actions per sessionBlock
safety-filterRequestBuilt-in government patterns; 7 extra blocked phrases such as “ignore statute” and “override procurement rules”; near-miss spellingsBlock
bot-detectorRequestMore than 8 similar requests in 300 seconds; similarity ≥ 0.88Block
citation-verifierResponseRequires cited sources; confidence ≥ 0.95; groundedness ≥ 0.94Block
quality-scorerResponseAccuracy ≥ 0.95; relevancy ≥ 0.92; combined score ≥ 0.93; at least 300 characters and 3 sentences; government profileBlock
audit-loggerRequestAdds an allow-only audit marker to the decisionRecord
Policy YAML
pack:
  id: "cfg_demo_government"
  name: "demo-government"
  version: "0.2.0"
  enabled: true
  author: "local"
  description: "US federal government template for FedRAMP, CUI, FOIA, and source-checked decision support"
distributed_rate_limit:
  backend: valkey
  url_env: VERDICTAN_REDIS_URL
history:
  capture:
    enabled: true
    mode: redacted
    include_blocked: true
    fail_open: false
policies:
  chain: ["prompt-injection", "rbac", "pii-detector", "dlp-filter", "agent-firewall", "safety-filter", "bot-detector", "citation-verifier", "quality-scorer", "audit-logger"]

policy:
  prompt-injection:
    embedding_threshold: 0.84
    attack_patterns: ["ignore.*federal.*guidance", "reveal.*system.*prompt", "bypass.*records.*controls", "override.*human.*approval"]
    response: { action: block, message: "Prompt rejected by federal anti-jailbreak controls.", log_level: warn }
  # PIV-backed identity and agency accountability are mandatory before any sensitive workflow proceeds.
  rbac:
    deny_if_missing: ["X-User-ID", "X-Org-ID", "X-PIV-Auth"]
  pii-detector:
    detect_patterns: ["SSN", "EIN", "(?i)(?:case|docket|matter)\\s*(?:#|number|no\\.)\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "FOIA_request_id", "(?i)(?:claim|policy)\\s*(?:#|number|no\\.)\\s*[:#-]?\\s*[A-Z0-9-]{6,20}", "(?i)\\bbenefits?\\s+recipient\\s*[:#-]?\\s*[A-Za-z ,'-]{3,80}", "(?i)(?:taxpayer\\s*id|tin|ein)\\s*[:#-]?\\s*\\d{2}-?\\d{7}", "(?i)\\bpersonnel\\s+(?:file|record|folder)\\b"]
    action: redact
    redaction: { marker_format: label, include_metadata: true, preserve_length: false }
  # FOUO/CUI/SBU/Law Enforcement Sensitive records must not be exposed to the model or downstream users.
  dlp-filter:
    blocked_terms: ["FOUO", "CUI", "SBU", "law enforcement sensitive", "grand jury material", "SSI", "procurement sensitive", "source selection information", "deliberative process"]
    detect_patterns: ["FOIA_case_control", "(?i)\\bbenefits?\\s+determination\\b", "(?i)\\bpersonnel\\s+action\\s+request\\b", "(?i)\\b(?:controlled\\s+unclassified\\s+information|cui)\\b", "(?i)\\binvestigative\\s+(?:file|report|record)\\b"]
    action: block
    fuzzy_matching: true
    max_distance: 1
    sensitivity_level: high
  # Only approved read-only research tools are allowed for government assistance workflows.
  agent-firewall:
    allowed_tools: ["document_search", "foia_search", "regulation_lookup"]
    blocked_tools: ["shell", "code_exec", "browser", "file_upload_external", "database_write", "network_scan"]
    max_actions_per_session: 3
  safety-filter:
    mode: government
    block_if: ["ignore statute", "override procurement rules", "bypass records retention", "issue benefits denial automatically", "skip due process notice", "suppress FOIA release unlawfully", "evade federal oversight"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  # Prevent scripted scraping and automated abuse of citizen-facing government AI systems.
  bot-detector:
    fingerprint_fields: ["user-agent", "x-forwarded-for", "authorization", "body"]
    profile_window_seconds: 300
    similarity_threshold: 0.88
    max_requests_per_window: 8
    action: block
  citation-verifier:
    require_sources: true
    require_source_match: true
    min_confidence: 0.95
    min_groundedness: 0.94
    extract_patterns: ["quote", "statistic", "url"]
    output_action: { unverified_action: block, hallucination_action: block }
    response: { include_verification_report: true }
  quality-scorer:
    industry: government
    min_output_chars: 300
    min_sentences: 3
    benchmarks: { ragas_faithfulness: true, ragas_relevancy: true, coherence: true, completeness: true }
    thresholds: { min_aggregate: 0.93, min_faithfulness: 0.95, min_relevancy: 0.92, min_coherence: 0.91, min_completeness: 0.91, min_accuracy: 0.95 }
    failure_action: { action: block, fallback_message: "Response withheld pending government reviewer approval." }
  audit-logger: {}