# GDPR Basics for AI Apps

> How GDPR applies to an AI app that handles personal data: roles, what to send and keep, people's rights and impact checks, for your AI interview.

**In short:** GDPR is the EU privacy law. An AI app that sends people's personal data to a model must know who is responsible, send and keep only what the task needs, have a written contract with its vendor, and let people correct, copy or erase their data.

AI and LLM interview question Q459, Data, privacy, ethics and governance. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/gdpr-basics-for-ai-apps

## Say it in 30 seconds

GDPR is the EU's privacy law. When my AI app sends a person's data to a model, I treat myself as responsible for that data. I check the vendor has a contract that limits what it does with the data, send only what the task needs, and set how long copies are kept. People can ask for a copy of their data or have it erased, so the app must be able to find and delete it. For risky uses I write an impact check before launch.

## Say it in 2 minutes

GDPR is the European privacy law. It covers personal data, which means any information about a person who can be identified, such as a name, an email, a phone number or a chat history. An AI app handles this kind of data all the time, because users type it into prompts and documents carry it in.

The first question is roles. The app owner usually decides why and how the data is used, so it is the controller. The model vendor works on that instruction, so it is the processor. That needs a written contract, called a data processing addendum, and I check the vendor's default on training and retention. Vendors differ, so I read their terms and don't rely on memory.

Then I limit what I send and keep. In a claims assistant I strip names and phone numbers the task doesn't need, and I set how long logs and saved chats live. If someone asks for their data to be deleted, I need to find every copy, including the ones in logs.

Before launch I write a data protection impact assessment for anything high risk, like health data or decisions that affect someone's money. Those are the checks I would walk an interviewer through, and I would say honestly that no template covers every case.

## What is GDPR, in plain words?

GDPR is the General Data Protection Regulation, the European Union's privacy law. It has been enforceable since 25 May 2018. It reaches any organisation established in the EU, and any organisation elsewhere that offers goods or services to people in the EU or monitors their behaviour there.

Personal data is any information relating to an identified or identifiable person, such as a name, an email, a phone number or an IP address. A chat history that names someone counts too. An AI app meets this all the time, because users type it into prompts and documents carry it in. Microsoft's guide puts the core idea simply: the law gives people rights to manage the personal data an organisation collects about them.

Think of a hospital records desk. It may keep your file, but only for the care you came for, it has to show you what it holds, and it has to correct or remove it when you ask. A claims assistant that reads patient notes works the same way, and that is the picture to keep in mind.

Microsoft's guide lists six key principles of GDPR, starting with transparency, fairness and lawfulness. The guide also says to limit the processing of personal data to specified, explicit and legitimate purposes. Lawyers call this purpose limitation.

- **Personal data:** Any information about an identified or identifiable person, such as a name or an email.
- **Controller:** The party that decides why and how the data is used.
- **Processor:** The party that handles the data for the controller, on its instructions.
- **Data subject:** The person the data is about.
- **DPIA:** A data protection impact assessment: a written risk check before a high-risk use.

## Who is responsible, you or the vendor?

Two roles matter most. Microsoft's guide defines them like this.

> "A legal person, public authority, agency, or other body that, alone or jointly with others, determines the purposes and means of the processing of personal data." (Microsoft, controller)
>
> "A natural or legal person, public authority, agency, or other body, that processes personal data on behalf of the controller." (Microsoft, processor)

In most AI apps you are the controller for your users' data, and the model vendor is the processor. Some vendors play both parts. AWS says it acts as both a processor and a controller under the GDPR, so read the contract for each product instead of guessing.

*Diagram, Who does what under a vendor contract: You decide why the data is used, and the vendor works on your instructions. The written contract sets the limits for both, so the setup is only clear once it is signed.*
1. You set the purpose and the rules.
2. The vendor agrees to work only on those rules.
3. The signed contract sets the limits for both sides.

