Insights · Regulation

How to pseudonymise customer data before sending it to an LLM

Pseudonymise first, then approve one task and one data flow, keep the key in your own environment, and test the detector on your own text.

Published
Updated
Reading time
13 min read
By
Saskia Russell, Founder's Associate

A support agent pastes a ticket thread into a chat assistant and asks for a draft reply. Whether that prompt is safe to send comes down to four decisions made for that task alone. Transforming the text first reduces exposure, but it doesn’t remove the risk of re-identification. US federal guidance says even properly applied de-identification leaves some risk of identification. This article offers advice for how organisations can navigate ensuring the prompts they send to LLMs are free from sensitive customer data.

The first step is pseudonymisation: replacing the personal details that identify a customer before the prompt leaves your systems. The second is deciding for that specific task what can cross to the model and on what terms. This guide covers both, for teams in the UK, EU and US.

This is general information, not legal advice. Law and guidance checked 25 November 2026.

What does pseudonymising data for an LLM mean?

Pseudonymising data for an LLM means replacing the identifying details that single out a person, such as a name, account number or address, before the prompt is sent, and keeping the key or mapping that reverses the swap inside your own environment. The model works on the pseudonymised text; when the answer comes back, the original details can be restored for the person who needs them.

This is not the same as anonymisation. Because you keep the means to reverse it, pseudonymised data is still personal data for you, so the usual data protection duties still apply. What it changes is what the model provider sees, and how much harm a leak, a log or a vendor's retention policy can do. For the legal definition and techniques, see what pseudonymisation means.

Which technique keeps the model accurate?

Every technique hides the customer, but they differ in how much meaning they leave the model to work with. Take a billing complaint from “Sarah Williams, account 40-12-88, charged twice on 3 March”:

What four techniques send to the model for one synthetic billing complaint, and how much summarisation accuracy each kept in Nakato's internal benchmark (self-reported).
Technique What the model sees Downstream accuracy in Nakato's internal benchmark Can it be reversed? Suits
Redaction [REDACTED], account [REDACTED], charged twice on [REDACTED] Not measured on this test; on public reasoning benchmarks, redaction cuts accuracy sharply (below) No Tasks that never need the detail
Placeholder masking PERSON, account ACCOUNT_NUMBER, charged twice on DATE 41.3% Yes, with a mapping Simple classification or routing
Tokenisation TKN_0091, account TKN_0144, charged twice on TKN_0203 12.8% Yes Lookups where the model only passes values through
Semantic twinning Emily Jones, account 52-07-31, charged twice on 5 March 96.2% Yes, inside your environment Drafting, summarising and reasoning over full records

