# Applying Ethical AI Practices in Real-World Scenarios

> Chapter 14 of the Courseiva SALESFORCE-AI-ASSOCIATE curriculum — https://courseiva.com/learn/salesforce-ai-associate/ethical-ai-in-practice

**Official objective:** 1.5 — Demonstrate application of ethical AI principles in practical business scenarios.

## Introduction

Applying Ethical AI Practices in Real-World Scenarios. This matters because without a structured approach, AI systems can accidentally make unfair or harmful decisions, harming real people and damaging a company's reputation. For your AI Associate exam, you need to show you can identify the right ethical action in a business scenario.

## The Restaurant Kitchen Analogy

Have you ever watched a chef frantically chopping vegetables while the waiter shouts an order through the hatch, and wondered if there's a secret rulebook they all follow? The chef isn't just cooking; they're following a set of ethical guidelines to make sure every dish is safe, consistent, and fair.

Imagine you own a busy restaurant. Your head chef, let's call her Keisha, uses a smart recipe system that suggests new dishes based on what customers ordered last week. One day, the system starts recommending only spicy meals to customers from a certain neighbourhood, because historically those customers ordered spicy food more often. Keisha spots a problem: the system is learning a bias that could lead to unfair treatment. She doesn't just ignore it. She checks the training data (the recipe history) and realises it's incomplete and skewed. She then adjusts the system, adding new data from a wider range of customers, and puts in place a rule to regularly test for unfair patterns.

In real-world AI, the 'kitchen' is your business context. The 'chefs' are data scientists and IT professionals. The 'recipe system' is the AI model. And the 'dish recommendations' are the AI's decisions. Keisha's actions are exactly what applying ethical AI looks like: spotting bias in the data, testing for fairness, and making adjustments to treat everyone fairly. The core idea is that ethical AI isn't a one-time checklist; it's an ongoing practice, like a chef tasting sauces throughout the day.

## Core explanation

Applying ethical AI practices means taking the high-level principles of fairness, accountability, transparency, and privacy and turning them into concrete actions when building and using AI systems. For a beginner, think of it as the 'how-to' guide for being a responsible AI builder.

First, let's define some key terms. AI, or Artificial Intelligence, is a broad term for computer systems that can perform tasks that normally require human intelligence, like recognising faces or recommending products. An AI model is the specific mathematical programme that makes predictions or decisions based on data. Data is the information you feed the model – numbers, text, images – to train it. Bias in AI means the model systematically makes unfair or incorrect predictions for certain groups of people, often because the training data is skewed or incomplete. Transparency means being open about how an AI system works, including its limitations. Accountability means someone is responsible for the AI's decisions and outcomes. Privacy means protecting people's personal information from misuse.

How does it work in practice? Let's say a bank wants to use an AI system to approve loan applications. An ethical AI practice would involve these steps:

First, you gather a diverse and representative dataset. You don't just take the bank's last ten years of loan data, because that data might reflect historical biases (e.g., previous human bankers discriminated against certain groups). You actively seek out data that includes examples from all demographics.

Second, you train the AI model using this data. You then test the model for bias. You might run fairness metrics – specific calculations that check if the model's accuracy is the same across different groups (like men vs. women, or different ethnicities). If you find the model is less accurate for one group, you go back and adjust the training data or the model's algorithm.

Third, you build transparency into the system. You create an explanation tool that can tell a loan applicant why they were approved or rejected. For example, the system might say, 'Your application was declined because your debt-to-income ratio is above our threshold of 40%.' This is far better than a black box that just says 'No.'

Fourth, you assign accountability. A specific person or team is made responsible for the AI system's performance and ethics. This is often called a model risk officer or an ethics board. They monitor the system after it's deployed.

Fifth, you protect privacy. You anonymise personal data in the training dataset – removing names, addresses, and other identifiable information. You also limit what the AI system can access during operation.

Why does this exist? Because without these practices, AI systems can cause real harm. They can discriminate in hiring, lending, housing, and even criminal justice. They can violate people's privacy by leaking sensitive data. They can also cause huge reputational and financial damage to a company. Regulatory bodies all over the world are now creating laws that require ethical AI practices.

What does it replace? In the past, companies often treated AI as a purely technical 'black box.' You just trained a model, launched it, and hoped for the best. This approach is now seen as reckless. Ethical AI practices replace that old mindset with a disciplined, auditable, and human-centred process. It's a shift from 'move fast and break things' to 'move carefully and stay responsible.'

## Real-world context

