Applied AI: Privacy and Data Governance

Privacy and Data Governance

Information in this post reflects publicly available sources as of November 1, 2026. It describes common practice, not legal advice.

In the spring of 2023, engineers at Samsung pasted internal source code and meeting notes into ChatGPT to get help debugging and summarizing. Within weeks, the company banned generative AI tools on its devices and networks. The story became the standard warning about AI and confidential data, and it shaped a generation of corporate AI policies.

The lesson most people took from it was "don't paste secrets into chatbots." That lesson is now too narrow. A modern AI application does not just send a prompt to a model. It logs the prompt, embeds documents into a vector store, saves facts to memory, passes data to tools, and copies real cases into eval sets. The chatbot is one destination among many.

This post is about governing data in AI applications from the builder's side: where data actually goes, what providers do with it, how to minimize it, and the decisions worth making before something leaks.


The problem: every feature makes a copy

Data protection has always been about knowing where data lives, who can see it, how long it stays, and how to delete it. AI applications multiply the answers. A single customer question can end up in your application logs, an observability platform, the model provider's abuse monitoring, a vector store, a memory file, a web search query, and next quarter's eval dataset.

Each copy has its own retention period, its own access controls, and its own deletion process, and most of them are created by default. The privacy risk in most AI applications is not the model learning your secrets. It is the copies you made without deciding to.


How it works

Map where the data goes

The first governance task is a map. For each AI feature, follow one realistic request and list every system that stores or receives any part of it.

ONE QUESTION, MANY COPIES User types a question Your app builds the prompt COPIES YOU KEEP Logs and traces full prompts, for months Vector store chunks of your documents Agent memory facts kept across chats Eval datasets copied from production COPIES THE PROVIDER KEEPS Abuse monitoring logs often up to 30 days Stateful features files, threads, until deleted Flagged content can be kept much longer model call COPIES THIRD PARTIES GET Tools and MCP servers whatever the agent sends them Web search queries built from your data Observability vendor if traces are hosted externally Each copy has its own retention, access, and deletion story. Most of them are yours, not the model provider's.

The map usually holds surprises. Teams discover that full prompts, including customer details, are kept in tracing tools for months; that the vector store indexes documents the user asking the question should never see; or that an MCP server run by a third party receives raw customer records. Each of these is fixable once it is visible.

What providers do with your data

Model providers distinguish sharply between consumer products and business services. Consumer chat apps may use conversations to improve models, depending on the provider and the user's settings. Business APIs generally do not train on your data by default: OpenAI's API data is not used for training unless you opt in, and Anthropic's commercial terms bar training on customer content.

Not training is not the same as not storing. Providers typically keep API inputs and outputs for a limited period for abuse monitoring, often up to 30 days. Stateful features, such as uploaded files, stored conversations, and vector stores hosted by the provider, keep data until you delete it. Content flagged by safety systems may be kept far longer; Anthropic, for example, states it may retain flagged inputs and outputs for up to two years.

For stricter needs, providers offer zero data retention (ZDR) arrangements, usually by approval, in which inputs and outputs are not stored after the response. ZDR tends to exclude features that need storage by design, such as file uploads and batch processing. Free tiers can differ again: some providers' free API tiers allow data to be used to improve their products, which is a reason to keep real customer data off them.

Question to answerWhy it matters
Is our data used for training?Differs between consumer apps, free tiers, and business terms
How long are inputs and outputs kept, and why?Abuse monitoring, stateful features, and flagged content have different periods
Is zero data retention available, and which features does it disable?Some features need storage and stop working without it
Where is data processed and stored?Data residency rules and transfer requirements
Is there a data processing agreement, and a BAA for health data?Required by GDPR for processors, and by HIPAA for health data in the US
Which subprocessors are involved?Your data's real path may include more companies than the one you contracted

Answer these from the provider's current terms and your contract, not from blog posts or memory. Policies change, and the contract is what governs.

Minimize before you send

The most reliable protection is not sending data in the first place. Data minimization means passing the model only what the task needs. A model drafting a refund reply needs the order number and the problem; it does not need the customer's full name, phone number, or card details.

