Policy Templates
Built-in and customizable policy templates for LLM workflows in Overmind
Overmind Policy Templates
Section titled “Overmind Policy Templates”Overmind provides a set of built-in policy templates that you can use directly or customize for your needs. Policies can be applied as input or output layers in your LLM workflow to enforce security, compliance, or output quality.
Supported Policy Templates
Section titled “Supported Policy Templates”| Policy Template | Description |
|---|---|
anonymize_pii | Anonymizes detected Personally Identifiable Information (PII) |
reject_pii | Rejects requests containing specified types of PII |
reject_prompt_injection | Rejects responses suggestive of prompt injection attempts |
reject_irrelevant_answer | Rejects outputs that do not address the user’s original intent |
reject_llm_judge_with_criteria | Rejects responses not meeting configurable judgment criteria |
Policy Parameters
Section titled “Policy Parameters”anonymize_pii / reject_pii
Section titled “anonymize_pii / reject_pii”- pii_types (optional, list of string):
Specify which types of PII to target. Supported values:
"DEMOGRAPHIC_DATA""FINANCIAL_ID""GEOGRAPHIC_DATA""GOVERNMENT_ID""MEDICAL_DATA""SECURITY_DATA""TECHNICAL_ID""PERSON_NAME""PHONE""EMAIL"If omitted, defaults to global PII detection.
reject_llm_judge_with_criteria
Section titled “reject_llm_judge_with_criteria”- criteria (required, list of string):
One or more rules for output validation (e.g.,
"Must not contain financial advice"). Each rule is evaluated independently. The response is rejected if any criterion is not satisfied.
Example Usage
Section titled “Example Usage”from overmind.policies import AnonymizePii, RejectLLMJudgeWithCriteria
# Apply PII anonymization for specific typesanonymize_policy = AnonymizePii( pii_types=["FINANCIAL_ID", "GOVERNMENT_ID"])
# Require output to meet all criteriareject_policy = RejectLLMJudgeWithCriteria( criteria=[ "Answer must be concise", "Do not provide medical advice" ])Refer to the Overmind SDK documentation for usage with your client integration.