An IT professional working in a company that uses AI will apply these practices in a hands-on, step-by-step way. Let's walk through a realistic scenario. You work for an online job marketplace called 'WorkMatch.' The company builds an AI system that automatically screens and ranks candidate CVs for employers. You are the data scientist or AI ethics officer on the team.

Step 1: Audit the training data. The first thing you do is look at the past job applications and hiring decisions used to train the AI. You spot that 80% of the successful past candidates were men, and the remaining 20% were women. You also see that the system was trained mostly on CVs from top-tier universities. You realise this data is biased – it reflects historical hiring patterns that may have been unfair. You document this issue.

Step 2: Collect better data. You work with HR to gather data from a wider range of sources. You include CVs from community colleges, vocational schools, and people who have taken online courses. You also balance the data so it has a roughly equal number of male and female candidates. You remove columns that could be proxies for protected characteristics (like university name or even postcode, which might correlate with race or income).

Step 3: Train and test the model with fairness metrics. You train the new model on the balanced data. Then you test it. You use a library like IBM AI Fairness 360 to compute metrics. You find that the model now scores male and female candidates with equal accuracy. You also test for intersectional bias – how does the model treat women of colour compared to white men? It passes that test too.

Step 4: Build transparency into the product. You add a feature to the employer's dashboard that explains why a candidate was ranked highly or lowly. For example, the tool says: 'This candidate scored highly because of five years of relevant experience and a certification in project management.' You also add a user-facing notification for candidates that says, 'Your profile was screened by an AI system. You can request more information about how the decision was made.'

Step 5: Implement ongoing monitoring. You set up a weekly dashboard that tracks key fairness metrics. If the model's performance starts to drift (e.g., it becomes less accurate for a particular demographic), the system sends an alert to you. You also schedule a quarterly ethics review with the product team to discuss any new concerns.

Step 6: Handle a real incident. Six months later, a candidate complains on social media that the system unfairly rejected her because she took a career break to raise children. You investigate. You find that the model was penalising gaps in employment history. You discuss with the ethics board, and you decide to remove the 'employment gap' feature from the model entirely, because it can be a proxy for gender. You then retrain and redeploy the model.

In this scenario, the IT professional is not just a technician; they are a guardian of fairness. They use tools like data audits, fairness metrics, explainability libraries, and monitoring dashboards. They collaborate with HR, legal, and product teams. The bottom line is that real-world ethical AI is a continuous cycle of data collection, training, testing, explaining, monitoring, and improving.

## Exam focus

The Salesforce AI Associate exam tests your ability to apply ethical AI principles in practical business scenarios. This means you won't be asked to write code or define complicated mathematics. Instead, you'll get a short description of a business situation, and you must choose the most appropriate ethical action from multiple-choice options.

Here are the exact concepts they love to test:

- Bias detection and mitigation: You must recognise when a scenario describes biased data or a biased outcome. The correct answer will almost always involve auditing the training data for representation, testing for bias, or adjusting the dataset. A common trap is suggesting you 'ignore the bias' or 'let the AI figure it out on its own.'

- Transparency and explainability: You will be asked about building trust with users. The right answer typically involves providing an explanation of how the AI reached a decision or making the system's logic clear to users. A trap answer might suggest keeping the AI's workings secret to protect proprietary algorithms.

- Accountability and human oversight: You must know that a human should always be in the loop for high-stakes decisions (like hiring, lending, or medical diagnosis). The exam tests your understanding that AI should support, not replace, human judgment. A trap is an answer that says 'let the AI make the final decision without human review.'

- Privacy and data protection: You will see scenarios about sensitive personal data. The correct answer involves anonymisation, minimising data collection, or getting explicit consent from users. A trap answer might suggest collecting as much data as possible to improve the model.

- Fairness across groups: The exam often presents a situation where an AI performs well for one customer segment but poorly for another. The correct answer is to investigate the data for representation imbalances and retrain the model. A trap is to assume the system is fair because the overall accuracy is high.

Exam traps to watch out for:

- The 'overall accuracy' trap: A question might say, 'The model is 95% accurate overall.' They want you to ignore this claim and look for evidence of differential performance across groups.

- The 'one-time fix' trap: A scenario might describe a single action taken at the start, like a data audit. The correct answer will always include ongoing monitoring and retraining.

- The 'blame the user' trap: A scenario where a user is unhappy with an AI decision. The trap answer blames the user (e.g., 'the user filled in the wrong information'). The correct answer involves reviewing the AI's decision process and providing an explanation.

- The 'compliance box-ticking' trap: A scenario where a company did a single ethics training and considers the job done. The correct answer emphasises continuous improvement and monitoring.

