Pseudonymization and redaction of personal data for LLMs
Replaces registered people and identifiers with placeholders before each AI call, blocks the request if anything is left in clear text and puts the real values back in the response. Two ways to use it: per call, or with an encrypted mapping store.
Sending CVs or customer data to an external language model exposes personal information to a third party. This module for PII redaction for LLMs replaces people and identifiers with placeholders before each call, checks that nothing is left in clear text and, if it finds something, does not send the request. When the response comes back, it puts the real values back.
Who it is for
Software companies that use generative AI with customer data, data protection leads and integrators working with HR, CV or CRM data.
What PII redaction for LLMs solves
- Too much data. It reduces the personal data that goes out to the AI provider (data minimization, Article 5(1)(c) of the GDPR).
- Leaks through carelessness. If preparation fails or a value is left in clear text, the call does not go out.
- Inconsistencies. The same person always gets the same placeholder.
What it does
Per call
- Replaces the people registered in your directory, plus email addresses, phone numbers, DNI, NIE and IBAN, with placeholders.
- It can also replace your organizations, partners and internal amounts, without touching the public figures in the document.
- Checks the text after replacement and blocks the request if it finds anything.
- Tells the model how to handle the placeholders and restores the real values in the response.
- Removes contact details, salary and notes from profiles, and redacts the copy kept in the AI audit log.
With a mapping store
- Assigns persistent codes by data type and stores the real value encrypted.
- Translates the filters the model proposes back to real values before querying your data.
- Shows in the response only the data types the user's profile is allowed to see.
- Masks identifiers with a recognizable format in document excerpts.
Benefits
- You can use external AI with data about people while sending less personal information.
- You have a technical measure to document in your record of processing activities and in your data protection impact assessment (DPIA).
Industry context
General industry data with its public source. These are not results of this product.
- The GDPR names pseudonymization as a data protection by design measure (Article 25(1)) and as a security of processing measure, alongside encryption (Article 32(1)(a)). It defines it as processing that prevents the data from being attributed to a person without additional information, which has to be kept separately (Article 4(5)). Source: Regulation (EU) 2016/679, the General Data Protection Regulation.
What you get with each license
Price upon request, depending on license type and scope. Integration support and maintenance are contracted separately.
- The code for one of the two ways of using it, or both, ready to add to your AI layer.
- Integration examples and documentation.
- A warranty against defects for the agreed period.
- Everything above, with the right to adapt the recognized formats and maintain it in your product.
- The right to embed the asset in a commercial product of your own, identified in the contract.
- The right to distribute it to your customers as part of that product, without asking for authorization for each installation and with no limit on end customers, unless otherwise agreed.
- It does not include reselling or sublicensing it on its own.
- It is not exclusive, unless otherwise agreed.
- Maintenance, support and adaptations are contracted separately.
Technical specifications
Language and runtime: TypeScript 5.9 on Node.js. Minimum supported version for the mapping store: Node.js 20.19 (the one Prisma 7 requires in its configuration).
Frameworks: It does not depend on a framework. The mapping store uses Prisma 7.10.
Database: PostgreSQL, for the mapping store.
Operating systems: A server with Node.js.
Interface languages: The module has no interface of its own.
Required infrastructure:
- PostgreSQL, for the mapping store.
- A master key in the server configuration.
Private deployment: Runs fully on your infrastructure. It does not call any third-party service: it prepares the data before your application sends it to the AI provider.
Main libraries: It uses the standard Node.js crypto library and, for the mapping store:
| Library | Version | License |
|---|---|---|
| @prisma/client | 7.10.1 | Apache-2.0 |
| pg | 8.23.1 | MIT |
Dependencies with specific license terms: None.
Compatibility and integrations: Works with any AI provider, including OpenAI, Anthropic, Google Gemini and Azure AI Inference.
Redistribution terms
The asset's own code can be embedded in the licensee's commercial products under the embeddable module, source code and OEM licenses, on the terms of the contract. None of the module's production dependencies has a copyleft license or specific commercial terms.
Installation requirements
A Node.js application. The mapping store needs PostgreSQL and a master key that you keep in your server configuration. It works with any AI provider.
Frequently asked questions
Does this anonymize the data?
No. It is pseudonymization: it reduces exposure, but the data is still personal data under the GDPR.
Does it detect any name in free text?
No. It replaces registered people and identifiers with a recognizable format, which are the Spanish ones (DNI and NIE identity numbers, phone numbers and IBAN). An unregistered name goes through as it is.
What happens if the model changes a placeholder?
That placeholder stays unreplaced; a value is never made up.
Is maintenance included?
No. Maintenance and support are contracted separately, as is extending it to identifiers from other countries.
Request
Request information on M-PII-01
Fill in the form with the asset reference and the license type you're considering. I reply in writing. If you need to review code, tick the NDA box and we'll sign one before anything is shared.