When a team shows me an LLM feature and says it has been tested for privacy, I ask one question first: where did you look? The answer is nearly always the same. They looked at the chat window. They asked the bot for someone's phone number, it politely refused, and the box got ticked.
That test isn't worthless, but it covers the exit people think about least often in production. In my experience the personal data in an LLM feature has many more ways out than the answer on screen, and most of them aren't new AI problems at all. They're the access control, caching, logging and test data problems quality engineers have been dealing with for twenty years, now carrying more data, in free text, through more systems.
Data and PII testing is one of the areas I've built dedicated QA skills and agents for in my current organisation, because it kept turning up as the gap squads were least equipped to close on their own. This post is how I'd approach it for a single feature: what I'd test, in what order, and what I'd accept as evidence.
Start by drawing where the data goes
Before writing a single test, I want a picture of every place personal data can travel. Not an architecture diagram with the happy path, but a data-flow sketch that includes the boring parts.

The main path is the one everyone tests: the user types, the prompt is assembled, the model responds, the feature acts. The side exits are where I'd spend most of my effort. Retrieval and memory decide what the model can see. Caches and sessions decide whose data comes back. Logs and traces copy the full prompt, personal data included, into tools with much wider access than the product itself. Evaluation datasets and third-party model providers take copies too.
OWASP's list of the top risks for LLM applications reflects how seriously the industry now takes this. Sensitive Information Disclosure was sixth in the 2023–24 list, rose to second in 2025, and remains second in the 2026 edition. The 2026 entry says the leak channel is "not only the final answer", and lists retrieved chunks, logs and telemetry among the surfaces that count. I agree. I also wouldn't treat a system-prompt instruction as a control. The 2025 text already warned that those restrictions "may not always be honored" and can be bypassed.
The model is the exit people fear most and test least usefully
The fear everyone has is that the model itself memorised personal data and will repeat it. That fear has a real basis. In 2023, Milad Nasr and colleagues showed that a "divergence attack", prompting ChatGPT to repeat a single word until it drifted off-script, could pull verbatim training data out of a production model. With about $200 of queries they extracted over 10,000 unique memorised examples, and 16.9% of the generations they checked contained memorised personal information.
That's an important result, and its limits matter. It was a deliberate attack by expert researchers on a 2023 model, and the personal data came from the provider's training corpus, not from any customer's application. For most teams building on a hosted model, the thing they can actually change is which data they feed in and what they let it reach. Unless you're fine-tuning on customer records, I'd treat memorisation as the provider's risk to evidence and your risk to contract for. Ask the provider what they test and whether your prompts are used for training, get the answer in writing, and then spend your own test budget on the exits you control.
If you are fine-tuning on personal data, the picture changes completely, and the test I'd want is a canary: plant unique, fake records in the training set and probe the tuned model for them. If a canary comes back, real records can too.
Test retrieval as an access control, because that's what it is
The most likely leak in an LLM feature, in my view, is the most ordinary one. The retrieval layer fetches a document or record the current user isn't entitled to see, and the model, doing exactly what it was asked, summarises it helpfully.
This is an authorisation bug, and it should be tested like one. I'd build a small set of test personas with deliberately different entitlements: two customers in different accounts, a customer and an agent, a user in one region and one in another. Then I'd seed records that only one persona should see, each carrying a unique marker string, and run the same questions as every persona. Any answer, citation, tool argument or retrieved chunk containing another persona's marker is a failure. It doesn't need an LLM judge to decide. A string match does the job, and the test is deterministic even though the model isn't.
The detail that catches teams out is where the filter lives. If entitlement filtering happens after retrieval, or worse, is left to the model ("only use documents belonging to this user"), the data has already crossed the boundary into the prompt. I want the filter applied in the retrieval query itself, and I want a test that proves it by inspecting the retrieved set, not just the final answer. The same goes for agent memory: a fact a user told the assistant last week should never surface in another user's session.
Cross-user leaks under load are old bugs in new places
The best-documented AI privacy incident I know of wasn't a model failure. On 20 March 2023, OpenAI took ChatGPT offline after a bug in an open-source Redis client let some users see titles from other people's chat histories. OpenAI's own write-up says the same bug may have exposed payment-related details, including names, email addresses and the last four digits of card numbers, for 1.2% of ChatGPT Plus subscribers active during a nine-hour window.
The cause will be familiar to anyone who has done performance testing. A server change caused a spike in cancelled requests, a cancelled request left a pooled connection corrupted, and the next request occasionally received the previous user's cached data. It only showed up under concurrency, with cancellations, at scale.
So I'd add an ownership check to the load tests. Run many personas concurrently, cancel a share of requests mid-flight, and assert that every response belongs to the user who asked. OpenAI's fix included "redundant checks to ensure the data returned by our Redis cache matches the requesting user." I'd put that check in the test harness from day one, and in the product too. Streaming responses, prompt caches and session stores all deserve the same treatment.
Your observability stack is a second copy of your users
This is the exit I'd bet most teams haven't looked at. To debug an LLM feature you want full traces: the assembled prompt, the retrieved chunks, the tool calls and the output. That's exactly what good observability practice recommends, and I'm a strong believer in telemetry as a quality input. It's also a complete copy of whatever personal data passed through, now sitting in a logging platform that far more engineers can read, often with longer retention than the product database.
I've built tooling that reads production traces to find and fix defects, so I know how valuable that data is. It's also why I think redaction has to be tested, not assumed. My checks here are simple:
- Seed known fake personal data through the feature (names, emails, card-like numbers, national ID formats for your markets) and search the logging and tracing platforms for it afterwards. Anything found unmasked is a defect.
- Check retention and access on the trace store against the same standard as the product database. If the answer is "everyone in engineering can search it for a year", that's a finding.
- Test the redaction itself with awkward inputs. Personal data in free text doesn't arrive as a neat field. A name inside a sentence, a phone number with spaces, an address in Arabic script: pattern-based masking misses these, and the only way to know how much is to measure it.
Evaluation data is test data, and test data has rules
The last side exit is the one QA owns most directly. Good LLM evaluation leans heavily on production samples, because real conversations are better test cases than invented ones. I've argued for turning production failures into evals myself. But a transcript copied from production into an eval set or a fixture file is production data in a test environment, with all the obligations that brings.
I've spent most of my career in regulated financial services, where using live customer data in test environments is something you justify, control and audit, not something you do because it's convenient. I'd hold eval data to the same standard: redact before it leaves the restricted store, record where each sample came from, and expire samples you no longer need. If a customer asks to have their data deleted, can you find and remove them from your eval sets? Most teams I'd ask, I suspect, couldn't answer that today.
Why this is a governance problem too
It's tempting to treat all this as an engineering detail. The evidence suggests it's more than that. IBM's 2025 Cost of a Data Breach report, the first edition to study AI security, found that 13% of the organisations it surveyed reported a breach of AI models or applications, and 97% of those said they lacked proper AI access controls. Incidents involving shadow AI, meaning tools used without approval, were more likely to compromise customer personal information than the average breach.

I'd read those numbers with care. They come from a survey of 600 organisations that had already been breached, the AI questions are new, and it isn't a controlled comparison. But the direction matches what I'd expect: data leaks where nobody drew the boundary or tested it. That makes it a question of ownership as much as technique. Someone has to own the data-flow picture for each AI feature, and someone has to decide which leaks block a release.
What I'd ask for before sign-off
If I were reviewing an LLM feature for release, I wouldn't ask for a privacy score. I'd ask for four pieces of evidence, each of which can be produced without trusting the model to behave:
- A data-flow sketch showing every place personal data travels, including logs, traces, caches, eval sets and third-party providers.
- Persona-based entitlement tests with marker strings, run against the retrieved set as well as the answer.
- A concurrency test with cancellations that asserts every response belongs to its requester.
- A seeded-data sweep of the logging, tracing and eval stores showing what redaction caught and what it missed.
None of these needs a new tool. They need someone to decide they matter before the feature ships. The red-team prompts against the chat window are still worth running, and I'd keep them. I'd just stop treating them as the whole job.
I don't know yet how much of this will be absorbed by platforms over the next year or two. Some of it probably will. But the bugs underneath, wrong user, wrong record, wrong place, are the same ones I was testing for long before anyone had heard of a large language model, and I'd be wary of anyone who says the model makes them go away.
Continue reading
- Production Failures Belong in Your Eval Suite: The Trace-to-Eval Loop
- Why I Treat Agent Memory as Production Data
- RAG Doesn't Cure Hallucination, It Moves the Bug Upstream
Sources
- OWASP GenAI Security Project, LLM02:2025 Sensitive Information Disclosure (OWASP Top 10 for LLM Applications 2025). Quote on system-prompt restrictions from the introduction. LLM02:2025. Earlier ranking: LLM06: Sensitive Information Disclosure, 2023–24 list, confirmed as sixth on the official 2023–24 index. LLM06 2023–24 | 2023–24 index.
- OWASP GenAI Security Project, LLM02:2026 Sensitive Information Disclosure (OWASP Top 10 for LLM Applications 2026, published August 2026). Ranking still second; "not only the final answer" and the list of disclosure surfaces (retrieved chunks, logs, telemetry) from the Description. Official publication: genai.owasp.org/resource/owasp-genai-llm-top-10-2026/. Canonical text: LLM02:2026 on GitHub.
- Nasr, Carlini, Hayase, Jagielski, Cooper, Ippolito, Choquette-Choo, Wallace, Tramèr and Lee, Scalable Extraction of Training Data from (Production) Language Models, arXiv:2311.17035 (2023). $200 budget and 10,000+ unique memorised examples from the ChatGPT (gpt-3.5-turbo) section; 16.9% of tested generations containing memorised PII from the "Identifying PII" subsection (section 5.4; 15,000 generations labelled).
- OpenAI, March 20 ChatGPT outage: Here's what happened, 24 March 2023, openai.com/index/march-20-chatgpt-outage/. 1.2% of ChatGPT Plus subscribers active in a nine-hour window; redis-py connection bug; "redundant checks" quote from "Actions we've taken".
- IBM, Cost of a Data Breach Report 2025 (Ponemon Institute; 600 organisations, March 2024 to February 2025), press release 30 July 2025. 13% reporting AI model or application breaches, 97% of those lacking AI access controls. Customer PII compromised in 65% of shadow-AI incidents versus 53% average, intellectual property 40% versus 33%, from Figure 24 of the full report.