LLM Anonymizer
LLM Anonymizer finds the personal data you choose in a text, such as names, ID numbers, emails or phone numbers, with the help of an AI model, and replaces it with made-up values of the same kind: a name with another name, a phone number with another phone number. The text still reads naturally, but no longer identifies anyone.
When to use it
- You want to analyse customer conversations with an external service without sharing their personal data.
- You need realistic texts for testing or training based on real cases.
- You are going to store complaints or emails in a shared system where names and contact details must not appear.
Configuration
| Field | What it does |
|---|---|
| Datos | The record or list of records that contain the text. |
| Data key to anonymize | The record field that holds the text. Default: text. |
| Entities | The kinds of data to find and replace. Default: PERSON, DNI (Spanish ID number), EMAIL_ADDRESS and PHONE_NUMBER. You can also choose ORGANIZATION, LOCATION, DATE_TIME, IBAN and CREDIT_CARD. |
| Result Key | The field where the anonymised text is stored. Default: text_anonymized. |
| Entities Result Key | The field where the data found is stored, grouped by kind. Default: entities_anonimized. |
| Modelo de Lenguaje | The language model that looks for the personal data. Connect a model component here. |
Advanced options
| Field | What it does |
|---|---|
| Prompt template | The instructions the model receives to find the data. If you change them, keep {entities} (the chosen kinds) and {Data} (the text). |
| Remark Anonimization | Wraps each replaced value in *** so you can see which parts changed. Off by default. |
| Use Word Boundaries | Replaces whole words only, so parts of other words are not changed. On by default. |
Output
The Datos output returns the same records with two new fields: the anonymised text (in Result Key) and the personal data found (in Entities Result Key). Records with no text in the chosen field pass through unchanged.
The made-up values are chosen at random, so the change cannot be undone from the result.
If the model fails or does not answer with the list of data found, the component stops with an error instead of letting the text through without anonymising it.
Example
A quality team wants an external tool to classify complaints without seeing customer data.
- Connect the complaints to Datos and keep
textin Data key to anonymize. - In Entities, keep the defaults and add
IBAN. - Connect a language model to Modelo de Lenguaje.
- Connect Datos to Filter Data Keys to keep only
text_anonymized, and send the result to the classification tool.
Good practices
- Check a few results before using it at scale: the model may miss data written in unusual ways.
- Choose only the kinds of data you need: the fewer there are, the more accurate the search.
Related components
- Data Anonymizer: anonymises data without a language model.
- Data Deanonymizer: restores the original data of a text anonymised with Data Anonymizer.