PII Detection
This guardrail detects and handles personally identifiable information like emails, SSNs, names, etc.
Options:
entity_types: An array of PII types to detect, e.g., ["email", "ssn", "name", "address"]
The following entity types are supported:
- phone
- ssn
- credit_card
- address
- name
- date_of_birth
- ip_address
- passport
- drivers_license
- crypto
- iban
- nrp
- medical_license
- url
- us_bank_number
- us_itin
- uk_nhs
- uk_nino
- es_nif
- es_nie
- it_fiscal_code
- it_driver_license
- it_vat_code
- it_passport
- it_identity_card
- pl_pesel
- sg_nric_fin
- sg_uen
- au_abn
- au_acn
- au_tfn
- au_medicare
- in_pan
- in_aadhaar
- in_vehicle_registration
- in_voter
- in_passport
- fi_personal_identity_code
Example
name: communication-guardrails
type: gateway-guardrails-config
rules:
- id: privacy-filter
when:
models:
- openai-main/gpt-3-5-turbo
subjects:
- user:[email protected]
input_guardrails:
- type: pii
action: transform
options:
entity_types:
- email
- phone
- ssn
- name
output_guardrails:
- type: pii
action: transform
options:
entity_types:
- email
- phone
- ssn
- name
guardrails_service_url: https://example-guardrails-service.company.com
In this example, the guardrail system automatically detects and anonymizes emails, phone numbers, social security numbers, and names in both the incoming and outgoing data streams. This process helps maintain the privacy of individuals while allowing the company to handle sensitive data securely and compliantly.
Updated 5 days ago