Use these controls when you index content that may contain personal data (tickets, Slack history, uploaded files) or when your compliance team sets limits on how long conversation data may be retained. PII masking is configured per knowledge base, under Knowledge Base → Settings → PII Masking. Retention is a workspace setting, under Workspace → Settings → Data Retention.

Turn on PII masking

BeforeQuery detects and masks personally identifiable information before content is stored or forwarded to any LLM — at ingest time (crawled pages, uploaded files, tickets) and at query time (user messages). Masked tokens are replaced with type placeholders like [EMAIL] and [PHONE], and every masking event is recorded in the audit log. Built-in patterns cover: phone numbers, email addresses, credit card numbers, IBANs, IP addresses, and person names.
1

Enable masking

Open Knowledge Base → Settings → PII Masking, turn it on, and tick the categories to mask. It then applies to every surface that knowledge base answers on — widget, APIs, bots, and helpdesk automation.
2

Add custom patterns and an allow-list (optional)

Add regex patterns for proprietary identifiers — customer IDs, license keys, internal hostnames — that the built-in detectors don’t know about. Allow-list terms do the opposite: strings that match a pattern but should never be masked, such as your own support address.
3

Verify on your riskiest source

Sync a ticket or Slack source and spot-check the resulting documents under Knowledge Base → Documents — identifiers should appear as [EMAIL]-style placeholders.
For chat identity, no end-user personal data needs to be stored: the API accepts an opaque user.id, and nothing beyond that opaque identifier is retained.
Enable masking before first indexing PII-heavy sources like resolved tickets — masking applies at ingest, so content indexed earlier is not retroactively masked until re-synced.

Set a conversation retention window

Choose Keep forever (the default) or a rolling 30 / 90 / 365-day window in Workspace → Settings → Data Retention. Conversation data older than the window is purged automatically — no manual cleanup jobs.

Zero-data-retention mode

For the strictest environments, enable zero-data-retention: no conversation data — messages, citations, or feedback — is persisted beyond the active streaming session. It’s compatible with all widget modes and the public API.
Zero-data-retention disables conversation history, feedback-driven ranking, and conversation-level analytics — those features require persisted data.

Plan availability

PII masking and data retention are available on every plan. PII masking is configured per knowledge base; the retention window and zero-data-retention are workspace settings, under Workspace → Settings. See Billing & Plans for what each plan does gate.