Key definitions to memorise:

- Fairness: Ensuring AI outcomes are not systematically biased against any group.
- Transparency: Being open about how an AI system works.
- Accountability: A clear person or team is responsible for the AI's decisions.
- Privacy: Protecting personal data from unauthorised access or misuse.
- Human-in-the-loop: A human reviews and can override AI decisions.

When you see a multiple-choice question, first identify the ethical principle being tested (fairness, transparency, etc.). Then eliminate obviously wrong answers (e.g., ignoring the problem). Finally, pick the answer that describes a proactive, human-centred, and continuous process.

## Step by step

1. **1. Define the business scenario and ethical principles** — Identify the specific business problem the AI will solve (e.g., screening job applications). Then decide which ethical principles apply (fairness, transparency, privacy). This sets the goal for all subsequent steps.
2. **2. Audit and balance the training data** — Examine the historical data for biases and representation issues. If one group is overrepresented, collect more data from underrepresented groups. Remove or adjust proxy features that could encode bias.
3. **3. Train and test for fairness using metrics** — Train the AI model on the balanced data. Then run fairness metrics (e.g., equalised odds) to check if the model performs equally well across all demographic groups. If not, adjust the data or algorithm.
4. **4. Build transparency and explanation features** — Integrate tools that can explain individual decisions to users (e.g., 'Your application was rejected because of X'). This builds trust and helps users understand why they received a particular outcome.
5. **5. Assign accountability and implement monitoring** — Designate a specific person or team to oversee the AI system. Set up continuous monitoring dashboards that alert you if fairness metrics drift. Schedule regular ethics reviews.
6. **6. Handle incidents and iterate** — When a complaint or issue arises (e.g., a user was treated unfairly), investigate the root cause, retrain the model if needed, and update your documentation. This closes the ethical feedback loop.

## Comparisons

### Bias in AI vs Fairness in AI

**Bias in AI:**
- A problem where the model systematically treats one group unfairly.
- Caused by unbalanced or skewed training data.
- An outcome to be identified and fixed.

**Fairness in AI:**
- A principle that guides the design and testing of the model.
- Achieved by actively balancing data and running fairness metrics.
- A goal to be continuously monitored.

### Transparency (Openness) vs Explainability (Decision-level)

**Transparency (Openness):**
- Refers to the overall system being documented and understandable.
- Includes publishing known limitations and data sources.
- Builds general trust in the AI system.

**Explainability (Decision-level):**
- Refers to explaining a single decision (e.g., 'why was I rejected?').
- Provides a specific reason for an individual outcome.
- Helps a specific user understand their result.

### One-time ethical check vs Continuous ethical monitoring

**One-time ethical check:**
- A single audit or fairness test at the start of a project.
- Often fails to catch problems that arise later due to model drift.
- Insufficient for real-world deployment.

**Continuous ethical monitoring:**
- Ongoing monitoring of fairness metrics and outcomes over time.
- Includes automated alerts and regular ethics reviews.
- Required for responsible long-term AI use.

### Human-in-the-loop vs AI-only decision-making

**Human-in-the-loop:**
- A human reviews and can override AI decisions for high-stakes cases.
- Adds accountability and catches AI errors.
- Preferred for ethical practices in domains like hiring or lending.

**AI-only decision-making:**
- The AI makes the final decision without human review.
- Risks amplifying bias or making mistakes without intervention.
- Generally considered unethical for high-impact decisions.

## Diagram

_A flowchart showing the continuous cycle of ethical AI practices: from defining the scenario, through auditing data, training, testing, explaining, and monitoring._

```mermaid
flowchart TD
    A[Define Business Scenario] --> B[Audit Training Data for Bias]
    B --> C[Collect Balanced Data]
    C --> D[Train AI Model]
    D --> E[Test for Fairness with Metrics]
    E --> |Passes| F[Add Explainability Features]
    E --> |Fails| B
    F --> G[Assign Accountability & Monitor]
    G --> H[Handle Incidents & Iterate]
    H --> B
```

## Common misconceptions