MINIMIZE BEFORE YOU SEND what the user wrote Hi, I'm Maria Lopez. Call me on +1 415 555 0134 or maria.l@example.com: the refund for order 88213 never arrived. redact what the model sees Hi, I'm [PERSON_1]. Call me on [PHONE_1] or [EMAIL_1]: the refund for order 88213 never arrived. Model drafts a reply using the placeholders Mapping table stays in your system, short-lived Restore before showing the user "Sorry, Maria. I have reopened the refund for order 88213 and emailed maria.l@example.com." Keep what the task needs (the order number); replace what it does not (name, phone, email). The model never sees the originals.

Pseudonymization goes a step further: replace personal details with placeholders before the call, keep the mapping inside your system, and restore the originals in the reply. The model works with "[PERSON_1]" and the user still sees their own name.

import re

PATTERNS = {
    "EMAIL": r"[\w.+-]+@[\w-]+(?:\.[\w-]+)+",
    "PHONE": r"\+?\d[\d\s().-]{7,}\d",
}

def pseudonymize(text: str, known_names: list[str]) -> tuple[str, dict]:
    mapping, counters = {}, {}

    def swap(kind: str, value: str) -> str:
        for key, original in mapping.items():
            if original == value:
                return key                                # same value, same placeholder
        counters[kind] = counters.get(kind, 0) + 1
        key = f"[{kind}_{counters[kind]}]"
        mapping[key] = value
        return key

    for name in known_names:                              # e.g. from the customer record
        if name in text:
            text = text.replace(name, swap("PERSON", name))
    for kind, pattern in PATTERNS.items():
        text = re.sub(pattern, lambda m: swap(kind, m.group()), text)
    return text, mapping

def restore(text: str, mapping: dict) -> str:
    for key, original in mapping.items():
        text = text.replace(key, original)
    return text

The function replaces known names and anything that looks like an email address or phone number with numbered placeholders, and returns the mapping so restore can put the originals back in the model's reply. Regular expressions catch only predictable formats, so production systems use dedicated detectors such as Microsoft's open-source Presidio or cloud services for detecting personal data. Minimization also has a cost: a model that never sees a detail cannot use it, so test that answers stay good after redaction.

Your own copies are the bigger risk

Provider retention gets the attention, but the copies you keep usually last longer and are seen by more people. Logs and traces are the main offender. Full prompts are invaluable for debugging, as the observability post argued, so redact them at capture time, restrict who can read them, and set retention to weeks rather than forever.

Vector stores need the same permissions as the documents in them. If an HR policy and an employee's performance review are indexed together, a retrieval system that ignores document permissions will happily quote the review to anyone who asks a related question. Filter retrieval by the requesting user's access, using the source system's permissions, as described in the RAG post.

Memory and eval datasets need deliberate decisions too. Agent memory should not quietly accumulate sensitive facts, so define what may be remembered and let users see and delete it. Eval sets built from production data should be minimized like any other copy. And when a person asks for their data to be deleted, the deletion must reach every copy, including embeddings and memory, not just the main database.

Where it runs

Location matters when regulations or contracts require data to stay in a region. Major providers now offer regional processing and storage; OpenAI, for example, offers regional processing in the United States, the European Union, and the United Arab Emirates, with storage in several more countries. Cloud platforms such as Amazon Bedrock, Google Cloud's Vertex AI, and Microsoft Foundry let you run models in specific regions under agreements your organization may already have.

For the most sensitive data, open-weight models running on your own infrastructure keep everything inside your boundary, at the cost of operating them, as the open-weight models post covered.

Regulation in brief

Existing privacy law already applies to AI. Under the GDPR, sending personal data to a model provider is processing by a processor, which needs a lawful basis, a data processing agreement, attention to international transfers, and support for people's rights, including deletion. In the US, health data covered by HIPAA requires a business associate agreement with any provider that handles it.

The EU AI Act adds AI-specific duties on a staggered timeline. Its prohibited practices have applied since February 2025, and obligations for general-purpose model providers since August 2025. Following the Digital Omnibus amendments adopted in 2026, obligations for high-risk systems listed in Annex III now start on December 2, 2027, and those tied to Annex I product legislation on August 2, 2028. Check the current text and get legal advice for your situation, because the details depend heavily on what your system does.


