---
title: "PII Guardrails for AI and LLM Applications"
description: "Redact PII from prompts before they reach an LLM provider, with Philter AI Proxy for applications and Philter MCP for agents. Open source and self-hosted."
url: "https://philterd.ai/use-cases/ai/"
---

[← All industries](https://philterd.ai/use-cases/)

AI and LLM applications

# PII Guardrails for AI and LLM Applications

Prompts, retrieved documents, and agent tool calls carry whatever personal data your users and records contain. Philterd redacts it on your side, before it reaches an LLM provider, a vector store, or a training set. That gives your security team a concrete answer when an AI feature comes up for review.

![A support chat as it would be sent to a language model, in which the customer gives her name, order number, street address, email, and phone](https://philterd.ai/images/use-cases/ai-letter-original.png)

Original

![The same chat after Philter's personal data policy, with the customer's name, street address, email, and phone blacked out. Her question and order number are left readable.](https://philterd.ai/images/use-cases/ai-letter-redacted.png)

Redacted

Invented data, redacted by Philter 4.0.0 with the library's GDPR personal data policy, a policy Philter AI Proxy can use too. Detection is configurable and probabilistic, so review what your application sends.

For applications that call LLMs

[Philter AI Proxy](https://philterd.ai/philter-ai-proxy/)

[Learn more](https://philterd.ai/philter-ai-proxy/)

For AI agents and assistants

[Philter MCP](https://philterd.ai/philter-mcp/)

[Learn more](https://philterd.ai/philter-mcp/)

## What Philterd does in an AI stack

### Prompts, redacted before they leave

Philter AI Proxy sits between your application and OpenAI, Anthropic, Gemini, Bedrock, Ollama, or an OpenAI-compatible API, and redacts each prompt before it leaves your network.

### Responses, scanned on the way back

The proxy can scan model responses too, and for each route you choose to redact what it finds, block the response, or pass it through with a warning in the log.

### Documents, redacted before indexing

Run retrieved documents and training data through Philter before they reach a vector store or a fine-tuning set, so less personal data reaches a model that could repeat it.

## Which fits your stack

An application calling LLMs

### [Philter AI Proxy](https://philterd.ai/philter-ai-proxy/)

A drop-in proxy for LLM traffic. It is not an AI gateway, and it is designed to run alongside one, redacting on the last hop before traffic leaves your network.

[About Philter AI Proxy →](https://philterd.ai/philter-ai-proxy/)

An agent or assistant

### [Philter MCP](https://philterd.ai/philter-mcp/)

An MCP server that gives Claude Desktop, Claude Code, Cursor, and other MCP clients redaction tools to call from inside the agent’s tool loop.

[About Philter MCP →](https://philterd.ai/philter-mcp/)

RAG and data pipelines

### [Philter](https://philterd.ai/philter/)

Redacts documents through an API in your own cloud before they are indexed or used for training, launched from your cloud’s marketplace.

[About Philter →](https://philterd.ai/philter/)

A training corpus

### [AI Training Data](https://philterd.ai/consulting/ai-training-data-de-identification/)

We de-identify the corpus with you and measure the result against a gold standard built from your own records.

[See the engagement →](https://philterd.ai/consulting/ai-training-data-de-identification/)

## Getting started with Philter AI Proxy

1. **Run Philter AI Proxy next to your application.** It redacts in-process and needs no other service; the Docker image includes the model it uses for person names.
2. **Create an API key** for your application, and choose the policy its requests use.
3. **Point your application’s LLM client at the proxy** instead of at the provider.
4. **Choose how each route handles responses:** redact what the scan finds, block the response, or pass it through with a warning.

[About Philter AI Proxy](https://philterd.ai/philter-ai-proxy/) [Read the proxy docs](https://philterd.github.io/philter-ai-proxy/)

## Ready-to-use redaction policies

Free, ready-to-use policies from the [open source policy library](https://philterd.ai/policies/). Download and load into your Philter instance.

General v2.0.0

### [GDPR Personal Data Redaction](https://philterd.ai/policies/general/gdpr-personal-data/)

Redact personal data and special-category data as defined by the EU General Data Protection Regulation (GDPR) from documents and records.

GDPR EU personal data data protection

AI Training v2.0.0

### [LLM Training Data Preparation](https://philterd.ai/policies/ai-training/llm-training-data-prep/)

Aggressive PII redaction for documents being fed into LLM training, fine-tuning, or RAG vector stores — preserves semantic structure with type tokens.

AI LLM fine-tuning training data

Healthcare v2.0.0

### [Medical Chatbot — User Input Redaction](https://philterd.ai/policies/healthcare/medical-chatbot/)

Redact PHI from user messages to a healthcare chatbot before they reach the LLM — preserves clinical meaning while removing identifiers.

HIPAA PHI chatbot LLM

[Browse all redaction policies →](https://philterd.ai/policies/)

## Recent writing on AI

### [How to Redact PII Before Sending to an LLM: Chat, RAG, and AI Agents](https://philterd.ai/blog/redact-pii-before-sending-to-an-llm/)

Redact PII and PHI before any prompt reaches an LLM, keeping data on your own infrastructure. A self-hosted pipeline for chat, RAG, and AI agents.

### [Integrating Philter AI Proxy with OpenAI and Anthropic in Production](https://philterd.ai/blog/philter-ai-proxy-openai-anthropic-production/)

Pointing a client at the proxy is one line. Where it sits relative to your AI gateway, and what it does with streaming responses, are the parts to get right.

### [Redact PII From Your AI Agent in One Block of Config](https://philterd.ai/blog/philter-mcp-pii-redaction-for-ai-agents/)

Philter MCP exposes PII and PHI redaction as Model Context Protocol tools that Claude Desktop, Claude Code, Cursor, and other MCP clients call mid-conversation.

[All blog posts →](https://philterd.ai/blog/)
