Home / Guides / deterministic-email-tokens
Designing deterministic [EMAIL_n] tokens for LLM traces
How stable [EMAIL_1]-style tokens keep support and debugging possible while keeping raw PII out of ChatGPT, Claude, and OpenAI request logs.
Published 2026-08-10 · NoeticGuard engineering notes
Random redaction ([REDACTED]everywhere) destroys the model's ability to refer to “the same person” twice. Stable tokens fix that. Within a vault session, identical emails (and other values of the same kind) also reuse one placeholder — so the outbound prompt does not restate the same raw PII string over and over, while your team can still unmask locally after the response.
Design rules
- Scope tokens to a vault session (conversation, request, or ticket) — not global forever across all customers.
- Prefer typed labels:
[EMAIL_1],[CREDIT_CARD_1]— models learn the pattern quickly. - Keep the vault off the LLM path: only your process holds email↔token maps; unmask after the response if the UI needs originals.
- On serverless, persist the vault (Redis/DB) so multi-step agents do not renumber mid-flight.
NoeticGuard implements this pattern in maskPii / unmaskPii. See Tokenization & vault and the OpenAI masking guide.