Protocols & Infrastructure

What Is PII Masking in AI Assistants?

Finding personal data such as emails, phone numbers and card numbers in text, and replacing it with placeholders before an AI model reads it or it is stored.

PII (personally identifiable information) is data that can identify a person: an email address, phone number, card number, bank account, IP address or name. Customers paste it into support chats all the time. PII masking scans the text and swaps each match for a placeholder such as [EMAIL] before the text goes any further.

Where masking runs matters. Masking after the model call has already sent the raw data to the model provider, and masking only on display still stores it. The useful version runs before every model call and before storage.

Most masking is pattern-based, with custom patterns for your own identifiers such as account IDs. Patterns are fast and predictable but not perfect, so masking reduces exposure rather than removing it. It pairs well with zero data retention, which controls what is kept.

In Kelu

How Kelu uses this

PII masking is switched on per knowledge base, on every plan. It covers emails, phone numbers, card numbers, IBANs, IP addresses, names after a title such as Dr, and your own regex patterns. Indexed content is masked before it is stored or embedded; widget, public chat API and Ask questions before storage and before any model sees them. Questions from bots, the form deflector, helpdesk automation, MCP and the search API are not masked. See PII and zero retention.

From definition to deployment

Connect a knowledge source and see cited AI answers on your own content in minutes — free, no credit card required.

Free to start · No credit card required