Skip to main content

Context Layer 19 min read

How to Protect Sensitive Data You Send to LLMs

Quick answer

Protect sensitive data sent to LLMs by deciding, for each agent call, which fields may leave your enterprise. Provider terms cover training use and retention after data arrives; your team decides what is sent. Classify and authorize context, send only what the task needs, mask permitted values, enforce one policy in code and at the gateway before forwarding, and log the fields sent and withheld. Atlan supplies the sensitivity tags, lineage (where each column flows) and policy context these checks read.

  • Check provider terms: training use, retention and zero data retention for the exact service
  • Classify and authorize: tag sensitive fields and check what may go to each provider
  • Minimize and mask: send only what the task needs; mask permitted values
  • Enforce in code: request builder rules plus a gateway check before forwarding
  • Log decisions: fields sent and withheld, never the sensitive values

Is your agent context ready?

Check Agent Readiness

Protect sensitive data you send to LLMs by deciding, per agent call, which fields may leave and masking or withholding the rest. Atlan, the AI Context Platform, supplies the inputs to that decision: PII tags that lineage (the record of where each column flows) carries to downstream tables, plus governed definitions and policy context that agents reach through Atlan’s MCP server. MCP, the Model Context Protocol, is the open standard agents use to call tools and data, and every Atlan MCP action respects the permissions already set in Atlan.

Audit what your agents send to external models


Give it a production agent and the models it calls. It checks what the agent may read, what it may send to each provider, who reviews, and what you can reconstruct afterward. Read the skill.

Paste into a new chat

Use the skill at https://atlan.com/skills/agent-guardrails-audit.md to audit what an agent may send to external LLM providers. Ask me for whatever it needs.

Run once in a terminal

curl -fsSL --create-dirs \
  -o ~/.agents/skills/agent-guardrails-audit/SKILL.md \
  https://atlan.com/skills/agent-guardrails-audit.md

For an agent

curl -fsSL https://atlan.com/skills/agent-guardrails-audit.md

If your team runs agents against externally hosted model APIs, every prompt, retrieved passage and tool result in a call leaves your security boundary. A provider’s no-training commitment governs what happens after the data arrives. Once a customer’s bank details reach the provider, the disclosure has happened, and a privacy reviewer will ask who allowed it.

The decision itself runs in your own code. The request builder applies the disclosure rules, and a gateway inspects the finished request before forwarding it, so a prompt that tries to talk the agent into sharing more does not change the outcome.


What crosses the boundary in an agent call?

Anything your agent includes in a request to an externally hosted model crosses your enterprise’s security boundary. That includes information the agent retrieves or generates during the task, alongside the user’s original question.

Review these three parts of every request:

  • Prompts and conversation history: Check the user’s question, attached content, system instructions and earlier messages included in the call for personal information or confidential business details.
  • Retrieved context: Document excerpts, database results and sample values cross the boundary when the agent includes them in a model request. A short support question can pull an entire ticket history, unrelated contacts included, into the call.
  • Tool outputs: A customer lookup or database query may run internally, but its results leave the enterprise if the agent forwards them to the external model for the next step.

Check each outbound call in a workflow. If an external embedding service (which turns text into vectors for search), reranking service or tracing service also receives content, treat it as a separate recipient with its own approval.

Handling PII in AI pipelines sets upstream classifications and transformations that carry into request preparation, while connecting enterprise data sources to LLMs securely protects the connection itself. Even through a protected connection, data privacy for AI agents needs a separate decision about which information each external service may receive. Map the recipients and payloads first; only then do provider commitments tell you anything useful.


What do major providers document about training and retention?

Providers document whether they train on your content, how long they keep it, and which services qualify for zero data retention (ZDR), an arrangement under which the provider does not store request and response content. Check each one for the exact product and features your agent uses, because a no-training commitment can coexist with stored prompts, responses or files.

As of December 2, 2026, OpenAI’s API documentation, Anthropic’s Privacy Center and Snowflake’s AI feature documentation describe these commitments:

