Some of your incoming prompts may include personally identifiable information (PII). With Prediction Guard’s PII anonymization feature, you can detect PII such as names, email addresses, phone numbers, credit card details, and country-specific ID numbers like SSNs, NHS numbers, and passport numbers. Here’s a demonstration of how this works:
This outputs the PII entity and indices of where the info was found:
To maintain utility without compromising privacy, you have the option to replace PII with fake names and then forward the modified prompt to the LLM for further processing:
The processed prompt will then be:
Other options for the replace_method
parameter include: random
(to replace the detected PII with random character), category
(to mask the PII with the entity type) and mask
(simply replace with *
).