Find personal information in a prompt and warn, redact or block it — the Algerian categories on every account, and more on a guardrail.
The Sensitive Info guardrail looks for personal information in what you send a model, before the model reads it. Two layers run: one on every account, with the categories of Algeria's Law 18-07, and the ones you add on a guardrail assigned to your keys.
Both scan the request — the prompt, the input, the documents. The model's answer is not scanned.
| Category | Finds |
|---|---|
| NIN | an 18-digit national identification number |
| Phone | an Algerian mobile number: 05, 06 or 07 and eight digits |
| an email address | |
| CCP | a postal account number with its key (clé) |
| RIB | a 20-digit bank account identifier |
| Address | a street address: rue, avenue, boulevard, cité, hai, quartier and a name |
What happens to a match is your account's setting, at Settings → Privacy:
| Setting | Does |
|---|---|
off · warn | the request passes as sent |
redact | replaces each match with [REDACTED] before the model reads it |
block | stops the request; the API answers 403 with the categories found in metadata.types, and nothing is charged |
A guardrail's content_filter_builtins add categories to the keys it is assigned to, each with its own action — redact, block or flag:
slug | Finds |
|---|---|
email | email addresses |
phone | an Algerian mobile number, or an international one starting with + |
ssn | US social security numbers |
credit-card | card numbers |
ip-address | IPv4 addresses |
secrets | API keys and access tokens in the common formats |
address | street addresses, in French or in English |
A redacted match is replaced with a label, such as [EMAIL] or [CREDIT_CARD].
curl https://opendunes.com/v1/guardrails \
-H "Authorization: Bearer $OPENDUNES_MANAGEMENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "No personal data",
"content_filter_builtins": [
{ "slug": "email", "action": "redact" },
{ "slug": "credit-card", "action": "block" }
]
}'Your own patterns go in content_filters, as regular expressions. Several guardrails on one key add their filters together. Every field is on the Guardrails reference.