Skip to main content
The Data Protection detector identifies, classifies, and manages the exposure of Personally Identifiable Information (PII) in LLM inputs and outputs. It is designed to prevent data leakage and ensure compliance with privacy regulations (GDPR, LGPD, CCPA) by detecting sensitive entities like names, documents, and contact details.

Capabilities

The current model pii-v0 is optimized for multilingual inputs and supports the following entity categories:

Threshold Configuration

You can adjust the sensitivity of the detector using threshold levels. A lower threshold increases recall (catches more, potential false positives), while a higher threshold increases precision.

Usage

1. Define a Policy

First, configure a guard policy to specific the behavior. You can choose to simply monitor or block/redact.

2. Evaluate Content

Send the content to the Guard API. If PII is detected, the response will contain both a diagnostic breakdown and a correction object containing the redacted text. Redaction Format: Detected entities are replaced with a vaulted token format: [CATEGORY_HASH].
  • Example: john@example.com[CONTACT_A1B2C3D4]

API Example

In this scenario, a user submits a prompt containing a mix of contact information and government documents. The API detects these entities and returns a safe, redacted version.

Request Payload

Response

The response flags the content as unsafe (flagged: true) and provides the sanitized text in the correction object.
Reveal (Detokenize) API — Learn how to restore original data from tokens. Reveal (Detokenize) API