Provider or service Training use Retention and ZDR
OpenAI API API data is not used to train models unless you explicitly opt in. Abuse-monitoring logs are kept for up to 30 days by default, longer where required by law or to prevent harm. ZDR requires OpenAI’s prior approval, and some endpoints and features may still store application state.
Anthropic API Commercial inputs and outputs are not used for training by default. Submitted feedback or explicit permission can allow training use. API inputs and outputs are deleted within 30 days, with exceptions such as the Files API, Usage Policy enforcement and legal requirements. ZDR is subject to Anthropic’s approval, and Covered Models still require limited retention and safety review.
Snowflake AI features Customer data is not used to train models made available to other customers. Except as the customer elects, AI models run inside Snowflake’s security and governance perimeter. Check retention for each feature you enable.

Where each provider documents its terms


According to OpenAI’s data controls documentation, abuse-monitoring logs and stored application state have separate retention rules, and enabling ZDR does not make every endpoint or feature eligible.

According to Anthropic’s training policy, commercial and consumer products have different terms. Its commercial retention policy and ZDR guidance list the exceptions for stored features, legal obligations, safety enforcement and Covered Models.

According to Snowflake’s AI features overview, customers control use of AI features through role-based access control. Customers can elect processing outside Snowflake’s security perimeter, so record the processing arrangement selected for each service.

Record the approved service, model, features, retention settings and review date. Those commitments govern how the recipient handles data; the decision about which sensitive information an agent may send stays with your team.


What sensitive-data controls stay your responsibility?

Your team decides which information an agent may send, how it removes unnecessary sensitive content, and how it records what happened.

According to OWASP’s LLM02:2025 guidance, mitigations for sensitive information disclosure include data sanitization, least-privilege access controls and secure system configuration. Those controls apply even when the provider has agreed not to train on your data.

Classify sensitive information and authorize what may be sent


Identify personal information, credentials, confidential business details, and combinations of fields that reveal something sensitive together. Use data classification and tag management for AI to keep labels consistent, and lineage for AI-ready data to track where classified columns flow, including derived tables.

Then check what the agent may use for the task and what the external provider is approved to receive. An agent’s permission to read a customer record does not authorize sending that record to a provider, so make agent access control specific to both the task and the recipient.

For regulated information, apply the requirements for GDPR compliance for AI agents and HIPAA compliance for AI agents. Masking alone does not establish compliance.

Send only the context the question requires


Select only the fields and passages the external model needs to answer the question. An agent summarizing a service issue may need ticket history and product details, while payment instructions and unrelated contacts can stay inside the enterprise.

Apply the same limits when the agent retries or retrieves more. In Atlan’s session on the post-AI data stack, Austin Kronz describes analytics agents that start with certified metrics and tell the user when they fall back to browsing other data. For sensitive data the fallback path matters just as much: any broader retrieval must pass the same checks before its results reach an external model.

Mask permitted sensitive values before transmission


Remove unnecessary sensitive fields, then apply approved masking, tokenization or aggregation where policy permits sending a transformed value. Keep any mapping to original values inside the enterprise, and check whether the remaining details still identify someone. Column tags cover structured fields; free text in tickets, documents and chat history needs content inspection as well.

Record what was sent and what was withheld


Record the requesting agent, task, model destination, policy version, the fields sent and the fields withheld. Include enough source and transformation references to reconstruct why the request was allowed.

Log record IDs, field names and policy decisions instead of sensitive values, and keep tracing tools from capturing full prompts unless their storage is approved too. NIST AI 600-1, NIST’s 2024 Generative AI Profile, lists data privacy among its generative AI risks, including leakage and unauthorized disclosure of personally identifiable information. An audit trail is how you show that risk was managed for a specific call.


Where should sensitive-data controls be enforced?

Enforce sensitive-data controls at three points in your own stack, plus the provider’s terms at the far end. Check what the agent may read before retrieval, apply disclosure rules while the request is prepared, and inspect the completed request at the gateway before it is forwarded.

