Skip to main content

PII Protection

WizChat automatically detects and redacts personally identifiable information (PII) from conversations before storing them. This protects your end users' sensitive data across all storage systems.

How It Works

WizChat uses a two-tier detection system that runs on every message:

Tier 1 — Pattern Matching

Fast, deterministic regex-based detection for structured PII patterns. Runs in under 1 millisecond with zero API cost.

Tier 2 — AI Classification

Contextual PII classification powered by a lightweight language model, piggybacked on the existing input processing step. This catches unstructured PII like names mentioned alongside sensitive context, health conditions, and other data that patterns alone can't identify.

What Gets Redacted

When PII is detected, sensitive data is replaced with type-specific placeholders before storage. The chatbot still sees the original message to generate a quality response — only the stored version is redacted.

Data TypeReplacement
Credit card numbers[CREDIT_CARD_REDACTED]
Social Security Numbers (SSN)[SSN_REDACTED]
API keys and tokens[API_KEY_REDACTED]
Passwords[PASSWORD_REDACTED]
Bearer tokens[BEARER_TOKEN_REDACTED]
AWS access keys[AWS_KEY_REDACTED]
Private keys (PEM)[PRIVATE_KEY_REDACTED]
Database connection strings[CONNECTION_STRING_REDACTED]
Phone numbers[PHONE_REDACTED]
IBAN numbers[IBAN_REDACTED]
IP addresses[IP_REDACTED]
Dates of birth[DOB_REDACTED]
Passport / ID numbers[ID_REDACTED]

What Is Kept

Email addresses are intentionally preserved. They are needed for user identification in analytics and are not considered high-risk PII in the context of chatbot conversations.

Where Redaction Applies

PII redaction is applied across all storage and transit paths:

Storage LocationRedacted
Query Log (Questions & Answers)
Conversation History
Long-term Memory (extracted facts)
Short-term Memory (graph nodes)
Cost & Usage Analytics
Observability Traces

Query Log PII Badge

When a message is flagged as containing PII, the Query Log displays a PII Detected badge on the affected row. This helps chatbot owners identify conversations that contained sensitive information.

End users are informed about conversation monitoring through the cookie consent dialog, which states:

"We use cookies for analytics and conversations may be reviewed to improve answer quality."

This satisfies GDPR's requirement for transparent, upfront notice before data collection begins.

GDPR Compliance

WizChat's PII protection supports GDPR compliance by:

  • Minimizing data collection — sensitive data is redacted before storage, not after
  • Transparent processing — users are informed via the consent dialog
  • Access controls — user emails are masked in the Query Log (displayed as j***n@example.com)
  • Data retention — all conversation data has automatic retention limits based on your plan
  • Right to deletion — contact support to request deletion of specific user data

Limitations

  • PII detection relies on pattern matching and AI classification, which may not catch every instance
  • The chatbot's live response still processes the original unredacted message for answer quality
  • Historical data stored before PII protection was enabled is not retroactively redacted
  • Very short inputs (under 8 characters) skip PII detection to avoid false positives