Inspiration
With AI assistants becoming integral to daily tasks, protecting user privacy during interactions became a critical concern. Many users unknowingly expose sensitive information like emails, phone numbers, or social security numbers within their prompts. This project was inspired by the urgent need for tools that safeguard personal data, enabling safe AI usage without compromising privacy. PII Guard aims to empower users with real-time privacy protection, giving them confidence in embracing AI technologies.
What it does
PII Guard detects personally identifiable information (PII) in text prompts before they are sent to AI services. It provides risk assessments categorized as low, medium, or high, alerts users about privacy risks, and offers smart redaction to remove sensitive data automatically. The application runs entirely on-device or locally, ensuring no user data is transmitted externally. It supports email addresses, phone numbers, social security numbers, credit card numbers, addresses, IP addresses, and common personal names, providing comprehensive privacy defense.
How we built it
The solution was developed using a combination of advanced NLP techniques and modern web technologies. At its core, a fine-tuned DistilBERT model performs precise PII detection augmented by regex patterns for robust recognition. The backend uses Flask to serve API endpoints, while the frontend features a responsive web interface built with HTML, CSS, and JavaScript enhanced with a light pastel coloured colour scheme. Key privacy designs include on-device processing and transparent open-source architecture, ensuring security by design.
Challenges we ran into
One of the main challenges was balancing high accuracy in PII detection with real-time performance suitable for user interaction. Fine-tuning NLP models to detect diverse and context-dependent PII required extensive experimentation. Implementing seamless redaction without altering the original intent of user prompts was complex. Additionally, designing an intuitive yet beautiful UI that reflects strong privacy values and meets accessibility standards demanded iterative design efforts.
Accomplishments that we're proud of
We built a fully functional, privacy-first PII detection and redaction tool ready for real-world use. We had to fix the redaction feature multiple times to ensure it is able to work reliably, instantly cleaning sensitive info while preserving context. The glassmorphism-style design brings a welcoming user experience that makes privacy protection approachable. Overall, PII Guard is a powerful, user-friendly privacy shield for AI interactions.
What we learned
The importance of privacy by design in AI applications became even clearer through this project. We learned how blending state-of-the-art NLP models with classical pattern matching yields stronger and more versatile privacy tools. User experience and trust are critical to adoption, emphasizing the value of polished UIs and transparent messaging. Moreover, balancing privacy protection with usability and performance is key to creating tools that people want to use.
What's next for PII Guard
We plan to extend PII Guard by incorporating multilingual PII detection to serve global users better. Integrating privacy-enhancing technologies like secure multi-party computation could further strengthen data protection. Expanding platform support with native mobile apps will increase accessibility and convenience. We also aim to implement federated learning to continuously improve the model with privacy-preserving data collaboration. Finally, fostering an open-source community around PII Guard will accelerate innovation and broad privacy adoption.

Log in or sign up for Devpost to join the conversation.