Enforcement point What to enforce Why it belongs here What it leaves to the next point
Before the agent retrieves enterprise information Check the agent’s identity, task and permission to read specific documents, records and fields. Keeps unauthorized information out of the agent’s context. Permission to read information does not establish permission to send it to an external provider.
While the agent prepares the model request Select necessary information, apply approved masking, and confirm that sending the rest to the selected provider is allowed by policy. Decides what may leave the enterprise for this task. Later tool outputs or extra retrievals can add sensitive information that needs another check.
At the gateway, before forwarding Inspect the completed request, block prohibited content, and allow calls only to approved provider services and endpoints. Checks both the payload and the service receiving it. The gateway needs the business rules for each field supplied to it.
At the provider’s service Apply the agreed training-use terms, retention settings and service-access controls. Governs how the provider handles received information. Comes after disclosure, so it cannot undo a field that should not have been sent.

Keep the disclosure decision outside the model


Run the disclosure check as deterministic code in the request builder and the gateway, because an agent asked to check its own payload can be argued out of it, as prompt injection attacks on AI agents show. When a field has no classification, fail closed: withhold it and flag it for review.

One request, end to end


A support agent is asked to summarize a billing dispute. Retrieval returns the ticket thread and the customer record. The request builder reads the record’s tags: the bank account column is tagged as restricted for external models, so it is withheld; the customer ID is permitted only as a token, so it is masked. The gateway then confirms the destination is an approved endpoint and scans the free text for anything the tags missed, and the log records the withheld and masked fields by name.

Gateways, routers and the context layer


An MCP gateway manages calls between agents and MCP servers, including authentication, tool-access checks and routing. A context layer supplies the business meaning, classifications, lineage and policy context behind the information those servers return. Permission to call a customer-lookup tool says nothing about whether the returned bank details may go to an external model, so the MCP gateway and context layer must work together.

An AI gateway checks calls to model providers. If a router switches providers after a timeout, the replacement service must also be approved to receive that information, which is a key test when weighing a model router versus a model gateway.

When comparing LLM gateway options, check whether fallback routing stays within approved provider services. Test AI guardrails tools against restricted fields added through retrieval or tool outputs. Your enterprise agent guardrails checklist should record whether each prohibited request was blocked before transmission, since a logged warning does not stop a request.


How do you keep one policy across models and partners?

Keep one enterprise policy that defines what agents may access and which data or document passages they may send to external providers or partners, then apply each provider’s approved data-handling conditions on top. Switching models must preserve restrictions on sensitive information, even when the replacement provider has different training or retention terms.

Amandeep Khurana, Member of Technical Staff at Anthropic, said in an Atlan panel on open context interchange:

“I don’t think context is going to live inside a single platform, right?”

Keep rules attached to the data and the agent


Disclosure rules face the same problem, so keep them attached to the information and the requesting agent where every integration can read them:

  • Identify the agent and its task: Use a distinct AI agent identity and role-based access control for context to decide what the agent may use. Changing the model must not expand those permissions.
  • Maintain shared classifications and rules: In your agent context layer design, keep approved classifications and disclosure rules available to every integration, and express them as policy as code so they can be versioned and tested. A model-agnostic context layer lets teams reuse that context while enforcing the conditions approved for each provider.
  • Preserve restrictions during handoffs: In secure multi-agent systems, passing a task to another agent or partner must trigger checks against that recipient’s permissions. The first agent’s access does not authorize every downstream participant.
  • Test policy changes across integrations: When you give agents access to enterprise data, test permitted and prohibited requests against each approved provider. Use context observability to record which rules applied, what was sent and what was withheld.

If a policy prohibits sending bank details to external models, every provider integration must withhold them. If another field is approved for only one provider, a provider switch must trigger a new check before that field is sent.

Reviews of AI agent risks and guardrails should include failed retrievals, provider switches and downstream handoffs. To assess governed versus ungoverned access, compare which fields each integration actually allows or blocks under the same test conditions.


How does Atlan approach context sent to external models?

Atlan carries a PII tag set once to every downstream asset and hands agents governed definitions through its MCP server; your request builder and gateway enforce the disclosure decision.

