esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Let’s talk

I’ll build the agent for it.

What Is Data Retention and Zero Data Retention?

How long AI providers and your own systems keep prompts and answers, what zero data retention really covers, and where copies still sit, for your AI interview.

In short

Retention is how long a copy of your data is kept. Zero data retention (ZDR) is an approved arrangement where the provider keeps no prompts or answers after the reply for the features it covers, apart from narrow safety exceptions. Your own copies still need their own limits.

13 min readIntermediateOccasional · estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Data retention is how long a copy of my data is kept, and by whom. Zero data retention is an approval with a provider: for the features it covers, they keep no prompts or answers once the reply is sent, apart from narrow safety exceptions. It is not automatic. It depends on the feature and sometimes the model. And it only covers their copies, so my own logs, traces and backups still need a set period and a scheduled delete.

What is data retention, in plain words?

Retention is how long a copy of something is kept before it is deleted. A copy can sit in more than one place, and each place can have its own rule.

Think of a claims firm's file room. Each file is kept for a set time, then shredded on a schedule. Zero data retention is a stronger deal: a print shop that copies your papers agrees to keep nothing once the job is done, and you check that they do.

In AI, a claims agent sends a 12-page medical report to a model. The provider may keep a log of that call, and your own app may keep another copy.

Key words

Retention
How long a copy is kept, and where.
Zero data retention (ZDR)
An approved deal where the provider keeps no prompts or answers after the reply for eligible features, apart from narrow safety exceptions.
Abuse log
A record a provider keeps of API calls to catch misuse. OpenAI keeps these for up to 30 days by default.
Application state
Data a feature stores to do its job, such as a saved thread or an uploaded file.
Trace
A record your own app writes of each step an agent took, so you can debug it.

What do the big providers keep by default?

