Bias Monitor
The bias-monitor policy detects bias and fairness issues in AI responses across protected characteristics. It ships with built-in detection for five default categories — race, gender, religion, disability, and age — and lets you add domain-specific characteristics such as marital status, socioeconomic background, or veteran status. When bias is detected above the configured threshold, the policy either blocks the response outright or escalates it for human review, depending on the risk profile of your deployment.
Use this page when
- You need the exact command, config, API, or integration details for Bias Monitor.
- You are wiring automation or AI retrieval and need canonical names, examples, and constraints.
- If you want a guided rollout instead of a reference page, use the linked workflow pages in Next steps.
Primary audience
- Primary: AI Agents, Technical Engineers
- Secondary: Technical Leaders
Configuration
policy:
bias-monitor:
protected_characteristics:
- socioeconomic_status
- marital_status
threshold: 0.85
action: escalate
pack:
name: bias-monitor-example-1
version: 1.0.0
enabled: true
policies:
chain:
- bias-monitor
Fields
| Field | Type | Description | Default |
|---|---|---|---|
protected_characteristics | string[] | Additional characteristics to monitor beyond the five built-in defaults (race, gender, religion, disability, age). Add domain-specific categories such as marital_status, veteran_status, socioeconomic_status, nationality, or sexual_orientation. | [] (empty — built-in defaults still active) |
threshold | number (0–1) | Bias score threshold. Responses scoring above this value trigger the configured action. Lower values are more sensitive and will flag subtler forms of bias; higher values reduce false positives but may miss marginal cases. | 0.85 |
action | enum: "block" | "escalate" | Action taken when bias is detected above the threshold. "block" rejects the response immediately. "escalate" allows the response through but flags it for human review via the escalation workflow. | "escalate" |
Use Cases
EU AI Act High-Risk Bias Monitoring
An EU-based enterprise operating a high-risk AI system under the EU AI Act must demonstrate continuous bias monitoring across all protected grounds defined in Article 10. A lower threshold ensures even subtle bias is flagged for human review, and the escalation action satisfies the human oversight requirement.
pack:
name: eu-ai-act-fairness
version: 1.0.0
enabled: true
policies:
chain:
- bias-monitor
- human-oversight
- audit-logger
policy:
bias-monitor:
protected_characteristics:
- nationality
- sexual_orientation
- socioeconomic_status
threshold: 0.65
action: escalate
human-oversight:
require_human_for:
- hiring_actions
- credit_scoring
- law_enforcement
action: escalate
confidence_threshold: 0.5
default_assignee: eu-ai-compliance@example.com
timeout_seconds: 86400
audit-logger:
immutable: true
retention_days: 3650
log_all_access: true
HR Recruitment Fairness
An HR platform using AI to screen resumes or generate candidate evaluations must prevent discriminatory filtering. Blocking mode is used because biased hiring decisions carry direct legal liability, and the threshold is set low to catch even marginal bias across an extended set of characteristics.
pack:
name: "hr-recruitment-fairness"
version: "1.0.0"
enabled: true
policies:
chain:
- pii-detector
- bias-monitor
- audit-logger
policy:
pii-detector:
action: "redact"
bias-monitor:
protected_characteristics:
- "marital_status"
- "veteran_status"
- "pregnancy_status"
- "socioeconomic_status"
threshold: 0.55
action: "block"
audit-logger:
immutable: true
retention_days: 2190
log_all_access: true
Healthcare Equity
A hospital using AI-powered triage or clinical decision support must ensure equitable treatment recommendations regardless of patient demographics. Escalation mode is preferred over blocking because clinical staff need to review flagged responses and override when appropriate.
pack:
name: healthcare-equity
version: 1.0.0
enabled: true
policies:
chain:
- bias-monitor
- pii-detector
- human-oversight
- audit-logger
policy:
bias-monitor:
protected_characteristics:
- socioeconomic_status
- nationality
- insurance_status
threshold: 0.7
action: escalate
pii-detector:
action: redact
human-oversight:
require_human_for:
- medical_decisions
- diagnostic_suggestions
action: escalate
confidence_threshold: 0.4
default_assignee: attending-physician@hospital.org
timeout_seconds: 1800
audit-logger:
immutable: true
retention_days: 2190
hipaa_audit_controls: true
log_all_access: true
Financial Lending Fairness
A bank deploying AI for credit scoring or loan recommendation must comply with fair lending laws (ECOA, Fair Housing Act). Blocking mode prevents discriminatory outputs from reaching loan officers, and a tight threshold flags subtle socioeconomic and demographic bias.
pack:
name: fair-lending
version: 1.0.0
enabled: true
policies:
chain:
- bias-monitor
- audit-logger
policy:
bias-monitor:
protected_characteristics:
- marital_status
- socioeconomic_status
- nationality
threshold: 0.6
action: block
audit-logger:
immutable: true
retention_days: 2555
log_all_access: true
Detection Event
When the bias-monitor detects bias above the threshold, it produces a structured detection result:
{
"policy_results": [
{
"policy": "bias-monitor",
"verdict": "escalate",
"detections": [
{
"characteristic": "gender",
"score": 0.91,
"threshold": 0.85,
"evidence": "Response shows preferential language correlated with gender indicators"
}
]
}
]
}
How It Works
The bias-monitor policy analyzes the AI response content against each active protected characteristic — the five built-in categories plus any additional characteristics you configure. For each characteristic, it computes a bias score between 0 and 1, where higher scores indicate stronger detected bias. If any characteristic's score exceeds the configured threshold, the policy triggers the configured action. In "escalate" mode, the response is allowed through but an escalation event is emitted for human review via the Keeptrusts escalation workflow. In "block" mode, the response is rejected immediately and a block event is recorded. The built-in defaults (race, gender, religion, disability, age) are always active — the protected_characteristics field only adds to them, it does not replace them.
Combining With Other Policies
EU AI Act compliance stack — Pair with human-oversight for mandatory human-in-the-loop review of flagged responses and audit-logger for the traceability record required by Articles 12 and 14:
policies:
chain:
- bias-monitor
- human-oversight
- audit-logger
HR and recruitment stack — Place pii-detector before bias-monitor to strip personally identifiable information before bias analysis, reducing the risk that real names or demographics leak into audit records:
policies:
chain:
- pii-detector
- bias-monitor
- audit-logger
Healthcare stack — Combine with pii-detector (redact mode for PHI), human-oversight, and audit-logger with HIPAA controls to satisfy both equity and privacy requirements:
policies:
chain:
- bias-monitor
- pii-detector
- human-oversight
- audit-logger
Best Practices
- Start with a higher threshold (0.85) in production and lower it incrementally as you review escalation patterns and confirm that false-positive rates are acceptable for your domain.
- Use
"block"mode for high-stakes decisions (hiring, lending, clinical triage) where a biased response carries direct legal or safety consequences. Use"escalate"mode when human reviewers should make the final determination. - Always add domain-specific protected characteristics relevant to your use case — the built-in defaults cover common categories but may miss industry-specific concerns like
insurance_statusin healthcare orveteran_statusin HR. - Pair with
audit-loggerto maintain a reviewable record of all bias detections, scores, and actions taken — regulators and internal auditors expect this evidence trail. - Review escalation reports regularly to identify systematic bias patterns that may indicate upstream model issues rather than one-off detection events.
- When deploying across multiple regions or jurisdictions, configure separate policy bundles with region-appropriate thresholds and characteristics — EU deployments may require stricter settings than other regions to satisfy EU AI Act obligations.
For AI systems
- Canonical terms: Keeptrusts,
bias-monitor, policy-config.yaml, protected_characteristics, threshold, action (block/escalate), built-in defaults (race, gender, religion, disability, age). - Output-phase policy: runs on the model's response, not on the input.
- Best next pages: EU AI Act template, Compliance Policies Configuration, Per-Policy Configuration Catalog.
For engineers
bias-monitoris an output-phase policy — place it beforeaudit-loggerbut after policies that process input.- Start with threshold 0.85 in production; lower incrementally after reviewing escalation patterns for false positives.
- Add domain-specific
protected_characteristics(e.g.,insurance_status,veteran_status,pregnancy_status) beyond the five built-in defaults. - Use
action: "block"for high-stakes decisions (hiring, lending); useaction: "escalate"when human reviewers should make the final call. - Validate with
kt policy lint; test by sending prompts designed to elicit biased responses and confirm detection events.
For leaders
- Bias monitoring provides automated, continuous fairness detection across protected characteristics — satisfying EU AI Act Article 10, ECOA, Fair Housing Act, and EEOC requirements.
- Escalation mode preserves user experience while creating a reviewable audit trail of potential bias incidents.
- Configurable thresholds allow graduated enforcement: stricter for HR/lending, more permissive for general-purpose assistants.
- Regular review of bias detection reports identifies systemic model-level issues that may require upstream model changes or fine-tuning.
Next steps
- EU AI Act template — bias monitoring in EU compliance context
- Compliance Policies Configuration — regulatory composition patterns
- Human Oversight policy — escalation workflow for flagged responses
- Policies overview — policy chain architecture