Skip to content
Solutions · PII Redaction

Self-Hosted PII Redaction for LLMs and AI Assistants

PII redaction for LLMs that runs inside your own network or cloud account. NeuralChainAI deploys a layer that finds names, account numbers, income and contact details in each prompt and masks them before the request reaches Claude, ChatGPT, Bedrock or a self-hosted model. Real values return in the answer, and every masked field is logged.

Book a PII Redaction Strategy Session Free 30-minute call · mutual NDA included
14Global PII entity types Presidio detects with built-in recognizers, from names to card numbers (Presidio supported entities list).
MITPresidio's open-source license, now under the community-run Data Privacy Stack project (Presidio on GitHub).
30 daysOpenAI's default limit for keeping API abuse-monitoring logs, unless law or abuse protection requires longer (OpenAI API data guide).
How It Works

What PII Redaction for LLMs Does to Each Prompt

Six steps run on every request, and personal values stay inside your network at each one.

1

Intercept the prompt

Your chat interface, agent or app sends each prompt to the redaction service first.

2

Detect personal data

PII detection uses checksum-validated patterns for card and account numbers plus a named-entity model for names and places. Context words such as "account" raise confidence.

3

Mask or tokenize

Each finding becomes a placeholder such as [PERSON_1] or a reversible token, per the rule for that entity type.

4

Send the clean prompt

The model receives the masked prompt and reasons over the placeholders, so a reply can still say "call [PERSON_1] about account [ACCOUNT_1]".

5

Restore values in the response

Placeholders in the answer switch back to real values before the user sees it. The mapping table stays in your environment for as long as you set.

6

Log what was masked

Each request records the entity types found, the treatment, the user and the model, with the values left out.

What It Catches

What the Redaction Layer Catches in Prompts and Files

Built-in recognizers cover common PII data, and custom recognizers cover the identifiers only your organization uses.

Names

Names of members, customers and staff, found by a model that reads the sentence around each word.

Phone numbers, emails and addresses

Built-in recognizers for phones, emails and locations, plus one we add for street addresses.

Account and member IDs

Card numbers and IBANs checked by checksum and bank account numbers by pattern. Member, policy and case numbers use your own recognizers.

Income and financial details

Amounts next to words like "salary", "owe" or "balance", caught by context rules written for your data.

Government ID numbers

Social Security numbers, ITINs, passports and driver's licenses, plus national ID formats for many other countries.

Custom recognizers for your formats

Pattern and deny-list rules for IDs only you use, such as a member number prefix, added in code or per request.

Deployment

Where the Redaction Layer Runs: Your Network, in Front of Any Model

Hosted AI redaction software runs detection on the vendor's servers. This layer runs as standalone containers in your data center or cloud account, so raw values stay inside your boundary.

We build the detection engine on Presidio, the open-source SDK many teams still search for as Microsoft Presidio. It started at Microsoft and is now a community-governed project under the MIT license. Presidio describes itself as a context aware, pluggable and customizable PII de-identification service for text and images.

In front of Claude, ChatGPT and Bedrock

Your apps, agents and private chat interface redact PII through the service before each API call, so Anthropic, OpenAI or a Bedrock endpoint in your AWS account receives placeholders in place of personal values.

Inside your LLM gateway

With a self-hosted LLM gateway, redaction runs on every routed request. LiteLLM's Presidio guardrail masks or blocks entities before the model call, and its output_parse_pii setting puts the original values back into the response.

In front of a self-hosted model

Prompts to a model you serve with vLLM stay on your servers, and redaction keeps logs, analytics and wider staff views masked.

Presidio's REST endpoints ship without built-in authentication, so the service sits behind your gateway or service mesh.

Choosing the Treatment

Masking, Tokenization or Removal: When Each One Fits

Each entity type gets its own treatment. PII masking, tokenization and removal balance readability against exposure differently:

1 Masking hides all or part of a value, such as a card ending in 4242, when people need to recognize the record.
2 Tokenization swaps each value for a consistent placeholder, so the model can follow [PERSON_1] across a thread and the answer returns with real names.
3 Removal deletes values the model never needs, such as a Social Security number pasted into a question.
Our Default

Tokenize what the answer needs back. Remove the rest.

We set each treatment with your privacy lead, test it on your own prompts and keep the rules in version control.

Rules set per entity type and per app
Reversible tokens restored inside your network
Every rule change reviewed and logged
Logs and Review

Redaction Logs: What Was Masked, Who Sent It and How Long Logs Are Kept

Privacy and security teams can audit every request without seeing personal values.

What was masked

Entity types, counts, confidence scores and the treatment applied.

Who sent it

The user or service account, the calling app and the destination model.

How long logs are kept

Your policy sets retention. Logs and the token map that restores values sit in separate stores, each with its own access rules and deletion schedule.

Review and tuning

Staff review a sample of masked prompts and mark misses and false alarms. Presidio's documentation describes the trade-off between the two, so each mark becomes a test case or a rule change.

Compare

Raw Prompts, a Redaction Layer or a Self-Hosted Model

Three ways to bring AI to records that hold PII, for teams weighing AI redaction against a fully private model.

AreaRaw prompts to a vendorRedaction layer in front of a vendorFully self-hosted model
What leaves your networkFull prompts, personal values includedPrompts with placeholders and tokensPrompts and answers stay on your servers
Prompt retentionThe vendor's terms under your planVendor terms cover masked text onlyYour own policy
ModelsThe vendor's frontier modelsThe vendor's frontier modelsOpen-weight models you host
What the model seesReal valuesPlaceholders in place of valuesReal values
What your team runsVendor admin settingsRedaction containers, rules and a review queueGPUs, model serving and the full stack
Best fitWork free of personal dataFrontier-model answers on records that hold PIIData that stays in-house end to end

Many teams pair the last two and keep the most sensitive work on a self-hosted model, a setup our self-hosted AI stack covers end to end. Redaction suits any team whose prompts carry personal records, from nonprofits and membership associations holding member files to financial services teams handling account data.

Scoping

What Shapes the Engagement

We scope each deployment in a strategy session, around these factors.

Data classes in scope

The personal data your prompts carry today and the fields your policy treats as sensitive.

Apps and channels

The chat tools, agents and pipelines that send prompts to a model.

Models and vendors

The models you call today and the vendor contracts already in place.

Custom identifiers

Member, account, policy or case number formats that need their own recognizers.

Languages

The languages your prompts arrive in, since each one needs its own detection model.

Review and retention

Who reviews flagged prompts and how long logs and token maps are kept.

Talk to Us

Talk to Our Private AI Team About PII Redaction

Bring sample prompts, the models your teams use and the fields your privacy lead flags. We'll walk through where the redaction layer sits and how detection gets tested on your own records.

Book a Strategy Session →
Ask us about
Detection for your member and account formats
Masking, tokenization and restored answers
Redaction for Claude, ChatGPT and Bedrock
Redaction inside an LLM gateway
Audit logs, retention and review queues
Self-hosted models for the most sensitive work
Questions

Frequently Asked Questions on PII Redaction

Automated detection misses some values. Presidio's own documentation says there is no guarantee it will find all sensitive information and advises adding other protections. We test detection on samples of your own records, tune rules from the misses and false alarms by entity type and keep a reviewer queue running after launch. For data that must stay in-house in every case, a self-hosted model is the stronger control.

Yes, for traffic that goes through their APIs. The service masks the prompt, forwards it to Anthropic or OpenAI and restores values in the answer. Prompts typed straight into the claude.ai or chatgpt.com apps go to the vendor directly, so teams that need redaction give staff a chat interface that routes through the layer.

Yes. Presidio is free to use under the MIT license, with packages for text, images and structured data. It ships as a library, so recognizers, thresholds, authentication and logging are the build work. Among data anonymization tools, Presidio's maintainers note that hosted services such as Azure AI Language and Amazon Comprehend often cover more entities, while Presidio is built to be customized.

It gives your counsel and auditors a documented PII protection control, showing which data classes leave your network and in what form, with a log entry per request. Your counsel decides which laws apply (GLBA or HIPAA, for example) and whether a setup meets them.

Presidio is free to use. Running costs are the servers hosting the detection containers in your cloud account or data center, billed by your provider. Build effort follows the factors under What Shapes the Engagement, which a strategy session sizes for your apps.

Ready to Mask PII Before Prompts Reach an AI Vendor?

A free 30-minute strategy session maps your prompts, data classes and models and sketches where redaction, a gateway or a self-hosted model fits. Our contact page reaches the same team.

Discuss Your Project