Overview
In TealTiger, a policy is evaluated as a simple but powerful construct:If conditions are met → execute actionsThis separation allows policies to be:
- Deterministic
- Auditable
- Easy to reason about
- Composable across security, cost, reliability, and governance use cases
Conditions
Conditions define when a policy should trigger. A condition evaluates runtime, configuration, or contextual signals and produces a boolean outcome (true or false).
Common Condition Categories
Conditions can be grouped into the following categories.1. Input Conditions
Evaluate properties of the incoming request or prompt. Examples:- Prompt length exceeds a threshold
- Presence of restricted keywords
- Use of system or developer role prompts
input.tokensinput.languageinput.contains_sensitive_data
2. Model Conditions
Evaluate properties of the model or inference configuration. Examples:- Model is not on an approved allowlist
- Temperature exceeds policy limits
- Deprecated model version is used
model.namemodel.versionmodel.temperature
3. Cost Conditions
Evaluate cost-related signals before or after execution. Examples:- Estimated cost exceeds budget
- Token usage crosses daily quota
- Cost anomaly detected compared to baseline
cost.estimated_usdcost.tokens_inputcost.tokens_output
4. Risk Conditions
Evaluate security or compliance risk. Examples:- Risk score above allowed threshold
- Policy violation detected by a classifier
- External risk feed flags the request
risk.scorerisk.categoryrisk.confidence
5. Execution Context Conditions
Evaluate who or what is making the request. Examples:- Untrusted agent identity
- Environment is not production-approved
- Missing execution identity metadata
execution.identityexecution.environmentexecution.source
Condition Evaluation Model
- All conditions are evaluated in a deterministic order
- Conditions can be combined using logical operators:
ANDORNOT
- A policy triggers only when the final condition result is
true
Actions
Actions define what happens when a policy triggers. Actions are executed only after all conditions evaluate totrue.
Common Action Categories
1. Enforcement Actions
Directly control execution. Examples:- Block request
- Allow with restrictions
- Force safe completion mode
blockallowrestrict
2. Transformation Actions
Modify inputs or outputs. Examples:- Redact sensitive data
- Mask PII fields
- Rewrite prompts
redactmaskrewrite

