Skip to main content

PII Anonymization

The PiiGuard scrubs personally identifiable information from messages before they reach the LLM, preventing accidental PII exposure in model interactions.

Configuration

Built-in PII Types

Actions

Integration

As a beforeLLMCall hook (scrubs every roundtrip)

As an Input Guardrail

Custom Patterns

Rehydration

When rehydrate: true, the guard maintains a mapping of placeholders to original values. Call guard.rehydrate(text) on the final output to restore PII before returning to the user.