The contract carries the limits. That written contract is called a data processing addendum (DPA). Google's GDPR page says audit rights must be granted to controllers in their contracts with processors, and that data put into its systems is processed only on the customer's instructions. OpenAI says it can sign a Data Processing Addendum for its business and API products, so the contract can be in place before launch.

> **Tip:** Interviewers like roles first. Say who decides why the data is used, who signs the contract, and what the vendor may do with the data, before you talk about models.

## What should an AI app send, keep and delete?

Three habits do most of the work: send less, keep less, and be able to delete every copy.

1. **Send less:** Send only the fields the task needs, and strip the rest before the model call.
2. **Check the defaults:** Check the vendor's training and retention settings in writing.
3. **Map every copy:** Keep a map of logs, traces, saved chats and search indexes, so a deletion request can reach them all.

*Diagram, Where personal data travels in a claims assistant: A claim file holds personal and health details. Only the needed fields reach the model, and every copy left behind has to be findable and deletable when a person asks.*
1. The full claim file reaches your app first.
2. Only the fields the task needs go on to the model.
3. The vendor and your own logs may keep copies.
4. A deletion request removes every copy.

Purpose matters too. Microsoft's guide says you also need a "lawful basis" to process personal data, which is the legal reason for using it. Reusing the data to train something new is a new purpose. It must be compatible with the purpose you first collected the data for, or you need a new lawful basis. For decisions that change someone's money or rights, such as a refused claim, I would keep a person reviewing the model's output before it takes effect.

Vendors differ, so the default matters. Microsoft's Azure OpenAI privacy page says prompts and outputs are not used to train any generative AI foundation models without your permission or instruction. OpenAI says that by default it does not use business data to train its models.

How long a vendor keeps data, called retention, is a setting too. OpenAI's enterprise privacy page says deleted conversations are removed from its systems within 30 days, unless the law requires keeping them. Check the number in your own contract, because policies change.

Moving data abroad is a separate question. If a vendor processes data outside the European Economic Area (EEA), the transfer needs a lawful route. The EU's Standard Contractual Clauses (standard contract terms the EU approves for moving data abroad) are one such route, and AWS calls them a pre-approved data transfer mechanism under GDPR.

Here is a small redaction step (removing details before the model sees them) in plain Python. It drops the fields the task doesn't need and masks an email and a phone number in free text. Regex patterns catch only the obvious cases, so a real system also needs a proper personal data check and a review.

```python
import re

claim = {
    "claim_id": "C-88213",
    "policy_id": "P-7731",
    "customer_name": "Lena Hoffmann",
    "email": "lena.hoffmann@example.com",
    "phone": "+49 30 5550 1423",
    "note": "Call lena.hoffmann@example.com on +49 30 5550 1423 about the insulin pump claim",
}

KEEP = ["claim_id", "policy_id", "note"]

def mask(text):
    # Mask obvious emails and phone numbers in free text; regex is a first net, not a full PII check.
    text = re.sub(r"[\w.]+@[\w.]+", "[EMAIL]", text)
    return re.sub(r"\+?\d[\d ]{8,}\d", "[PHONE]", text)

safe = {k: claim[k] for k in KEEP}
safe["note"] = mask(safe["note"])
print("Sent to model:", safe)
print("Kept out:", sorted(set(claim) - set(KEEP)))
```

Output:

```text
Sent to model: {'claim_id': 'C-88213', 'policy_id': 'P-7731', 'note': 'Call [EMAIL] on [PHONE] about the insulin pump claim'}
Kept out: ['customer_name', 'email', 'phone']
```

## What rights do people have, and when do you need an impact check?

People keep rights over their data. Microsoft's guide says the GDPR lets individuals correct inaccurate data, have data erased or its processing restricted, receive their data, and send it to another controller. In your app, that means you must be able to find every copy of a person's data.

A data protection impact assessment, or DPIA, is a written risk check you do before a high-risk use of personal data. The GDPR asks for one when a use is likely to be high risk. Health data is one of the special categories with stricter rules, so a claims system that reads medical notes is a clear case to check.

