Protect sensitive personal information before sending prompts to LLMs like ChatGPT, Claude, or Gemini.
This application demonstrates how to safely use Large Language Models (LLMs) with sensitive data by:
- Detecting PII - Automatically finds names, emails, phone numbers, SSN, Indian IDs (PAN, Aadhaar, etc.)
- Anonymizing - Replaces PII with placeholders like
[PERSON_1],[EMAIL_ADDRESS_1] - Safe LLM Queries - Sends anonymized text to Gemini (the LLM never sees real data!)
- De-anonymizing - Restores original PII in the LLM's response
- Customer Support: Summarize complaints without exposing customer details
- HR/Recruiting: Draft responses while protecting applicant information
- Healthcare: Analyze patient notes without violating HIPAA
- Legal: Review contracts without exposing party identities
- Finance: Investigate transactions without leaking account details
- Education: Process student data securely
- Go to the " Chat with LLM" tab
- Enter a message with personal information
- Watch how your data is protected in real-time!
- See the full anonymization → LLM → de-anonymization flow
- PII Detection: Microsoft Presidio
- NLP Model: spaCy (en_core_web_lg)
- LLM: Google Gemini (via OpenAI-compatible API)
- Frontend: Gradio
- Backend: Python + FastAPI
Standard: Names, Emails, Phone Numbers, Credit Cards, SSN, Dates, Locations, IP Addresses
Indian: PAN, Aadhaar, IFSC, GST, Voter ID, Passport, Driving License, Bank Accounts
This is a portfolio demo project. The LLM chat feature uses Gemini's free tier API. For production use, implement proper rate limiting, Redis for session storage, and enterprise API keys.
- Hugging-Face: PII-Anonymization
- LinkedIn: Vikas U Rao
Built by Vikas U Rao