OpenAI keeps abuse monitoring logs of API use by default, for up to 30 days, unless longer retention is required by law, or it is reasonably necessary to protect its services or a third party from harm. Anthropic keeps prompts and outputs by default only for certain models.

  • “By default, abuse monitoring logs are generated for all API feature usage and retained for up to 30 days, unless longer retention is required by law, or is reasonably necessary to protect our services or any third party from harm.”

    OpenAI

  • “Conversation content (your prompts and Claude's outputs) is not retained by default; the exception is Covered Models, which require 30-day retention.”

    Anthropic

Training is a separate question from storage. OpenAI says data sent to its API is not used to train or improve its models unless you opt in. Anthropic says retained data is never used for training without your express permission. Neither statement stops the storage that remains.

Where one request can leave copies

Your app

sends the prompt and a document

Model

reads it and writes the answer

Provider keeps

Abuse logs

up to 30 days by default

Stored state

threads, files, until deleted

  1. 1Your code sends the prompt to the model.
  2. 2The provider logs the call for abuse checks, by default for up to 30 days.
  3. 3Some features also store state, such as threads or files, until you delete them.
One request and the copies it can leave with the provider. Zero data retention removes the provider's copies only where the feature is eligible. Your own copies sit outside this picture.

Take a mid-size insurer that sends about 4,000 claim calls a month, a made-up volume. At 30 days of abuse logs, roughly one month of those calls sits with the provider at any time. The team cannot shrink that number by changing its prompts.

What does zero data retention really cover?

ZDR is an approval, not a default. OpenAI says eligible customers can be approved for it, and then eligible endpoints do not retain any customer content for application state.

  • “Zero Data Retention eligible endpoints do not retain any customer content for application state, subject to the limitations below.”

    OpenAI

  • “Under a Legacy ZDR arrangement, Anthropic does not store customer prompts or responses at rest after the API response is returned.”

    Anthropic

Anthropic's page now lists three data arrangements: Legacy ZDR, HIPAA readiness and Enterprise Frontier Safeguards ZDR. The last one is in beta. So I name which one a contract gives me, because the quote above is for Legacy ZDR only.

Two things surprise people. First, it is per feature. On OpenAI's data controls table, the rows for files, conversations and vector stores show data kept until you delete it, and none of them is ZDR eligible. Switching ZDR on does not reach them.

Second, it can depend on the model. Anthropic says some models need 30-day retention and are not available under Legacy ZDR unless Anthropic authorises them.

Third, a safety check can override ZDR. If OpenAI's classifier flags an image or file as possible child abuse material, it is kept for manual review, even with ZDR on. And OpenAI can make a model ineligible for a specific customer if that is needed to prevent severe risk activity.

  1. 1

    Get it in writing

    Ask for the approval on the account, and check which level it was set at. OpenAI sets it for the whole organisation or per project.

  2. 2

    List the features

    Check each endpoint and model your app calls against the provider's table, not against the headline.

  3. 3

    Test one real claim

    Send a test request, then look at what the provider and your own systems store about it.

  4. 4

    Own the rest

    The provider's promise ends at its own walls. Your logs, traces and backups need their own rules.

Take a claims-triage agent at a mid-size insurer, a made-up example. The team turns on ZDR, then uploads each 12-page report to the provider's file store so a later step can read it again. Weeks later the reports are still there. Files are kept until deleted, and that endpoint is not ZDR eligible. The fix is to send the report inside the request and delete any upload after use.

Tip

Asked whether your data is retained, don't answer with one word. Name the feature, the account setting and the model, then say what is still kept.

Where do the copies you control still live?

A provider's promise covers only what it stores. Your side has more copies: traces, caches, a vector index, backups, and exports that a tool saved to a shared drive.

OWASP's 2026 list warns that observability tools such as Langfuse, LangSmith and Datadog log full prompts, completions and traces by default. So a ZDR contract can sit next to a full copy in your own monitoring tool. OWASP's advice is to enforce no-train and no-retain in the technology, not only in policy text.

  • Traces

    Keep the steps for debugging, with names and IDs masked. Make the period short, such as seven days, and write down why.

  • Caches and queues

    A saved answer or a job waiting in a queue is a copy too. Give it an expiry time.

  • Backups

    A backup holds data from before a delete. Its lifetime sets how long deleted data still exists, so plan for it.

  • Vector index

    Text chunks from a claim file are a copy. Remove them when the source file is deleted.

Your own copies, for one claim

Claim PDF

medical report, 12 pages

Claims agent

reads it, drafts a triage

Your copies

Trace store

names masked, 7 days

Backups

copied nightly, 35 days

Claim record

kept per your legal policy

  1. 1The agent reads the report from the claim file.
  2. 2Traces keep the steps for debugging, with names masked.
  3. 3Backups hold the same data until the backup expires.
  4. 4The claim record is kept for the period your policy sets.
Made-up periods for one claim. The provider's copies are a separate question, and zero data retention can cover only those. Each copy on your side needs its own period and its own delete.

How would you set retention for a claims-triage agent?

Start with a list of every copy, then set one period per kind, not one for the whole system. This is the order I follow.

  1. 1

    List every copy

    Provider logs, stored state, traces, caches, backups, the vector index and exports to the claims system.

  2. 2

    Give each kind a purpose and a period

    Prompt copies 30 days, traces 7 days, backups 35 days, the claim record as the policy sets. The numbers are made up for this example.

  3. 3

    Automate the delete

    A nightly job removes what has expired and writes a line for each thing it removed, so the delete can be checked.

  4. 4

    Set the vendor side in writing

    ZDR where the feature is eligible, uploads deleted after use, and a note of which models are not covered.

  5. 5

    Test it end to end

    Pick a test claim, follow its copies everywhere, and check the job removes them on time.

The code below is that nightly job in miniature. It uses made-up periods and gives the same output every run.

Python
# A simplified retention sweep for a claims agent's own copies. The periods are made-up numbers for this demo.
from datetime import date

TODAY = date(2026, 11, 27)
KEEP_DAYS = {"prompt_copy": 30, "trace": 7, "claim_file": 2555}

records = [
    ("prompt_copy", "c-1042", date(2026, 10, 20)),
    ("trace", "c-1042", date(2026, 11, 18)),
    ("trace", "c-1077", date(2026, 11, 25)),
    ("claim_file", "c-0931", date(2025, 6, 4)),
    ("claim_file", "c-1042", date(2026, 10, 1)),
]

def expired(kind, made):
    return (TODAY - made).days > KEEP_DAYS[kind]

kept, deleted = [], []
for kind, claim, made in records:
    (deleted if expired(kind, made) else kept).append((kind, claim))

for kind, claim in deleted:
    print("delete", kind, claim)
print("kept", len(kept), "of", len(records))

Output

delete prompt_copy c-1042
delete trace c-1042
kept 3 of 5

The rule to say out loud: a delete job is only as good as its list. A copy that is not on the list is never deleted.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: how long a copy is kept, and by whom.
  • ZDR is an approved arrangement, per feature and sometimes per model.
  • Training and retention are separate settings.
  • The provider's promise covers its copies only, so name your own.
  • A delete job that works from a written list of copies.
  • Honest limits: approval, eligibility, and a test before you trust it.

Common traps

  • Trap"Zero data retention means nothing is stored anywhere."

    BetterIt covers the provider's eligible features only. Your logs, backups and file uploads still need their own rules.

  • Trap"Turn it on and we are done."

    BetterIt needs approval, and it can depend on the feature and the model. Test one claim end to end.

  • Trap"The model doesn't train on our data, so retention doesn't matter."

    BetterTraining and storage are separate. A provider can skip training and still keep a log for abuse checks.

Can you spot the retention gap?

Spot the gap

Your team says the claims agent is under zero data retention. Which line keeps a full copy of the claim text on our side?

Quick check

A team turns on ZDR, then uploads claim PDFs to the provider's file store so a later step can reuse them, with no expiry set. What happens to the files?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q459GDPR basics for AI apps?12 min
  2. Q463Auditability and audit logs?11 min
  3. Q242How do you log without storing sensitive data?11 min
  4. Q213What is sensitive information disclosure?12 min
  5. Q465Transparency duties (AI disclosure, deepfake labels)?11 min

Last updated on 27 November 2026

Setting data rules for an AI system that handles customer records?

I design and build AI products and agents, including the system behind them, so data handling is set up from the start. Book a short call and tell me what data you handle and where it goes.