Skip to content

Sensitive PII Detection

The Sensitive PII Detection module is designed to identify Personally Identifiable Information (PII) in the output of a language model. This functionality is crucial for ensuring data privacy and compliance, especially in financial institutions where sensitive customer information must be handled securely.

Vulnerability

Financial institutions deal with sensitive customer data, making them prime targets for data breaches. Detecting and protecting PII is essential to comply with regulations and maintain customer trust. Failure to identify and safeguard such information can lead to severe legal consequences and reputational damage.

The Sensitive PII Detection module identifies potential PII in the output, preventing inadvertent leaks of customer information and ensuring compliance with data protection laws.

Usage

This module utilizes the Presidio Analyzer Engine and predefined patterns to analyze the language model's output for specified entity types. It scans the output for personally identifiable information, such as social security numbers, credit card details, or addresses.

A risk score is calculated based on the presence and severity of detected PII. Any identified PII triggers a warning, allowing immediate action to rectify potential data leaks before dissemination.

Configuration

Integrating the Sensitive PII Detection module into your security framework involves instantiating the SensitivePII class and incorporating it into your detection pipeline:

from guardrail.firewall.output_detectors import SensitivePII

firewall = Firewall(no_defaults=True)
output_detectors = [SensitivePII(entity_types=["PERSON", "CREDIT_CARD"], threshold=0.8)]

sanitized_response, valid_results, risk_score = firewall.scan_output(sanitized_prompt, response_text, output_detectors)

By employing the Sensitive PII Detection module within your security protocols, you can fortify data protection efforts, ensuring compliance, customer trust, and safeguarding sensitive financial information.