Skip to content
Private AI

AI Data Loss Prevention: Self-Hosted Redaction Before Data Reaches ChatGPT

AI data loss prevention for ChatGPT and Claude: detect PII, client names and financials, redact them in a self-hosted layer, send only redacted text onward.

AI data loss prevention for ChatGPT and Claude means finding personal details, client names and financial figures in what an AI assistant is about to receive, and redacting them before the text leaves your environment. This how-to shows where the redaction and DLP layer sits between staff and the assistant, what it should detect, how the detection models work and how accuracy is measured, and how to run the whole layer self-hosted in your own cloud, so only redacted text reaches ChatGPT.

The usual starting point is the plan settings. OpenAI’s ChatGPT business pricing page lists “No training on your business data by default” for ChatGPT Business, and Enterprise adds custom data retention policies, Enterprise Key Management and data residency in ten regions. Anthropic’s Claude pricing page lists model training as “None by default” on Team and Enterprise. A redaction layer adds the next control by deciding which details reach the assistant at all.

What AI Data Loss Prevention Covers for ChatGPT and Claude

AI data security has two halves. The vendor half covers what OpenAI or Anthropic does with data once it arrives, which the business plans and their terms settle. The company half covers what staff and systems send in the first place. ChatGPT data leakage, as the term is usually used, describes the company half, such as client details typed into a personal Free or Plus account, which can be used for training unless the user switches off the model-improvement option in OpenAI’s Data Controls settings.

AI data loss prevention, often shortened to AI DLP, works on the company half. A detection model reads the text bound for the assistant, finds the items your policy names, and swaps each one for a placeholder before the request goes out. The assistant still drafts, summarizes and answers. It works with “[CLIENT_1]” and “[AMOUNT_2]” in place of the real values.

Step 1: Map Where Company Data Reaches the AI Assistant

A redaction layer can only inspect traffic that passes through it, so the first step is listing the routes data takes to ChatGPT or Claude:

  • Connectors and tool calls. When an assistant pulls records from a CRM, a ticket system or a document store, the data flows through the connector. Put those connectors behind a self-hosted MCP gateway and the gateway can redact every tool result before ChatGPT or Claude sees it.
  • Internal apps that call the model. A company chat page, a document summarizer or an email drafting tool that calls the OpenAI or Anthropic API sends its prompts through your own code, so a redaction step fits directly in front of the API call.
  • Staff typing into the ChatGPT or Claude apps. Text typed or pasted into the vendor’s own app goes from the browser to the vendor. For this route, the controls are the business workspace settings, the AI use policy and any endpoint DLP your security team already runs.

Moving staff off personal accounts and into a ChatGPT Business or Claude Team workspace puts the third route under company settings, with business data out of model training by default. A common setup covers the first two routes with self-hosted redaction and the third with the business workspace. Teams that need redaction on everyday chat can use an internal chat page that runs through the same redaction step and calls the model behind it.

Step 2: Decide What the Redaction Layer Detects

Start from the data your AI use policy already names. That usually means personal information, client names, financial figures and credentials. The table shows how each category is found and what a person still checks.

What to detectExamplesHow the self-hosted layer finds itWhat a person checks
Personal information (PII)Names, email addresses, phone numbers, home addresses, government ID numbersPattern rules plus a named-entity recognition modelA sample of redactions for missed names
Client and company namesClient names, matter or project names, nicknames staff useDictionary built from the CRM or practice system, plus the entity modelNew clients added to the dictionary
Financial figuresRevenue, deal values, salaries, unreleased resultsA small open-weight language model that reads the sentence around each numberItems held for confirmation
Account and card numbersBank accounts, card numbers, invoice and payment referencesPattern rules with checksumsRule changes
CredentialsAPI keys, passwords, connection stringsPattern rules for key formatsAny credential found, which also goes to IT

Write the list down per team. A sales team may keep company names visible because the assistant needs them to draft account plans, while finance redacts every figure tied to an unreleased result. The redaction layer reads that list as configuration, so changing a rule is a settings change rather than a code change. Credentials get their own rule. An API key pasted into a prompt is redacted and also reported to IT so the key can be rotated.

Step 3: Choose How Each Item Is Detected

The redaction layer combines three detection methods, each suited to different items:

  • Patterns. Regular expressions with checksums find card numbers, bank account formats, government ID formats, email addresses, phone numbers and API keys. They are fast and predictable.
  • Dictionaries. A scheduled export of client and matter names from your CRM or practice system gives an exact-match list, including nicknames and abbreviations staff use.
  • Models. A named-entity recognition model finds people, organizations and places that appear in no list. A small open-weight language model handles context-dependent items such as “Q3 revenue came in at 4.2 million”, where the number only matters because of the words around it. Both models run on your own servers, so the text they inspect stays in your environment.

