Bias Monitor
The bias-monitor policy runs in the output phase. It uses one HR text
heuristic and a configurable score threshold.
Use stream: false for this control. The active SSE path does not run this
heuristic against buffered output.
Phase and verdicts
- Phase:
output - Possible verdicts:
allow,escalate
Configuration
pack:
name: bias-monitor-example
version: 1.0.0
enabled: true
policies:
chain:
- bias-monitor
policy:
bias-monitor:
threshold: 0.85
Supported fields
| Field | Type | Default | Notes |
|---|---|---|---|
threshold | number | 0.85 | The gateway escalates when the bias score is equal to or more than this value. |
How it works
The policy uses a narrow heuristic:
- It checks the request for HR terms such as
hire,promotion, orperformance review. - It checks the response for these terms:
race,gender,religion,disability, andage. - It also examines the response for direct age references.
- If the two checks find a signal, the policy sets the score to
0.95. - For all other results, the policy sets the score to
0.0. - The policy returns
escalatewhen the score is equal to or more thanthreshold. - For all other scores, the policy returns
allow.
Behavior notes
- The policy always escalates when triggered. It does not block.
- At this time, the supported heuristic is for HR only. It is not a general-purpose fairness classifier.
Example scenario
policy:
bias-monitor:
threshold: 0.90
With this config, an HR prompt and a response with a protected term can cause escalation. Other outputs get an allow result.
Best practices
- Configure the escalation workflow that consumes the policy decision event.
- Use this policy only for HR outputs. It is not a general fairness control.
- Test each score limit with typical hiring or promotion prompts before rollout.
Next steps
- Escalation Routing Configuration — add routing hints for escalation events
- Compliance Policies Configuration — broader compliance stacks
- Policies overview — policy chain architecture