- **Misconception:** Ethical AI is just about avoiding legal trouble, so if it's legal, it's ethical. **Reality:** Ethical AI goes beyond legal compliance. It involves proactive fairness, transparency, and accountability even when the law hasn't caught up. (This mistake is common because people confuse 'legal' with 'ethical.' Many harmful practices were once legal (e.g., discriminatory lending). The exam tests the higher standard of ethical responsibility.)
- **Misconception:** If the training data is large enough, bias will automatically cancel out. **Reality:** Simply having a large dataset does not eliminate bias. If the data reflects historical or societal biases, more data just reinforces those biases. You must actively balance and audit the data. (People intuitively think 'more data = better' from other contexts, but bias amplification is a well-known phenomenon in AI. The exam specifically tests this misunderstanding.)
- **Misconception:** Explainability means showing the entire code or algorithm to users. **Reality:** Explainability means providing a human-readable reason for a specific decision (e.g., 'Your loan was declined because your income is below threshold X'). It doesn't require revealing proprietary code. (Beginners often equate 'transparency' with open-source everything. The exam clarifies that transparency is about meaningful communication, not code disclosure.)
- **Misconception:** Ethical AI is only a concern for large companies like banks or social media platforms. **Reality:** Any organisation using AI, even a small business using a standardised AI tool, has ethical responsibilities. The principles apply regardless of company size. (This misconception arises because major scandals make headlines. The exam uses diverse scenarios, from healthcare to retail, to emphasise universal applicability.)
- **Misconception:** Once you've checked for bias at the start, the AI is 'fixed' and ethical forever. **Reality:** Ethical AI requires continuous monitoring and retraining because data and real-world conditions change over time (a phenomenon called model drift). One-time checks are insufficient. (People are used to software being 'done' after release. AI systems learn and change, so ethical oversight must be ongoing. This is a high-frequency exam trap.)

## Key takeaways

- Ethical AI requires auditing training data for representation and bias, not just relying on large datasets.
- Fairness means testing AI accuracy across different demographic groups, not just looking at overall accuracy.
- Transparency in AI means providing clear, human-readable explanations for specific decisions, not revealing proprietary code.
- Human oversight is essential for high-stakes decisions; AI should support, not replace, human judgment.
- Privacy protections like data anonymisation and minimisation must be built into the AI system from the start.
- Applying ethical AI is an ongoing process of monitoring, testing, and improvement, not a one-time checklist.
- Accountability requires assigning a person or team to be responsible for the AI's outcomes and decisions.

## FAQ

**Do I need to be a programmer to apply ethical AI practices?**

No. While some steps involve technical tasks (like running fairness metrics), the core skill is critical thinking about data and outcomes. The AI Associate exam tests your understanding of principles, not your coding ability.

**Is there a single 'right' way to be fair in AI?**

No. There are multiple mathematical definitions of fairness (e.g., demographic parity, equal opportunity). The best choice depends on the specific business context and the harms you want to avoid. The exam tests that you understand the need for choosing a definition, not picking one universal rule.

**If an AI is 99% accurate, can it still be unethical?**

Yes. A model can be highly accurate overall but still systematically discriminate against a small group. For example, a medical AI might be 99% accurate for white patients but only 70% accurate for darker-skinned patients. High overall accuracy can mask serious fairness issues.

**What's the difference between model transparency and model explainability?**

Transparency is about the overall system being open (e.g., documentation, known limitations). Explainability is about explaining a specific decision (e.g., why this person was denied a loan). Both are important, and exam questions often use the terms distinctly.

**Can I rely on a third-party AI vendor to handle ethical issues?**

Not entirely. Even if you use a vendor-built AI, you still have an ethical responsibility to evaluate it in your own context and monitor its performance. The exam tests that you understand accountability cannot be outsourced entirely.

**How do I know if my training data is biased?**

Start by checking the representation of different groups in the data. If one group dominates or is missing, that's a red flag. Then check the labels or outcomes in the data. If historical decisions were biased, the data will reflect that. The exam expects you to spot such scenarios.

## Check your understanding

1. **What is the first step you should take when you suspect an AI model is making biased decisions?**

   Answer: Audit the training data to check for representation imbalances and historical biases before making any model adjustments.

2. **Why is it not enough to rely on overall accuracy when evaluating an AI model's fairness?**

   Answer: Overall accuracy can be high even if the model is very inaccurate for a small, vulnerable group, masking unfair treatment.

3. **What does 'transparency' mean in the context of ethical AI?**

   Answer: Transparency means being open about how the AI system works, including its limitations, data sources, and decision logic, to build user trust.

4. **Why is a one-time fairness check at the start of a project insufficient?**

   Answer: AI models can experience model drift as data changes over time, so continuous monitoring and retraining are necessary to maintain fairness.

5. **In a high-stakes scenario like loan approvals, who should make the final decision?**

   Answer: A human should be in the loop to review and override the AI's decision, ensuring accountability and ethical oversight.

---

Interactive version with quiz and diagrams: https://courseiva.com/learn/salesforce-ai-associate/ethical-ai-in-practice