Before an agent sends enterprise information to an external model, something must know what that information means, which restrictions apply, and whether the task permits disclosure. Atlan, the AI Context Platform, keeps classifications, lineage, ownership and policy in a shared context layer those checks can read.

What Atlan supplies


  • Tags that follow the data. If a column containing personal information is copied into another table, agents still need to recognize it as sensitive. In Atlan’s Data Lineage, you tag a column as PII once and lineage propagates that classification to every downstream asset, with tags syncing bi-directionally with Snowflake.
  • Policy context at query time. Through the Atlan MCP server, agents search assets, traverse lineage and read governed definitions and glossaries, and every action respects the permissions already set in Atlan. Context Lakehouse describes the same check as what an asset means, whether it is trusted and what policies apply, answered in a single MCP call before anything executes.
  • Reviewed changes to context. Context Engineering Studio tests context against evals, lets domain experts review and approve changes, and versions context in Git-style repositories. For external-model workflows, test whether a context change exposes additional sensitive fields before approving it.

What your systems enforce


Your systems enforce three things: warehouse permissions at retrieval, the disclosure rules in the request builder, and the endpoint allowlist and content scan at the gateway. For AI security for the enterprise, all three must act on the same classifications. An AI risk management review should name the owner of each enforcement point and examine tests showing which fields each integration actually sends or withholds.


Real stories from real customers: Shared context and lineage for AI

Teams that already run agents on governed context show what the disclosure checks above can read from.

"Context is the differentiator. Atlan gave our teams the shared vocabulary and lineage to move from reactive data management to proactive AI enablement."

Kiran Panja, Managing Director, Cloud and Data Engineering, CME Group

CME Group Logo

"Atlan captures Workday's shared language to be leveraged by AI via its MCP server. As part of Atlan's AI labs, we're co-building the semantic layer that AI needs."

Joe DosSantos, VP, Enterprise Data and Analytics, Workday

Workday Logo

A semantic layer is the shared set of business definitions AI reads, and with CME Group’s shared lineage it is one of the foundations a disclosure check reads before an agent calls an external model. A field restricted in one integration must stay restricted when another agent or model handles the task.


How to apply these controls before your next external model call

Start with one agent and one provider, and make every external call explainable: what the agent sent, what it withheld, and which policy decided.

Before you start: what to prepare


  • The list of external services each agent calls, including embedding, reranking and tracing services.
  • The provider terms you approved for each service, with the review date.
  • A classification scheme for personal, confidential and credential data, applied to the tables and documents your agents read.

Steps to put the controls in place


  1. Inventory outbound calls. List every model and service an agent call reaches. Done when each recipient has an owner and an approval record.
  2. Classify and tag the sources. Tag sensitive columns and let lineage carry the tags downstream. Done when every field an agent can retrieve has a classification, and unclassified fields are withheld by default.
  3. Write disclosure rules per destination. State which classifications may go to which provider, masked or in the clear. Done when the rules live in one versioned policy that every integration reads.
  4. Enforce in code and at the gateway. Apply the rules in the request builder and inspect the finished request at the gateway. Done when a test request carrying a restricted field is blocked before transmission.
  5. Log decisions, not values. Record agent, task, destination, policy version and the fields sent or withheld. Done when you can reconstruct why any logged call was allowed.

Common mistakes to avoid


  • Treating a no-training commitment as permission to send any field.
  • Letting the agent decide its own disclosure instead of deterministic code.
  • Checking the first prompt but not retrieved passages and tool outputs.
  • Routing a failover to a provider that was never approved for the data.
  • Logging full prompts in a tracing tool with weaker access controls than the source data.

