PranavNagrecha/AwesomeSalesforceSkills / skills/admin/ai-ethics-and-governance-requirements
ai-ethics-and-governance-requirements
VerifiedUse this skill when defining AI governance policies, designing human oversight workflows, documenting bias mitigation strategies, or meeting regulatory transparency requirements for Salesforce AI features. Trigger keywords: responsible AI, AI bias, AI audit trail, AI transparency, human-in-the-loop, AI risk inventory, AI disclosure. NOT for the MLOps pipeline or Policy-as-Code engine architecture — use architect/ai-governance-architecture. NOT for Trust Layer technical configuration — use agentforce/einstein-trust-layer.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.8 KB |
| references/examples.md | markdown | 5.5 KB |
| references/gotchas.md | markdown | 6.5 KB |
| references/llm-anti-patterns.md | markdown | 9.4 KB |
| references/well-architected.md | markdown | 5.4 KB |
| scripts/check_ai_ethics_and_governance_requirements.pyexecutable | script | 9.4 KB |
| templates/ai-ethics-and-governance-requirements-template.md | markdown | 5.2 KB |
references/examples.md
View on GitHub# Examples — AI Ethics and Governance Requirements
## Example 1: Defining Human Oversight for an Agentforce Service Agent
**Context:** A financial services firm is deploying an Agentforce service agent that can recommend account products to customers during a live chat session. The compliance team has flagged the use case as high-risk because the output influences a financial decision.
**Problem:** Without a governance design, the agent's recommendations go directly to the customer with no review gate, no logged override mechanism, and no disclosure that the suggestions are AI-generated. An incorrect recommendation surfaces to a vulnerable customer and the firm cannot demonstrate what the AI said, who saw it, or whether a human reviewed it.
**Solution:**
The governance design introduces three controls before go-live:
1. The Agentforce topic configuration adds a required clarification action before any product recommendation is surfaced: the agent must confirm the customer's stated need and risk tolerance, and the conversation transcript is logged to a custom Salesforce object with a timestamp and session ID.
2. A Flow-based review gate fires for any recommendation above a defined financial threshold. A licensed advisor is notified via a Task and must mark it as Reviewed before the recommendation appears in the chat. The Task log captures the advisor's Salesforce User ID, review timestamp, and whether they approved or modified the recommendation.
3. The chat UI displays a persistent disclosure: "These suggestions are generated by an AI model and do not constitute financial advice. A licensed advisor has reviewed this recommendation."
The audit trail — transcript log plus Task review record — satisfies the firm's internal compliance policy and provides evidence for a regulator if the recommendation is later disputed.
**Why it works:** The human oversight gate is inside the workflow, not bolted on after. The audit log captures model output, human review, and final decision in the same record chain. The disclosure satisfies the Salesforce Honesty pillar and applicable financial services disclosure regulations.
---
## Example 2: Running a Bias Mitigation Cycle for an Einstein Lead Scoring Model
**Context:** A B2B SaaS company uses Einstein Prediction Builder to score inbound leads for likelihood to convert. Sales ops notices that leads from certain geographic regions receive consistently low scores even when their firmographic profile matches high-converting customers.
**Problem:** The training data reflects five years of historical conversions that under-represent certain geographies because a previous sales territory assignment created unequal coverage. The model has encoded that historical gap as a proxy for low fit. No formal bias check was run at initial deployment.
**Solution:**
Step 1 — Identify protected and proxy attributes: The governance team identifies geography (region, zip code) as a potential proxy for demographic characteristics. They add it to the protected attributes list for this model.
Step 2 — Run the Einstein Prediction Builder bias detection report: The report shows that the "Region = Southeast" segment receives a statistically significant score depression relative to a comparable firmographic peer group.
Step 3 — Remove the proxy field: The model is retrained with the region field excluded from the predictor set. Post-retraining, the bias report is run again and shows the disparate impact has been reduced to within the accepted threshold.
Step 4 — Document the finding: The bias mitigation checklist records the proxy field identified, the bias report result before and after remediation, and the date of sign-off by the data governance owner.
Step 5 — Set a retraining governance gate: The governance policy is updated to require a bias report run and documented sign-off before any retrained version of this model is promoted to production.
**Why it works:** The Salesforce Einstein Prediction Builder bias detection report provides a quantitative disparate impact score, giving the governance team an evidence-based finding rather than a subjective review. Removing the proxy field and re-running the report closes the loop. Documenting the finding creates the audit trail regulators require.
---
## Anti-Pattern: Treating Trust Layer Enablement as Complete AI Governance
**What practitioners do:** An org enables the Einstein Trust Layer — configuring prompt masking, toxicity scoring, and zero data retention for third-party LLM calls — then declares AI governance complete. No risk inventory is produced, no bias evaluation is run, no human oversight gates are designed, and no disclosure copy is written.
**What goes wrong:** Trust Layer handles data protection during LLM inference. It does not govern what AI is allowed to decide, who reviews AI decisions, how bias in model training is detected, or whether customers know they are receiving AI-generated output. When a regulator or internal audit asks for the governance documentation, none exists. When an AI decision causes a complaint, there is no audit trail of what the model recommended or whether a human reviewed it.
**Correct approach:** Treat Trust Layer configuration as one safety control within a broader governance framework. Complete the full governance workflow: risk inventory, pillar mapping, human oversight gate design, bias evaluation, disclosure copy, and audit trail specification. Trust Layer configuration is in scope for agentforce/einstein-trust-layer, not this skill.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |