# Data privacy with LLMs: retention and what leaves your systems

> Where data goes when you call an LLM, what main providers keep by default, and the controls on your side: minimisation, redaction, access, logs, contracts.

- Published: 2026-09-11; last updated 2026-11-14
- Author: the WeStack AI team
- Subject: Cybersecurity and AI governance
- Address: https://westack.ai/blog/llm-data-privacy-and-pii

> When you call a hosted model, the prompt, any retrieved documents and the answer leave your systems, and copies can remain afterwards: at the provider for abuse monitoring, in any state you asked it to store, and in your own logs. None of the main providers trains on paid API data by default, but retention runs from nothing to 30 days or more, and it now depends on the model and the feature as well as the provider. Send less, control who can retrieve what, and treat your logs as a second database of personal data.

## Where does data go when you call a model?

Take a company that sells HR and payroll software. It adds an assistant that answers employees' questions about leave and pay, and helps HR managers draft letters. The data includes names, salaries, bank details and sickness absence, which is health data.

An employee asks why her March pay was lower than February's. Follow that one question.

1. Your application builds a prompt: her question, her profile, payslip lines pulled from the database, absence records, perhaps notes from earlier conversations.
2. The prompt travels to the provider's endpoint, in whichever region serves the request.
3. The model produces an answer. The model keeps nothing, because inference does not change its weights.
4. Copies may remain at the provider: abuse-monitoring logs, any conversations, files, batches or caches you asked it to hold, and content flagged for review.
5. If the model called a tool, such as web search or a third-party connector, that service received part of the data under its own terms.
6. Copies remain with you: application logs, traces in an observability tool, the vector index, evaluation datasets and long-term memory.

Most privacy reviews look hard at step 2 and never reach step 6. In the systems we see, step 6 holds more personal data, for longer, behind weaker access control.

## What do providers keep by default?

We read each provider's documentation while writing this. These pages change several times a year, so read them again before you sign anything.

