What is a Decision?
A Decision is TealTiger’s answer to: “Should this action be allowed?” It contains three essential pieces of information:- Action - What should happen (ALLOW, DENY, TRANSFORM, etc.)
- Reason codes - Why this decision was made
- Risk score - How risky is this action (0-100)
- 🟢 Green (ALLOW) - “Safe to proceed because…”
- 🔴 Red (DENY) - “Blocked because…”
- 🟡 Yellow (REQUIRE_APPROVAL) - “Needs review because…”
Decision structure
Here’s what a typical Decision looks like:Decision actions
TealTiger supports six decision actions:ALLOW
The request is safe and should proceed normally.- Request meets all policy requirements
- Risk score is below thresholds
- No violations detected
DENY
The request is blocked and should not proceed.- Policy explicitly blocks the action
- Risk score exceeds limits
- Required conditions not met
REQUIRE_APPROVAL
The request needs human review before proceeding.- High-value operations (e.g., refunds over $1000)
- Sensitive data access
- Unusual patterns detected
REDACT
The request can proceed, but sensitive data must be removed.- PII or PHI detected in output
- Sensitive data in logs
- Compliance requirements
TRANSFORM
The request can proceed, but parameters must be modified.- Token limits exceeded (clamp to max)
- Cost limits exceeded (downgrade model)
- Parameter validation (use safe defaults)
DEGRADE
The request can proceed with reduced capabilities.- Budget constraints
- Rate limits approaching
- Service degradation
Reason codes
Reason codes explain why a decision was made. They’re stable, machine-readable identifiers you can use in your code.Common reason codes
Security:TOOL_NOT_ALLOWED- Tool is blocked by policyPII_DETECTED- Personal information foundPROMPT_INJECTION_DETECTED- Attack attempt detectedUNAUTHORIZED_ACCESS- Insufficient permissions
BUDGET_EXCEEDED- Daily/monthly budget limit reachedTOKEN_LIMIT_EXCEEDED- Request exceeds token limitsCOST_THRESHOLD_EXCEEDED- Single request too expensive
RATE_LIMIT_EXCEEDED- Too many requestsCIRCUIT_BREAKER_OPEN- System is recoveringTIMEOUT_EXCEEDED- Operation took too long
Using reason codes
Risk scores
Risk scores quantify how risky an action is on a scale of 0-100:- 0-30: Low risk (routine operations)
- 31-60: Medium risk (requires monitoring)
- 61-85: High risk (requires approval)
- 86-100: Critical risk (usually denied)
Risk score breakdown
Risk scores can be broken down by domain:Policy modes
Decisions behave differently based on the policy mode:MONITOR mode
- Policies are evaluated
- Decisions are recorded
- Actions are NOT enforced
- Useful for testing policies
ENFORCE mode
- Policies are evaluated
- Decisions are recorded
- Actions ARE enforced
- Production mode
Determinism guarantee
TealTiger guarantees that the same inputs always produce the same Decision:- Testing - Verify policy behavior with confidence
- Debugging - Reproduce issues reliably
- Compliance - Prove consistent enforcement
- Auditing - Explain past decisions
Complete example
Here’s a complete example showing how to handle all decision types:Best practices
- Always check the action - Don’t assume ALLOW
- Handle all action types - Use a switch/if-else for all six actions
- Log decisions - Record all decisions for debugging and compliance
- Use reason codes - Provide helpful error messages based on reason codes
- Test in MONITOR mode - Validate policies before enforcing
- Preserve correlation IDs - Link decisions to audit events
Next steps
Decision lifecycle
Learn how decisions flow through evaluation and enforcement
Policy modes
Understand MONITOR vs ENFORCE modes
Policy authoring
Write custom policies for your use case
Audit schema
See how decisions are logged

