Author describes deterministic HMAC tokenizing PII in LLM prompts

pub.towardsai.net9 min read

The author explains a practical method for removing personally identifiable information, such as names, emails, and phone numbers, from LLM prompts using deterministic HMAC-SHA256 tokens before they leave local systems. This approach preserves conversational joinability for the model while keeping the mapping data secure and separate. The implementation details using AWS KMS for generating HMAC keys or data keys are also demonstrated. Open article →