A

Ai Ethics Advisor Partner

All-in-one agent covering ethics, responsible, development, specialist. Includes structured workflows, validation checks, and reusable patterns for ai specialists.

AgentClipticsai specialistsv1.0.0MIT
0 views0 copies

AI Ethics Advisor Partner

An autonomous agent that evaluates AI systems for fairness, transparency, and regulatory compliance β€” performing bias audits, generating impact assessments, and recommending mitigation strategies throughout the development lifecycle.

When to Use This Agent

Choose AI Ethics Advisor Partner when:

  • You are building ML models that make decisions affecting people (hiring, lending, content moderation)
  • Your AI system needs EU AI Act or NIST AI RMF compliance documentation
  • You need bias audits with quantitative fairness metrics across demographic groups
  • Stakeholders require ethical impact assessments before deployment approval

Consider alternatives when:

  • You need legal review of AI-related contracts (use a legal advisor agent)
  • Your concern is purely data privacy compliance without AI (use a GDPR compliance tool)
  • You need technical model debugging without ethical focus (use a ML engineer agent)

Quick Start

# .claude/agents/ai-ethics-advisor.yml name: ai-ethics-advisor-partner description: Evaluate AI systems for ethical compliance and bias agent_prompt: | You are an AI Ethics Advisor. When given an AI system or model: 1. Assess the risk level (minimal, limited, high, unacceptable) 2. Identify affected populations and potential harms 3. Run bias detection across protected attributes 4. Check against EU AI Act and NIST AI RMF requirements 5. Generate a structured ethics assessment report 6. Recommend specific mitigations with implementation priority Always quantify findings. Replace "may have bias" with "demographic parity gap of 12% between groups X and Y."

Example invocation:

claude "Run an ethics assessment on our loan approval model in src/models/credit_scoring/"

Sample agent output:

AI Ethics Assessment β€” Credit Scoring Model
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Risk Level: HIGH (automated decision affecting financial access)

Bias Findings:
  Demographic Parity Gap:  18.3% (age groups under/over 40)
  Equalized Odds Gap:      7.2% (gender)
  Calibration Difference:  4.1% (ethnicity) β€” within acceptable range

Regulatory Status:
  EU AI Act Art. 6: HIGH-RISK β€” requires conformity assessment
  ECOA Compliance: VIOLATION β€” age-based disparate impact detected
  NIST AI RMF: MAP-2.3 incomplete (no stakeholder consultation)

Recommendations:
  1. [CRITICAL] Retrain with age-balanced dataset (reduces gap to <5%)
  2. [HIGH] Add adverse action explanations per ECOA requirements
  3. [MEDIUM] Implement monitoring dashboard for ongoing fairness metrics
  4. [LOW] Document model card with intended use limitations

Core Concepts

Ethics Assessment Pipeline

PhaseActionDeliverable
ScopingIdentify system purpose, affected users, decision authorityRisk classification
Data AuditAnalyze training data for representation and historical biasData quality report
Bias TestingMeasure fairness metrics across protected attributesQuantitative bias report
Compliance CheckMap requirements from EU AI Act, NIST RMF, industry regsGap analysis
Impact AssessmentEvaluate potential harms, benefits, and societal effectsImpact statement
Mitigation PlanningPrioritize technical and process fixesAction plan

Fairness Metrics Framework

# Core fairness metrics the agent evaluates from fairlearn.metrics import ( demographic_parity_difference, equalized_odds_difference, MetricFrame ) def run_bias_audit(y_true, y_pred, sensitive_features): metrics = { "demographic_parity": demographic_parity_difference( y_true, y_pred, sensitive_features=sensitive_features ), "equalized_odds": equalized_odds_difference( y_true, y_pred, sensitive_features=sensitive_features ), "selection_rate_by_group": MetricFrame( metrics=selection_rate, y_true=y_true, y_pred=y_pred, sensitive_features=sensitive_features ).by_group } return metrics # Thresholds (configurable per jurisdiction) FAIRNESS_THRESHOLDS = { "demographic_parity": 0.10, # 10% max disparity "equalized_odds": 0.08, # 8% max disparity "four_fifths_rule": 0.80 # EEOC 4/5ths rule }

Regulatory Compliance Mapping

EU AI Act Classification:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Risk Level      β”‚ Examples                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Unacceptable    β”‚ Social scoring, real-time facial β”‚
β”‚ High            β”‚ Credit scoring, hiring, medical  β”‚
β”‚ Limited         β”‚ Chatbots, sentiment analysis     β”‚
β”‚ Minimal         β”‚ Content recommendations, search  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Required for HIGH-risk:
  βœ“ Conformity assessment documentation
  βœ“ Data governance and bias testing
  βœ“ Transparency and explainability
  βœ“ Human oversight mechanisms
  βœ“ Accuracy and robustness testing
  βœ“ Post-market monitoring plan

Configuration

OptionTypeDefaultDescription
riskFrameworkstring"eu-ai-act"Regulatory framework: eu-ai-act, nist-rmf, iso-42001
protectedAttributesstring[]["gender", "age", "ethnicity"]Attributes to test for bias
fairnessThresholdnumber0.10Maximum acceptable disparity (0-1)
generateModelCardbooleantrueOutput a model card with findings
includeExplainabilitybooleantrueAdd SHAP/LIME analysis
reportFormatstring"markdown"Output format: markdown, json, pdf

Best Practices

  1. Integrate ethics review early, not at the end β€” Run the initial risk assessment during design, not after the model is trained. Catching a biased training dataset before training saves weeks of rework compared to discovering bias after deployment.

  2. Use multiple fairness metrics, not just one β€” Demographic parity alone can be misleading. A model can satisfy demographic parity while having vastly different error rates across groups. Always evaluate demographic parity, equalized odds, and calibration together.

  3. Document the tradeoffs explicitly β€” Optimizing for one fairness metric often worsens another (the impossibility theorem). Document which metric you prioritized and why, so stakeholders understand the ethical tradeoff rather than assuming the system is "fair" in all senses.

  4. Test with intersectional groups β€” Bias may not appear when testing gender and age separately, but emerges for "women over 60" or "young men in rural areas." The agent should test intersections of protected attributes, not just individual dimensions.

  5. Establish ongoing monitoring, not one-time audits β€” Model behavior drifts as input distributions change. Set up automated fairness metric dashboards that alert when disparity exceeds thresholds in production, and schedule quarterly re-audits.

Common Issues

Insufficient demographic data for meaningful analysis β€” The training dataset lacks demographic labels needed for bias testing. Use proxy analysis techniques (zip code as proxy for socioeconomic status) with clear documentation of limitations, or partner with your data team to add demographic annotations to a representative sample for testing purposes.

Stakeholders disagree on which fairness metric to prioritize β€” Technical teams prefer equalized odds while business stakeholders want demographic parity. Present both metrics with concrete examples of their real-world implications (equalized odds means equal error rates; demographic parity means equal approval rates) and let the decision be made at the appropriate governance level.

Model card requirements seem excessive for low-risk systems β€” Generating full ethics documentation for a recommendation system feels disproportionate. Scale the assessment depth to the risk level β€” minimal-risk systems need a brief model card and basic bias check, while high-risk systems require full conformity assessments. The agent adjusts its depth based on the initial risk classification.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates