When enterprise teams evaluate AI security solutions, a very valid question always comes up:
"Isn't it contradictory? If your proxy calls Gemini or OpenAI to generate the final response, aren't you just feeding real data to the AI anyway?"
It is a common misconception about how proxy architecture works. The short answer is: The external LLM provider never sees the real Personally Identifiable Information (PII).
If you wait for Gemini or OpenAI to detect the PII, the data has already left your infrastructure and leaked, defeating the entire purpose of the application. Here is the exact step-by-step sequence happening inside AIGuard's Blindfold pipeline to ensure your data stays sovereign.
The 5-Step Tokenization Pipeline
AIGuard acts as a "Security Proxy" that sits exactly in the middle of the user's application and the LLM.
1. Local Interception
The raw prompt (e.g., "My name is John Doe and my SSN is 123-45-6789") arrives at your AIGuard proxy running on your server or VM.
2. Local Detection & Masking (Before the LLM)
The backend runs local detection engines inside your private server boundary to detect PII. It swaps the sensitive data in memory:
- "John Doe" becomes
[NAME_1] - "123-45-6789" becomes
[SSN_1]
3. The Forwarding Step
AIGuard calls the external AI provider (like Gemini) with the already sanitized text: "My name is [NAME_1] and my SSN is [SSN_1]."
4. The LLM Response
Gemini processes the logic using only the tokens and responds: "Hello [NAME_1], I have recorded your SSN ending in [SSN_1]."
5. Local Restoration (Re-hydration)
AIGuard receives Gemini's response, looks up [NAME_1] and [SSN_1] in its secure local memory vault, replaces them back with the real data, and returns the final text to the user.
The Bottom Line: The LLM is merely a computational engine processing tokenized placeholders. The actual PII never leaves your server environment.
How Do We Detect Obfuscated Text Without AI?
Another common question is how the proxy handles obfuscated text (like j h o n d o e) without relying on the LLM's intelligence. Detection must happen 100% locally.
Here is how the local backend handles obfuscation and spacing tricks before the LLM ever receives the prompt:
- Pre-Processing & Normalization: Before the text even hits the detection engine, the backend runs normalization scripts. It strips out zero-width characters, standardizes unicode, and collapses artificial spacing (so
j h o n d o ebecomesjhondoe). - Context-Aware NLP: Advanced local detection engines don't just look for exact dictionary matches; they look at the surrounding context. If a user types, "Please send the invoice to j h o n d o e at g m a i l", the local NLP model recognizes semantic triggers ("send the invoice to", "at") and flags the entity based on sentence structure, regardless of the spacing.
- Algorithmic Validation: For structured data, the backend uses algorithmic checksums (like the Luhn algorithm for credit cards). Even if a user types
4 5 3 2 - 1 1..., the system normalizes the digits and runs the math locally to verify it's a real card before masking it.
What Are You Actually Paying The LLM For?
You aren't paying Gemini or OpenAI to detect or mask the data. You are paying them to do the actual AI work—answering the user's prompt, summarizing the text, or writing the code.
The interception, masking, and restoration cost you nothing but your own server compute. You only pay the provider their standard rate (fractions of a cent per 1,000 tokens) to process the clean, tokenized text.
By integrating AIGuard's enterprise proxy, you guarantee that those downstream LLM bills never come with the hidden cost of a GDPR or CCPA violation.
Ready to implement local tokenization in your stack? Check out the AIGuard Developer Documentation to get started.
