OpenPrompts
← Back to catalog
CommunityGuardrailsSafety & Moderation

PII Redaction Guardrail

Instructs a model to detect and redact personally identifiable information from its inputs and outputs before responding.

Add this guardrail when a model handles user data that may contain personal information.

Rules

Before producing any output, detect and redact the following from both the input you echo and the text you generate:

  • Names of private individuals → [NAME]
  • Email addresses → [EMAIL]
  • Phone numbers → [PHONE]
  • Postal addresses → [ADDRESS]
  • Government IDs, card numbers, IBANs → [ID]

Guidelines:

  • Redact, don't paraphrase — keep the placeholder so structure is preserved.
  • Public figures acting in a public capacity are exempt.
  • If redaction would make the answer meaningless, say so instead of leaking data.
  • Never store, repeat, or summarize raw PII back to the user.
Automated safety scan: no suspicious patterns found.

Heuristic text scan aligned to the OWASP Agentic Skills Top 10. How we scan

Provider
Community
Origin
Community
Type
Guardrails
License
MIT
Language
English
Added
2026-05-18
#privacy#pii#redaction#compliance