LLM Prompt Purify

Angular, TypeScript

Problem

LLM prompts can unintentionally include sensitive user or company data when sent to third-party APIs, creating privacy and compliance risks.

Constraints

Filtering must be client-side to avoid sending data to any server before sanitization. Must be deterministic and testable. Must handle diverse data formats without breaking prompt structure.

Solution

A client-side sanitization pipeline that scans prompt text for patterns matching sensitive data (emails, phone numbers, IDs, credentials) and either masks or removes them before the prompt reaches any external API. Rules are configurable and extensible.

Outcome

Reduced risk of accidental data leakage in LLM workflows. Deterministic filtering ensures predictable behavior. Can be integrated as a pre-processing step in any LLM-powered application.