AI Governance¶

Guardrails¶
Overview¶
Guardrails control the boundaries of AI usage to prevent inappropriate use according to organizational policy.
Current Implementation: PII Guardrail¶
The system includes a built-in PII (Personally Identifiable Information) Guardrail implemented as a Filter Function (mea_pii_guardrail v3.0.0).
Detection Capabilities¶
| PII Type | Detection Method |
|---|---|
| Mobile phone numbers | Regex pattern (Thai formats, +66) |
| Landline phone numbers | Regex pattern |
| Email addresses | Regex pattern |
| Thai national ID numbers | Regex + mod-11 checksum validation |
Behavior¶
- When PII is detected in an AI response, the entire response is blocked and replaced with a refusal message
- Detection is deterministic (regex-based) with zero false positives in testing
- Processing speed: median 0.0165 ms per check
- No external API calls required
Configuration¶
- Enable/disable via the Functions page in Admin Panel
- Can be set as Global (applies to all models) or bound to specific models
- Configure via Admin Panel > Workspace > Functions
Known Limitation¶
- The stream filter hook is not called in the current version. To ensure PII filtering works correctly, disable Stream Chat Response in the model's Advanced Parameters. This causes the full response to be filtered before display, at the cost of slightly slower perceived response time.
Additional Guardrails via System Prompts¶
Beyond the PII filter, additional guardrails can be configured through System Prompts at two levels:
- System level: Set in Admin Panel > Settings > Interface, applies to all conversations
- Per-Agent level: Set in each AI Agent's System Instruction, applies only to that agent
These can be used for: - Topic Restriction: Instruct the AI to only respond to work-related topics - Response Format Control: Define how the AI should format its answers - Language Policy: Require responses in a specific language
Note
Content filtering via banned-word lists and input-side guardrails (filtering user input before it reaches the AI) are not yet implemented. Currently, guardrails operate on the AI's output only.