More on AI-ready data

  1. What is AI-ready data: the five tests data has to pass for one AI use case
  2. Agent-ready data: what an AI agent needs from data before it can act
  3. AI-ready data for clinical trials: mapping regulator guidance to evidence
  4. AI-ready data for talk-to-data: which questions are ready first and how to test them
  5. Exposing AI-ready data through MCP: how agents reach governed context at runtime
  6. AI-ready data owners and stewards: who signs off and what each role checks
  7. AI-ready data products: what a data product adds before an AI can use it
  8. AI-ready vs analytics-ready data: the gaps an analyst used to fill by hand
  9. AI-ready SAP and ERP data: where meaning hides in ERP data
  10. Building AI-ready data from day zero: 7 steps for a new data stack
  11. Extending a data catalog for AI readiness: 7 steps on top of the catalog you have
  12. AI readiness assessment: how to score readiness one use case at a time
  13. AI-ready data checklist: 12 checks, each with the evidence to collect
  14. Best AI-ready data platforms: 12 platforms ranked
  15. Preparing enterprise data for AI agents: a 6-step guide from source inventory to testing
  16. AI-ready data platform: the 5 capabilities a platform needs
  17. What makes data AI-ready: why clean data still needs 5 more layers
  18. AI-ready data tools for the public sector: 9 tools scored on compliance status and context depth
  19. AI-ready vs context-ready data: the two tests an agent’s data has to pass
  20. Governed context as the AI readiness bottleneck: why approved, owned definitions decide agent answers
  21. Unstructured knowledge in AI-ready data: making policies and SOPs usable by agents
  22. AI-ready criteria and certification: writing pass conditions and getting owner sign-off
  23. Build vs buy for AI-ready data tooling: scoring each layer of the stack before you decide

FAQs

1. Do LLM API providers train on my data?


OpenAI does not use API data for training unless you explicitly opt in, and Anthropic does not use commercial inputs and outputs for training by default, with exceptions for submitted feedback or explicit permission. Consumer services have separate terms, and no training does not mean zero retention, so check the terms for the specific service you use.

2. What is zero data retention and who qualifies?


Zero data retention means the provider does not store request and response content, under provider-specific terms. OpenAI and Anthropic both require approval, and coverage depends on the endpoint, feature and model, with legal and safety exceptions.

3. Should I mask PII before sending it to an LLM?


Yes, where policy permits sending a masked value; first remove personally identifiable information (PII) the task does not need. Check whether the remaining details still identify someone, and keep mappings to original values inside the enterprise.

4. Where should sensitive-data controls sit: gateway, context layer or application?


All three, with different jobs. The context layer supplies classifications and policy rules, the application checks access and prepares permitted context through minimization and masking, and the gateway inspects the completed request before forwarding it to an approved provider.

5. How do I keep an audit trail of what was sent to a model?


Record the agent, task, provider, model, policy version, fields sent or withheld, and transformations. Use record IDs and field names instead of sensitive values, with restricted log access and defined retention periods.

6. Does running models inside my warehouse remove the risk?


No. You still need access checks and limits on what the agent uses or sends elsewhere. Check processing routes and downstream services, including whether a customer has elected processing outside the warehouse’s security perimeter.

7. How do I apply the same rules across several model providers?


Keep sensitivity classifications and disclosure rules in a shared context layer that every provider integration reads. Enforce them alongside each provider’s approved data-handling conditions, including during retries, provider switches and agent handoffs.


Sources

  1. LLM02:2025 Sensitive Information Disclosure, OWASP GenAI Security Project
  2. Data controls in the OpenAI platform, OpenAI
  3. Is my data used for model training?, Anthropic Privacy Center
  4. How long do you store my organization’s data?, Anthropic Privacy Center
  5. I have a zero data retention agreement with Anthropic. What products does it apply to?, Anthropic Privacy Center
  6. Snowflake AI and ML, Snowflake documentation
  7. Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, NIST
  8. Will open context interchange ever be real?, Atlan
  9. The Post-AI Data Stack: A blueprint for analytics agents, Atlan
  10. Atlan MCP overview, Atlan documentation
  11. Data Lineage, Atlan
  12. Context Lakehouse, Atlan
  13. Context Engineering Studio, Atlan
Karthik Pasupathy

Written by

Karthik Pasupathy, Contributing Writer, AI Context & Agents

11+ years in enterprise SaaS product marketing across AI infrastructure, DevOps, FinTech, and CCaaS; founder of Rampkit

Published 2 Dec 2026, updated 2 Dec 2026

Bridge the context gap.
Ship AI that works.