Accuracy here is summarisation accuracy after pseudonymisation and reversal, scored against the answer on the raw data, on 500,000 internal financial-services test cases (Nakato's internal benchmark, self-reported, last updated 1 October 2026). Results vary with the kind of document and how the tool is configured. See the benchmarks.

The pattern holds on public reasoning benchmarks too. On DROP, a numerical reasoning test, redaction cuts accuracy to 25% of the baseline while Nakato's semantic twins hold 99.3%. On HotpotQA, which needs reasoning across several facts, redaction falls to 31.7% and twins hold 96%.

Choosing the right approach for how to process data depends on what you need from it. If the model doesn't need the detail at all, redaction or masking is simpler and good enough. If it has to reason about the record and use it for a task, write to the customer or summarise their history, it needs the meaning that labels strip out, which is what semantic twins are built to keep.

The cost is the one set out in the legal section. Because twins can be reversed, they pseudonymise data rather than anonymise it. A twinned prompt therefore stays within privacy law wherever you operate, and the detector testing below matters more, not less.

Step 1: Approve one task and one data flow

When you’re assessing whether you can safely send customer data to a publicly hosted AI model, you first have to look at each specific task. A gateway or sidecar in a system’s architecture is where rules get enforced, and the approval is narrow. This keeps it secure. It usually is a version of the following: can this task send this kind of customer text to this model on these terms? When you’re assessing this, write down:

  • The task, as the job the model does. This has to be specific; drafting a reply to a billing complaint is a task, but “support use cases” is not.
  • What crosses the boundary. Which details are transformed, which go through unchanged, and where the reverse mapping sits.
  • What the vendor does with it, from the contract. Retention, logging, sub-processing and training use.
  • The residual risk. This needs a named owner and the conditions that reopen the decision.

The US National Institute of Standards and Technology SP 800-188 has agencies send each request to a Disclosure Review Board, stating the data, the techniques used to limit disclosure and how effectiveness will be checked. It was written for US agencies but is offered for voluntary use elsewhere. A review like this, written down, is what decides whether a prompt is safe to send.

Step 2: Keep the key in your own environment

Presidio publishes a sample that routes traffic through the LiteLLM proxy with masking attached. It shows a proxy can be an effective guardrail, but only if it sits in the right place and nobody can quietly switch it off. Jane Doe and her phone number reach the provider as PERSON and PHONE_NUMBER, and 'output_parse_pii' restores them in the reply. The options matter more than the happy path. permissions: '{"pii": false}' turns masking off for a key, 'allow_pii_controls' lets callers switch it off per request, and a logging-only mode leaves the real request untouched. If a key can switch the control off, audit key issuance.

Both settings point to the same rule: a control is only as strong as where it runs and who can turn it off. For Nakato, this is why it runs inside the customer’s own environment, as a sidecar next to the application or as a shared gateway. The key that reverses the twins never leaves, which is exactly the arrangement the legal argument below depends on: the provider receives text it has no means to link back to a person.

Placement is the most important factor, though. A control inside your network only sees traffic routed through it, so the question to ask any vendor, Nakato included, is which calls go around it, such as a browser extension or a hosted assistant reached directly.

Step 3: Test the detector on your own text

Detectors fail in two ways: they can miss details, and label them wrongly. The second matters more than it looks. In a scheme that substitutes by type and reverses afterwards, a postcode tagged as a driving licence number gets the wrong kind of substitute, and the reply can read oddly or be restored onto the wrong span. See what recent benchmarks show about LLM detectors.

Take a few hundred real tickets, weighted towards long threads and escalations, where context does the most identifying. Have two reviewers label entities independently, run the sample through the control point in shadow mode, and count four failures separately: missed, mislabelled, replaced when the task needed the real value, and restored to the wrong original. Then hand a transformed ticket to a colleague who knows the customers and ask who it describes. Keep the sample with the exact settings behind each result so changes can be rerun.

Is a pseudonymised prompt still personal data?

Whether a pseudonymised prompt is personal data for you and for the model provider, in the UK, EU and US.
For you (you hold the key) For the model provider (no key) What to get right
UK Personal data under UK GDPR, per the regulator’s March 2025 guidance May be anonymous in its hands if it can’t realistically re-identify anyone; UK courts aren’t bound by the EU ruling Where the key lives and who can reach it
EU Personal data May not be personal data, following EDPS v SRB (4 September 2025); open question when the provider is your processor The contract, and whether a long or unusual prompt could identify someone without the key
US Treat as personal information: holding a reversible key is unlikely to meet California-style de-identification tests Depends on the contract A service-provider contract with no retention beyond the task and no training on your data

In the EU, the question is whether the company receiving the data could realistically work out who it is about. In EDPS v SRB, decided in September 2025, the Court of Justice said the answer can differ from one company to the next. An EU body had sent Deloitte survey comments with the names swapped for codes. The body kept the list linking codes to names, so for them, the comments were still personal data. Deloitte had no list, so whether they were personal data in Deloitte’s hands depended on whether Deloitte could realistically re-identify the individuals in the data.

A well-built LLM deployment looks the same: you keep the key, and the model provider receives twins it has no way to reverse. That may mean the provider isn’t handling personal data, but it doesn’t take you off the hook. If the provider could recognise someone from a long or unusual ticket without the key, that counts against you. The court also didn’t say how this works when the recipient is your processor, which is how most LLM contracts are set up. The European Commission has proposed writing this approach into the GDPR; the EU’s data protection authorities oppose it. The Council’s October 2026 position drops it in favour of a new article on pseudonymised data, and nothing has been adopted yet.

The UK law uses the same wording as EU law here, so UK courts may follow the same reasoning, though they don’t have to. The UK regulator, the ICO, says in its March 2025 guidance that pseudonymised data stays within data protection law. So long as a key exists that maps the twin back to the original, the data counts as personal. That makes where the key is kept, and who can reach it, the thing to get right.

For more information, see Swapping names isn’t enough.

The US has no single national privacy law, so the rules depend on the sector and the state. For health data under HIPAA, even the two approved de-identification methods leave a small risk that someone could be identified. California, and the states that copied its law, only treat data as de-identified if the business takes reasonable steps so that it can’t be linked to a person, promises publicly not to re-identify it, and requires anyone it shares the data with to do the same.

If you keep a key that reverses the twins, you are unlikely to pass that test, unless you can prove how it is stored. So in the US, treat the twin as personal information and rely on the contract with the LLM provider: it should act as your service provider, keep nothing beyond the task, and never train on your data. In all three places the conclusion is the same. Twinning lowers risk, but the data stays within privacy law, so the contract, privacy notice and key’s location all still have to be right.

What approval doesn’t settle

Keeping the mapping local doesn’t prove that the vendor or a logging pipeline can’t work out who a ticket describes from the story around the names. To reduce that risk, choose a detector that catches indirect identifiers as well as names, and ask any vendor for evidence on text like yours. The assurance breakdown lists the questions to ask.

Reopen the approval when you add:

  • a model, vendor or route the sample never covered
  • a key with masking or output parsing relaxed
  • a ticket type, language or channel the detectors haven’t seen
  • a change to detector or substitution settings
  • a new data source in the prompt context

Start with the narrowest task worth doing: one queue, one model, one route, and a sample you can rerun.

To take these decisions into an approval meeting, use our customer-data AI release checklist: one table to fill in for each decision, with the evidence to attach and the red flags to watch for.

Questions

Questions about sending customer data to an LLM

Can I send customer data to an LLM such as ChatGPT?

Only once you have approved that specific task and data flow: what the model does, what crosses to the provider, what the provider keeps, and who owns the remaining risk. Transforming the data first lowers the risk but does not remove it.

Which keeps an LLM more accurate: masking, tokenisation or semantic twins?

Semantic twins keep the most accuracy, because they replace each detail with a realistic stand-in rather than a label or code. In Nakato's internal benchmark on 500,000 financial-services cases, summarisation accuracy after reversal was 96.2% with semantic twins, 41.3% with placeholder masking and 12.8% with tokenisation (self-reported, last updated 1 October 2026). Masking and tokenisation are simpler and suit tasks where the model never needs the detail.

What is the difference between pseudonymising and anonymising a prompt?

Pseudonymising a prompt replaces the customer's details but keeps a separately held way to restore them, so the answer can be traced back to the real customer. The data stays personal data for you. Anonymising a prompt removes any reasonable way back to the person, which takes it outside data protection law but means you can't act on the answer for that customer. For most customer-facing AI tasks, pseudonymisation is the practical choice.

Is pseudonymised data still personal data?

For you, yes, while you hold the key that reverses it: that is the position in the UK and the EU, and in the US it should be treated as personal information. For the model provider it may not be, if the provider has no realistic means of identifying anyone, following EDPS v SRB (C-413/23 P, 4 September 2025).

Where should the key that reverses the twins be kept?

Inside your own environment, with named people able to reach it. If the provider never receives the key, it has no way to reverse the twins.

Does a privacy proxy protect every request?

No. It protects only the traffic routed through it. A browser extension or a hosted assistant reached directly goes around it, so list every route a prompt can take and test for bypasses.

How do I test a de-identification tool?

Run a few hundred of your own records through it in shadow mode, weighted towards long and unusual ones, and count four failures separately: missed, mislabelled, replaced when the task needed the real value, and restored to the wrong original.

When should an approval be reopened?

When you add a new model, vendor or route, relax a setting, add a new type of record, language or channel, change the detector, or add a new data source to the prompt. The customer-data AI release checklist turns this into a form.

Sources

  1. De-Identifying Government Datasets: Techniques and Governance (NIST SP 800-188)

    National Institute of Standards and Technology, September 2023

    Cited for: residual risk after de-identification; the Disclosure Review Board; and HHS guidance on the HIPAA de-identification standard.

  2. SP 800-188, publication record

    NIST Computer Security Resource Center

    Offered for voluntary use outside US agencies.

  3. Case C-413/23 P, European Data Protection Supervisor v Single Resolution Board

    Court of Justice of the European Union, 4 September 2025

  4. The SRB decision: A new era for personal data and data processing agreements?

    Bird & Bird, 2025

    The open question when the recipient is a processor.

  5. Digital Omnibus: What The Proposed Changes Mean For GDPR, Privacy And Cookies

    Mondaq, 11 March 2026

    The European Commission’s proposed change to the GDPR.

  6. Joint Opinion 2/2026 on the Digital Omnibus

    EDPB and EDPS, Adopted 10 February 2026

    The data protection authorities’ opposition.

  7. Digital rulebook: Council agrees position to simplify data protection, privacy and cyber reporting rules

    Council of the European Union, 21 October 2026

    The Council's position: no change to the definition of personal data, and a new article on pseudonymised data.

  8. ICO publishes new guidance on anonymisation and pseudonymisation

    RPC, 23 September 2025

    The ICO’s March 2025 guidance: pseudonymised data stays within data protection law.

  9. Pseudonymisation

    Information Commissioner's Office, 28 March 2025

    Pseudonymised data is personal data for whoever holds the additional information.

  10. 'Finding the Delta: Understanding the Differences in the State Deidentification Standards'

    National Law Review, May 2022

    California and the states that copied its law.

  11. LiteLLM with Presidio

    Presidio project

    The proxy sample, output_parse_pii, permissions and allow_pii_controls.

  12. Benchmarks

    Nakato, Last updated 1 October 2026

    Downstream utility and reasoning figures (self-reported).

Written by

Saskia Russell

Founder's Associate

Saskia Russell is Founder's Associate at Nakato. She writes about how organisations can use sensitive customer data with AI models: what the law says, how the methods compare, and what is required to get a project moving.

More insights

All insights

  1. Regulation ·

    Anonymisation vs pseudonymisation: what’s the difference?

    Pseudonymised data is still personal data; properly anonymised isn't. Here’s how the law tells them apart in the UK, EU and US.

    9 min read

  2. Regulation ·

    What should a customer-data AI release checklist include?

    A fill-in checklist for approving AI that uses customer data: five sections, each with a question, the evidence to attach and a red flag.

    8 min read

  3. Regulation ·

    Swapping names isn’t enough: getting pseudonymised data approved for an LLM

    Pseudonymised data stays personal data while you hold the key. A committee approving it for an LLM needs written evidence on seven points.

    6 min read