Detect and redact personally identifiable information in prompts and responses, with built-in Algeria Law 18-07 categories.
The Sensitive Info Guardrail detects and redacts personally identifiable information (PII) as it flows through the gateway. PII redaction under Algeria Law 18-07 is already active on every OpenDunes request — no configuration required. The not-yet-available portion is the ability to tune categories, extend the list, and apply the guardrail to model outputs as well as inputs.
Not yet available. Per-request configuration and response-phase PII screening are tracked to be built.
The following categories are detected and redacted from all prompts before they reach a model, in compliance with Algeria's Law 18-07 on personal data protection:
| Category | Description | Example pattern |
|---|---|---|
| NIN | Algerian National Identification Number | 18-digit numeric string in standard NIN format |
| Phone number | Algerian mobile and landline numbers | +213 5xx, 06xx, 07xx |
| CCP | Postal cheque account number | Algeria Poste CCP format |
| RIB | Bank account identifier (Relevé d'Identité Bancaire) | 20-digit RIB in DZD banking format |
| Email address | Standard RFC-5322 email addresses | user@domain.com |
Redacted spans are replaced with a tagged placeholder, e.g. [NIN], [PHONE], [EMAIL].
Once per-request configuration is available, you will be able to extend or restrict the redaction list:
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true (for Law 18-07 categories) | Enable the guardrail |
action | string | "redact" | "redact", "block", or "flag" |
categories | array | Law 18-07 set | PII categories to detect |
phase | string | "request" | "request", "response", or "both" |
When phase is set to "response" or "both", the guardrail also scans the model's output and redacts any PII before it reaches your application. This catches cases where a model surfaces sensitive information from its training data or reconstructs PII from context.
All redaction runs within OpenDunes' Algerian infrastructure. No prompt content is forwarded to a model until redaction is complete. The original (pre-redaction) text is never stored — only the redacted version is logged for audit purposes, and only for the retention period required under Law 18-07.
Each redaction event is logged with the request ID, the category matched, the action taken, and a timestamp. Original matched values are never stored in the audit log. Logs are accessible in your dashboard and retained for 90 days.