| Provider and service | Used for training by default? | What is kept by default | Route to zero retention |
| --- | --- | --- | --- |
| [OpenAI API](https://developers.openai.com/api/docs/guides/your-data) | No, unless you opt in | Abuse-monitoring logs for up to 30 days; state you ask it to store (files, batches, conversations) until deleted | Zero Data Retention or Modified Abuse Monitoring, both needing OpenAI's approval; several endpoints are not eligible |
| [Anthropic Claude API](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention) | No, not without express permission | Inputs and outputs deleted within 30 days under the commercial policy; the newest models require 30-day retention; flagged content for up to two years | An agreement arranged through sales, per organisation; stateful features and the newest models fall outside it |
| [Google Vertex AI](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/data-governance) (Gemini) | No, not without permission or instruction | Inputs and outputs cached for up to 24 hours unless you turn caching off; prompts may be logged for abuse monitoring; some grounding features store prompts | Assembled from settings: disable caching and avoid the features the page lists as storing data |
| [Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html) | No, and content is not shared with model providers | Set by a retention mode per Region: many models keep nothing, some newer ones require up to 30 days inside AWS | Set the mode to `none` for an account or project; models that require retention are then blocked |
| [Microsoft Foundry](https://learn.microsoft.com/en-us/azure/foundry/responsible-ai/openai/data-privacy) (Azure OpenAI) | No, and prompts are not available to OpenAI | The models are stateless; flagged prompts may be stored for abuse review by authorised Microsoft staff; stateful features store data in your tenant | Modified abuse monitoring, for customers who meet Microsoft's eligibility criteria |

Four things stand out.

**Nobody trains on paid API data by default.** All five say so. The exception to watch is the free tier. Google's [Gemini API terms](https://aistudio.google.com/docs/terms) say that content sent through unpaid quota is used to improve its products and may be read by human reviewers, and that API clients offered to users in the EEA, Switzerland or the UK must use the paid service.

**Zero retention is no longer a property of the provider.** It depends on the provider, the model and the feature. Anthropic's documentation says its newest models require 30-day retention and are not available under zero-retention arrangements unless it expressly agrees. On Bedrock, the same models can be called only after you set a retention mode that lets AWS keep the traffic and, if necessary, review it. And any feature that stores things for you, such as files, batches, conversation state or code execution, sits outside zero retention everywhere, because storing is its job.

**Flagged content is an exception to every promise.** Anthropic says flagged inputs and outputs may be kept for up to two years even with a zero-retention agreement in place. OpenAI says an image flagged by its scanning may be retained for manual review.

**Storage location and processing location are separate settings.** OpenAI offers regional endpoints, and in some regions data is stored locally while inference runs elsewhere. Anthropic lets you pin inference to the US or leave it global. Azure's Data Zone deployments keep processing inside the EU or the US, while Global deployments may process anywhere. Bedrock works per Region unless you enable cross-Region inference. If a customer contract says 'processed in the EU', check where inference runs, not only where data rests.

Tools widen the map again. OpenAI's page notes that data sent to a third-party MCP server falls under that server's retention policy, not OpenAI's.

## Minimise, redact, tokenise

**Minimise first.** The March pay question needs the payslip lines for two months and the dates of absence. It does not need bank details, a home address, a national ID number or the full HR file. Build each prompt from an explicit list of fields for that task. The habit to break is passing the whole record 'for context'.

**Redact what you cannot predict.** Free text, such as a manager's note or an uploaded letter, can contain anything. Pattern matching and entity recognition catch most identifiers and miss some. Treat redaction as a net under minimisation. It does not replace it.

**Tokenise identifiers.** Replace them with placeholders before the call and restore them in the answer:

```text
Original:  Maya (employee 48213) asks why her March pay is lower after sick leave from 3 to 14 March.
Sent:      [PERSON_1] ([EMP_1]) asks why her March pay is lower after sick leave from 3 to 14 March.
```

The mapping never leaves your systems. Two cautions. Strip too much and the answer gets worse, since the model needs the dates and amounts to do the job. And under the GDPR pseudonymised data is still personal data, because you hold the key. Tokenising lowers the risk at the provider. Your obligations stay as they were.

## Can users retrieve only what they may see?

Retrieval is where an assistant most often shows someone data they should not have. The assistant must enforce the same permissions as the application around it: an employee sees her own records, an HR manager sees her business unit, and nobody sees another customer's data.

- Filter by tenant and by the user's permissions inside the search query, using the identity from the session. A filter applied after retrieval has already put the data in front of the model.
- Store access rules with each chunk and update them when permissions change. The manager who moved teams last month should lose the old team's records in the index on the same day as in the application.
- Key every cache by user, and keep long-term memory per user. We cover memory in [AI memory and privacy](https://westack.ai/blog/ai-memory-privacy-and-forgetting).
- Test it: sign in as one user and ask for another's data, through every route.

A sentence in the prompt telling the model to discuss only the current employee is not access control. Getting permissions into shape before you index anything is part of [AI-ready data](https://westack.ai/blog/ai-ready-data), and the wider security work is in our [LLM application security checklist](https://westack.ai/blog/llm-application-security-checklist).

## Logs and traces: the second copy

Debugging an LLM feature means looking at full prompts and outputs, so teams switch on tracing early and capture everything. Six months later the tracing tool holds every question every employee asked, with payslip lines attached, readable by the whole engineering team.

What we do instead:

- Redact at the point of capture, or log references to records in place of their contents.
- Keep full-content traces for weeks, not years, and enforce it with a deletion job that actually runs.
- Limit access to the few people who debug production.
- Add the observability vendor to your list of processors. It holds the same data as the model provider, usually for longer.
- Build evaluation sets from scrubbed or synthetic conversations.

Deletion has to reach all of it. When someone exercises the right to erasure, the request must reach the logs, the vector index, memory and any fine-tuning data, as well as the main database. A fine-tuned model cannot cheaply forget one person, which is a good reason to keep personal data out of training sets.

## GDPR, contracts and vendor terms

This section is an engineer's summary, not legal advice.

Article 5 of the GDPR sets out the principles: lawfulness, fairness and transparency; purpose limitation; data minimisation; accuracy; storage limitation; integrity and confidentiality; and accountability, which means the controller must be able to demonstrate compliance with the rest. For an LLM feature they translate directly:

- **Purpose limitation.** Data collected to run payroll is not automatically available for a new AI feature, and still less for training a model.
- **Minimisation and storage limitation.** The field lists and retention periods above.
- **Accuracy.** A model that states something false about a named person is an accuracy problem as well as a quality one.
- **Accountability.** The data-flow map, written down and kept current.

Roles matter. The payroll company is a processor for its customers, so the model provider becomes a sub-processor, which those customers have to authorise. Article 28 requires a contract with every processor, which in practice is the provider's data-processing addendum. Before signing, check:

1. Training use is excluded in the contract, not only in the documentation.
2. Retention periods are stated, including abuse monitoring, and zero retention covers the models and features you use.
3. Sub-processors are listed, with notice of changes.
4. Processing and storage locations are named, with a transfer mechanism for data leaving the EEA or UK.
5. Deletion on termination and the breach notification period are specified.
6. The addendum covers your plan. Free tiers are often excluded.

Health data and other special categories carry extra conditions, and processing them at scale will usually call for a data protection impact assessment before launch. If the system shapes decisions about people, such as hiring or credit, read [the EU AI Act for product teams](https://westack.ai/blog/eu-ai-act-for-product-teams) as well.

## Is self-hosting the answer?

| Option | What leaves your systems | What you give up |
| --- | --- | --- |
| Hosted API on default terms | Prompts and outputs, kept for the provider's default period | Nothing in convenience |
| Hosted API with zero retention | Prompts and outputs in transit and in memory | Some features, and sometimes the newest models |
| Model through your existing cloud provider | Prompts and outputs, inside the cloud account and agreement you already have | Some choice of models and regions |
| Self-hosted open-weight model | Nothing | GPU budget, operations time, usually some capability |
| Small model on the device | Nothing | Everything except narrow tasks |

For most companies the third row is the practical answer: the data stays inside a cloud account and contract that have already been through procurement. Self-hosting earns its cost when a rule says the data cannot leave at all, or when volume is high and steady enough to keep GPUs busy. It also makes you the model provider, with the patching, access control and capacity planning that go with it. And it does nothing about step 6. We compare the options in [small language models](https://westack.ai/blog/small-language-models-on-device).

## How to start

In the first week, for one feature:

1. Draw the six-step map with real field names.
2. Open the provider's console and write down the settings in force today: retention, region, and which features store state.
3. Cut the prompt down to the fields the task needs.
4. Set redaction and a retention period on traces.
5. Ask for the data-processing addendum and check the six points.

The first decision to make is a short list: which classes of data may never be sent to an external model. Everything else follows from that. If you would like help drawing the map, this is routine work in our [AI governance](https://westack.ai/services/cybersecurity-ai-governance), [data engineering](https://westack.ai/services/data) and [generative AI](https://westack.ai/services/generative-ai) projects.

## Frequently asked questions

### Do LLM providers train on data sent through their APIs?

On paid commercial APIs, not by default. OpenAI, Anthropic, Google, Amazon Bedrock and Microsoft's Azure-hosted models all state that API inputs and outputs are not used for training unless you opt in or give permission. Free tiers and consumer apps can work differently, so check the terms for the exact service and plan you are calling.

### What is zero data retention?

Zero data retention is an arrangement under which a provider does not store your prompts or outputs once the response has been returned. It usually needs approval or a contract, covers only some endpoints and features, and may exclude a provider's newest models. Content flagged for abuse, or required by law, can still be kept.

### Is pseudonymised data still personal data under the GDPR?

Yes. Replacing names and identifiers with tokens before a prompt leaves your systems reduces risk and is worth doing. But while you hold the key that maps tokens back to people, the data remains personal data and your obligations stay the same. Only data that can no longer reasonably be linked to a person falls outside the regulation.

### Does self-hosting a model solve the privacy problem?

It removes one external processor, which helps when data must not leave your environment. It does not remove your own obligations: prompts, logs, vector indexes and memory still hold personal data that needs access control, retention limits and deletion. It also adds GPU cost and operations work, and usually means a less capable model.