Each detector produces a label and a confidence score. High-confidence matches are redacted automatically. Low-confidence matches on sensitive categories can either be redacted by default or held for the user to confirm, depending on the team’s setting.

Step 4: Redact With Placeholders and Restore the Answer

Consistent placeholders keep the assistant useful. Each detected value is replaced with a labelled token, such as [PERSON_1], [CLIENT_2] or [AMOUNT_3], and the same value always gets the same token within a conversation. The assistant can then reason about “[CLIENT_2]’s renewal” across several messages.

Need AI that keeps your data in-house? Scope a private, self-hosted path in a 30-minute session with our team.
Book a strategy session →

The mapping from tokens to real values stays in your cloud. When the answer comes back, the redaction layer swaps the tokens back to real values before the user sees it, so a drafted email reads normally. The vendor’s AI model works with the tokens in place of those values.

A person stays in the loop for the edge cases. Items held for confirmation appear to the user with a short reason, and a regular sample of redaction decisions goes to whoever owns the AI use policy. Their corrections feed the dictionaries and the model’s test set.

Step 5: Run the Redaction Layer Self-Hosted

Self-hosting the redaction layer means the detection models and the data they inspect both run on infrastructure you control. Here is what runs where:

  • In your cloud account: the redaction service, the pattern rules and dictionaries, the named-entity model and the small language model, the token mapping store, the MCP gateway that carries connector traffic, and the logs of every redaction decision.
  • At OpenAI or Anthropic: the model that writes the answer, which receives only redacted text and returns text with tokens in it.

For connector traffic, redaction runs inside the self-hosted MCP gateway as a step between the MCP server’s result and the assistant. For internal apps, it runs as a self-hosted PII redaction service that the app calls before the model API. Both paths share one rule set and one mapping store, so a client name is treated the same way wherever it appears. Each redaction decision is logged with the user, the route, the categories found and the action taken, without the original values, and the logs go to your existing log store.

For data that should never reach an outside model, even redacted, the next step is a private AI model running fully in your own cloud. The redaction layer can route those requests there instead of to ChatGPT.

Step 6: Measure Detection Accuracy

Build a test set from real documents with the sensitive items marked by hand, such as a set of client emails, invoices and meeting notes. Draw it from the documents each team actually sends, since a law firm’s matter notes and a retailer’s supplier emails contain different items. Run the redaction layer over it and measure two numbers: recall, the share of sensitive items it caught, and precision, the share of redactions that were correct. Recall matters most for client names and account numbers. Precision matters for everyday usefulness, because over-redacted text gives the assistant too little to work with. Agree a target for each category with the policy owner and report results against it.

Re-run the test set whenever a rule, dictionary or model changes, and add every item a reviewer corrects. The results go in the same runbook as the gateway settings, so the security team can see how the layer performs.

How NeuralChainAI Builds Redaction Into the Self-Hosted Gateway

NeuralChainAI builds AI data loss prevention into the self-hosted MCP gateway we deploy in your cloud account. We map the routes data takes to ChatGPT and Claude, set up the pattern rules, dictionaries and self-hosted detection models, add placeholder redaction and restoration, build the test set and measure recall and precision, and hand over a runbook. The staff rules sit in your AI use policy, which our AI acceptable use policy service writes to match the redaction settings. OpenAI and Anthropic bill their seats directly.

Want ChatGPT and Claude to work with company data while client names and figures stay in your cloud? See our self-hosted MCP gateway for Claude and ChatGPT connectors, or book an AI strategy session to map your data routes.

Frequently Asked Questions on AI Data Loss Prevention

AI data loss prevention finds sensitive items, such as personal information, client names, financial figures and credentials, in text bound for an AI assistant like ChatGPT or Claude, and redacts them before the request leaves your environment. A self-hosted version runs the detection models and the token mapping in your own cloud.
OpenAI's business pricing page lists “No training on your business data by default” for ChatGPT Business, and Enterprise adds custom retention policies and data residency in ten regions. Consumer Free and Plus accounts can be used for training unless the user switches off the model-improvement option in OpenAI's Data Controls settings.
Yes. In a self-hosted setup, the pattern rules, dictionaries, detection models and token mapping all run in your cloud account. Only the redacted text goes to OpenAI or Anthropic, and the real values are restored in your environment before the user reads the answer.
Microsoft offers Purview DLP for Copilot and sensitivity labels as part of its guide to configuring a secure and governed foundation for Microsoft Copilot. A company using Copilot alongside ChatGPT or Claude can use the same data categories across all three, so staff learn one set of rules.

Leave a Comment

Put AI to Work — Without Your Data Leaving.

30 minutes with a senior consultant to map a private, self-hosted path for your use case.

Book Your Session
Discuss your Private AI project Discuss your project