PII
Get your sensitive information detection running in minutes with Fiddler's Fast PII Guardrails. This guide walks you through detecting PII, PHI, and custom entities to protect sensitive data across your applications.
What You'll Build
In this quick start, you'll implement a sensitive information detection system that:
Detects 35+ types of personally identifiable information (PII)
Identifies 7 types of protected health information (PHI)
Configures custom entity detection for organization-specific data
Provides real-time detection with sub-second latency
Prerequisites
Fiddler account with access token
Python 3.10+ environment
Basic understanding of data privacy concepts
Overview
Fiddler's Fast PII and PHI detection provides enterprise-grade protection against data leakage by automatically detecting sensitive information across multiple categories. These guardrails integrate seamlessly with Fiddler's AI Observability platform, enabling continuous monitoring and automated compliance reporting.
Key Capabilities
PII Detection: 35+ entity types, including names, addresses, SSN, credit cards, emails, phone numbers
PHI Detection: 7 healthcare-specific entity types for HIPAA compliance
Custom Entities: Define organization-specific sensitive data patterns
Real-time Processing: Sub-second latency for production applications
Set Up Your Environment
Connect to Fiddler and configure the Sensitive Information Guardrail API:
Define Helper Functions
Create reusable functions for interacting with the API:
Example 1: PII Detection
Detect common personally identifiable information:
Expected Output:
Example 2: PHI Detection for Healthcare
Detect protected health information in medical contexts:
Expected Output:
Example 4: Custom Entity Detection
Define and detect organization-specific sensitive data:
Expected Output:
API Reference
Endpoint
Request Format
Request Parameters
input
string
Text to analyze for sensitive information
Required
entity_categories
string or array
Detection mode(s) to use
"PII"
custom_entities
array
Custom entity patterns (required when using "Custom Entities")
None
Response Format
Response Fields
score
float
Confidence score (0.0 to 1.0)
label
string
Entity type identifier
start
integer
Character position where entity starts
end
integer
Character position where entity ends
text
string
The detected entity text
Supported Entity Types
PII Entities (35+ types)
Personal: person, date_of_birth
Contact: email, email_address, phone_number, mobile_phone_number, landline_phone_number, address, postal_code
Financial: credit_card_number, credit_card_expiration_date, cvv, cvc, bank_account_number, iban
Government IDs: social_security_number, passport_number, drivers_license_number, tax_identification_number, cpf, cnpj, national_health_insurance_number
Digital: ip_address, digital_signature
And more...
PHI Entities (7 types)
Medical: medication, medical_condition, medical_record_number
Insurance: health_insurance_number, health_plan_id
Identifiers: birth_certificate_number, device_serial_number
Code Examples
Next Steps
After completing this quick start:
Explore other Fiddler guardrails for comprehensive AI safety
Review the complete guardrails documentation for all available guardrail types
Integrate guardrails into your applications for production use
Summary
You've learned how to:
β Detect 35+ types of PII in text data
β Identify PHI for healthcare compliance
β Configure custom entities for your organization
β Integrate the Fast PII Guardrails API into your applications.
The Fast PII Guardrails offer enterprise-grade protection for sensitive information with sub-second latency, making them ideal for real-time applications while ensuring compliance with privacy regulations such as GDPR, HIPAA, and CCPA.