Skip to content

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

FieldWhat it does
DatosThe record or list of records that contain the text.
Data key to anonymizeThe record field that holds the text. Default: text.
EntitiesThe 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 KeyThe field where the anonymised text is stored. Default: text_anonymized.
Entities Result KeyThe field where the data found is stored, grouped by kind. Default: entities_anonimized.
Modelo de LenguajeThe language model that looks for the personal data. Connect a model component here.

Advanced options

FieldWhat it does
Prompt templateThe instructions the model receives to find the data. If you change them, keep {entities} (the chosen kinds) and {Data} (the text).
Remark AnonimizationWraps each replaced value in *** so you can see which parts changed. Off by default.
Use Word BoundariesReplaces 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.

  1. Connect the complaints to Datos and keep text in Data key to anonymize.
  2. In Entities, keep the defaults and add IBAN.
  3. Connect a language model to Modelo de Lenguaje.
  4. 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.