PII redaction in prompts
redactPattern-match on field name or value. Replace with a typed placeholder. The model sees {{ssn}} instead of 123-45-6789, gives a coherent response, and the governance log records exactly which fields were redacted.
- id: redact-ssn
match:
event_type: llm_request
payload:
- field: prompt
operator: regex
value: '\\b\\d{3}-\\d{2}-\\d{4}\\b'
action: redact
replacement: "{{ssn}}"
severity: high