Use LLMs on personal data without sending personal data
Pseudonymise documents before a language model reads them. A practical pattern for GDPR-safe extraction from emails, dossiers and applications.
Plenty of teams want to point a language model at documents full of personal data: applications, dossiers, customer emails. That risk isn’t hypothetical. The Dutch Data Protection Authority has received data breach notifications after employees pasted patient and customer data into AI chatbots. There’s a better way to set this up: let the model do the language work, but never let it see who the person is.
Why a contract with the provider isn’t enough
A business agreement with an AI provider helps, but the personal data still leaves your environment. You still need a legal basis, and you still have to limit the data to what the purpose requires. The GDPR calls this data minimisation (Article 5(1)(c)).
The Dutch Data Protection Authority also points out that most companies behind chatbots store everything users type in. The people in your documents have no idea where their data ends up. The safest personal data is the data you never send.
What pseudonymisation means under the GDPR
Article 4(5) of the GDPR defines pseudonymisation: processing personal data so it can no longer be linked to a specific person without additional information. That additional information is kept separately and protected by technical and organisational measures.
Recital 26 adds an important nuance. Pseudonymised data is still personal data; only anonymous data falls outside the GDPR. In 2025 the European Data Protection Board published guidelines on pseudonymisation with worked examples.
So pseudonymisation doesn’t take your project out of the GDPR. What it does is lower the risk and give you control over which party sees which data.
The pattern: a vault between your data and the model
- Find the personal data. Names, dates of birth, addresses, email addresses, phone numbers, company registration numbers, bank account numbers. Use rules for fixed formats like IBANs and postcodes, and add a named entity recognition model that runs in your own environment.
- Replace each item with a stable token, such as ‹PERSON_1› or ‹ADDRESS_1›. The same name gets the same token throughout the dossier, so the model can still keep track of who is who.
- Store the mapping between tokens and real values in a vault in your own environment. Only the vault can turn a token back into the real value.
- Send only the pseudonymised text to the language model, and ask for structured output: facts, amounts, dates and a short summary.
- Restore the real values only where a person needs them, for example on the reviewer’s screen. Log every re-identification.
- Run a leak check before every external call. Search the outgoing text for the original values, and block the request if any of them show up.
What the model needs, and what it doesn’t
Most extraction tasks don’t need to know who someone is. The model needs roles (“the applicant”), relationships (“the director of the company”) and facts (amounts, dates, products).
Where the detail matters, generalise it. Use an age range instead of a date of birth, a city instead of a street address, “company founded in 2019” instead of the company name. Decide this field by field, together with the people who own the process.
Where this pattern falls short
- Free text can identify someone without a name. Think of “the only female pilot at our airfield”. Detection won’t catch everything, so test it on real samples and measure what it misses.
- Some checks need the real identity, such as screening against a sanctions list. Run those in your own environment, with rules or a local model.
- Scans and photos need OCR first. Pseudonymise the text after OCR and before any external call.
- Pseudonymised data is still personal data. You still need a legal basis, a processing agreement with the provider and an entry in your record of processing activities.
What to do now
- List the AI tools your team uses and the data that goes into them.
- Agree clearly on which data employees may enter. The Dutch Data Protection Authority gives the same advice.
- Pick one pilot process with high volume and fairly standard documents.
- Put detection, the vault and the leak check in place before you connect a model.
- Measure two things: the personal data detection misses, and the quality of the extraction on tokenised text.
- Have your privacy officer review the design and the data flows.
How we approach this
We used this pattern in a system that makes a first assessment of applications. The language model extracts the facts from pseudonymised dossiers, a fixed set of rules makes the decision, and the model never sees data that could identify a customer.
Sources
- Caution: use of AI chatbot may lead to data breaches, Dutch Data Protection Authority (Autoriteit Persoonsgegevens), 6 August 2024
- Regulation (EU) 2016/679 (General Data Protection Regulation), EUR-Lex
- Guidelines 01/2025 on Pseudonymisation, European Data Protection Board