When to apply it, and how much

Governance should scale with the sensitivity of the data. A practical way to start is a short policy that classifies data and states which destinations each class may go to. Writing it down once prevents a thousand individual judgment calls, most of them made in a hurry.

WHICH DATA MAY GO WHERE (EXAMPLE POLICY) Personal chat app Business API No-retention API, in region Self-hosted model Public docs, marketing, open code allowed allowed allowed allowed Internal plans, internal code no allowed allowed allowed Personal data customers, employees no if minimized allowed allowed Restricted health, payment, secrets no no if minimized allowed An illustrative policy, not legal advice. The point is to decide once, in writing, so nobody decides alone at 5 p.m.

Public material can go almost anywhere. Internal material should stay in approved business tools. Personal data needs a business agreement, minimization, and sensible retention. Restricted data, such as health records, payment details, and secrets, needs the strongest controls available: zero retention, the right region, redaction, or self-hosting.

The policy only works if the approved path is easy. Employees who are told "no AI" but not given an approved alternative will use personal accounts. Provide sanctioned tools with business terms, and the shadow usage mostly disappears.


What goes wrong

Shadow AI. Employees use personal accounts on consumer tools because the approved option is slow or missing. Sensitive data flows to services with consumer terms, and nobody knows. Offer good approved tools, and make the policy short enough to remember.

Logs full of personal data. Tracing captures every prompt in full, kept indefinitely and readable by every engineer. Redact at capture, restrict access, and set retention.

Retrieval that ignores permissions. A shared vector store answers questions with documents the user should not see. Enforce access at query time, and test with users who have different permissions.

Deletion that misses copies. A deletion request clears the database but not the embeddings, memory, eval sets, or backups. Keep the data map current so deletion can follow it.

Exfiltration through the agent. A prompt injection persuades an agent to send private data to an attacker, through a link, an email, or a tool call. Limit what agents can send outward, as described in the prompt injection post.

Unvetted tools. An agent connects to a third-party MCP server or plugin that receives whatever the agent passes it. Review tools like any other vendor that processes your data.


Cost, latency, and complexity

Most privacy controls are cheap. Redaction adds milliseconds, shorter log retention reduces storage costs, and permission-aware retrieval is mostly a filter on queries you already run. The larger costs are in features you may give up: zero retention can disable file uploads, batch processing, and provider-hosted state, and minimization can lower answer quality when the removed details mattered.

Regional processing and self-hosting cost more, in money or operations, so reserve them for data that requires them. The most expensive option is the one many organizations start with: banning AI outright, which pushes usage into personal accounts and removes all visibility.


The current landscape

The major model providers offer business terms without training on customer data, data processing agreements, zero retention by approval, and regional processing options, though the details and eligible features differ by provider and change over time. Cloud platforms such as Amazon Bedrock, Google Cloud's Vertex AI, and Microsoft Foundry add regional deployment and existing enterprise agreements.

For detecting and redacting personal data, Microsoft's Presidio is a widely used open-source option, and cloud providers offer managed services, including Google Cloud's Sensitive Data Protection and Amazon Comprehend's PII detection. Amazon Bedrock Guardrails and several AI gateways can filter personal data in prompts and responses.

For governance frameworks, ISO/IEC 42001 defines an AI management system standard that organizations can certify against, and the NIST AI Risk Management Framework offers voluntary guidance. Neither replaces privacy law, but both help structure the policies, maps, and reviews described here.


Summary

Privacy in AI applications is less about the model and more about the plumbing. Every feature, from logging to retrieval to memory to tools, makes a copy, and each copy needs an owner, a retention period, access controls, and a way to be deleted.

So map the data before you ship, read the provider terms you actually signed, minimize what reaches the model, and govern your own copies at least as strictly as the provider's. Classify data once and make the approved path the easy path. The goal is not to keep data away from AI, but to know, at every moment, exactly where it went.


Part of the Applied AI series: AI from the builder's side.



×