> "Data controllers are required under GDPR to prepare a DPIA for data operations that are "likely to result in a high risk to the rights and freedoms of natural persons."" (Microsoft, DPIA)

- **Without the check: Medical notes go out with every prompt.** Nobody checked what leaves the building or how long it stays.
- **With the check: Only what the task needs goes.** Notes stay out unless a claims handler needs them, and copies expire.

A mid-size insurer in Germany runs a claims assistant that reads about 4,000 claim files a month. Each file holds a name, a policy number and sometimes a medical note. Medical notes are health data, one of the special categories with stricter rules. So the team does a DPIA, drops medical notes from prompts unless a claims handler needs them, and deletes stored copies once the claim closes and a set retention period passes.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition: personal data is anything that identifies a person.
- [ ] Roles: you are usually the controller, the vendor the processor, and a contract ties them.
- [ ] Send less, keep less, and be able to delete every copy.
- [ ] Vendor training and retention defaults differ, so check them in writing.
- [ ] A DPIA before launch for high-risk uses, such as health data.
- [ ] An honest limit: the law sets the goals, and the design choices are yours to defend.

**Common traps**

- Trap: "Our vendor is GDPR certified, so we are covered." Better: A vendor's compliance page doesn't make your app compliant. You still choose what to send and keep.
- Trap: "We removed the names, so it is anonymous." Better: Removing names is often not enough. A chat about a rare condition can still point to one person, so treat it as personal data.
- Trap: "Personal data only means names and emails." Better: Any detail that can identify a person counts, including IP addresses, voice recordings and chat history.

## Can you spot the weak setup?

**Spot the weakest setup:** Which setup is the weakest for a patient-notes summariser?

A. Notes go to the vendor under a signed processing contract, with training switched off.
B. Full notes go out, and the vendor's logs keep them with no deletion limit set.
C. Only the visit date and clinic code go out, and copies expire after the set period.
D. A DPIA is written before launch, and every clinician's access is logged.

**Answer:** B. Full notes with no deletion limit means health data sits with no limit and no clear way to erase it. The other three each cut risk: a contract, fewer fields, and a written risk check.

**Quick check:** You plan to send health notes to a model vendor's API. What comes first?

A. Pick the biggest model you can afford
B. Sign a processing contract and write the impact check
C. Turn on streaming for faster replies
D. Add more examples to the prompt

**Answer:** B. Health notes are sensitive personal data, so the contract and the risk check come before any data flows. Model size, streaming and prompt examples don't change who is responsible or what gets kept.

## Can you answer these from memory?

**Flash cards**

- **What is personal data?** Any information that can identify a person, such as a name, email or chat history.
- **Controller vs processor?** The controller decides why and how data is used. The processor works on its instructions.
- **What is a DPA?** The written contract that sets what the vendor may do with personal data.
- **What is a DPIA?** A written risk check done before a high-risk use of personal data.
- **Which rights do people have?** Correction, erasure, restriction, and getting a copy of their data.
- **The first habit?** Send and keep less: strip fields the task doesn't need, and set a deletion limit.

## Likely follow-up questions

- Q212 How do you detect and redact PII? https://designervenkat.online/interview/ai/how-to-detect-and-redact-pii
- Q213 What is sensitive information disclosure? https://designervenkat.online/interview/ai/what-is-sensitive-information-disclosure
- Q242 How do you log without storing sensitive data? https://designervenkat.online/interview/ai/how-do-you-log-without-storing-sensitive-data
- Q460 What are the EU AI Act risk tiers? https://designervenkat.online/interview/ai/what-are-the-eu-ai-act-risk-tiers
- Q463 Auditability and audit logs? https://designervenkat.online/interview/ai/auditability-and-audit-logs
- Q464 Data retention and zero-data-retention? https://designervenkat.online/interview/ai/data-retention-and-zero-data-retention
