Skip to content
Kuza Ndoto Academy

AI Ethics & Safety

IntermediateChapter 7 · Page 25 of 265 min readUpdated 15 Nov 2026

AI ethics asks how AI systems should be built and used so that they benefit people and avoid harm. As AI decides who gets a loan, which news people see and how students are assessed, everyone who builds or uses it shares responsibility for fairness, privacy, transparency, safety and accountability.

Core principles

Many organisations, including UNESCO in its 2021 Recommendation on the Ethics of Artificial Intelligence, describe similar principles:

PrincipleIn practice
FairnessTest for unequal outcomes across groups (see Bias & Fairness)
PrivacyCollect only what you need, with a lawful basis, and protect it
TransparencyTell people when AI is used and explain decisions in plain language
Safety and robustnessTest for failures, misuse and attacks before and after release
AccountabilityA named person or team is responsible, and people can appeal decisions
Human oversightHumans stay in control of high-stakes decisions

Privacy and data protection

ML runs on data, and much of it is personal: phone numbers, locations, transaction histories, health records. East African countries have data protection laws, including Kenya's Data Protection Act (2019), Uganda's Data Protection and Privacy Act (2019) and Tanzania's Personal Data Protection Act (2022). Kenya's law created the Office of the Data Protection Commissioner. Common requirements include a lawful reason for collecting data, using it only for the stated purpose, keeping it secure and respecting people's rights to access and correct their data.

Good habits for ML projects:

  • Data minimisation: drop columns the model doesn't need.
  • Generalise: store age bands instead of birth dates where possible.
  • Pseudonymise: replace names and phone numbers with random IDs, and keep the lookup table separate and protected.
  • Remember re-identification: combinations like age, ward and occupation can identify a person even without a name.
import pandas as pd

df = pd.DataFrame({
    "name": ["Achieng", "Baraka", "Chebet"],
    "phone": ["07XX000001", "07XX000002", "07XX000003"],
    "age": [19, 24, 31],
    "spend": [1200, 3400, 2100],
})

safe = df.drop(columns=["name", "phone"])            # remove direct identifiers
safe["age_band"] = pd.cut(safe["age"], bins=[17, 25, 35], labels=["18-25", "26-35"])
safe = safe.drop(columns="age")                      # keep only the band
print(safe)
spend age_band 0 1200 18-25 1 3400 18-25 2 2100 26-35

pd.cut places 19 and 24 in the band (17, 25], shown as "18-25", and 31 in (25, 35]. The model can still learn from age and spending patterns, but the dataset no longer contains names or phone numbers.

Warning

Don't paste personal or confidential data (customer lists, medical notes, exam scripts) into public AI chatbots. Depending on the service and settings, inputs may be stored or used to improve models. Check the policy, use approved tools, and anonymise first.

Transparency and explainability

People affected by an automated decision deserve to know that AI was involved and why the decision went the way it did. Simple models such as decision trees and logistic regression are easier to explain; for complex models, tools such as permutation importance or SHAP estimate which features drove a prediction. Documentation helps too: model cards (proposed by Margaret Mitchell and colleagues in 2019) describe what a model is for, how it was tested and where it fails, and datasheets for datasets (Timnit Gebru and colleagues) describe how data was collected.

Safety, misuse and wider harms

  • Robustness: models can fail on inputs unlike their training data, and small deliberate changes (adversarial examples) can fool image classifiers.
  • Misinformation and deepfakes: generative AI can create realistic fake audio, images and video, a particular concern around elections. Verify surprising media before sharing it.
  • Over-reliance: people tend to trust confident machine outputs (automation bias). LLMs can hallucinate.
  • Labour: AI depends on human data work. A 2023 TIME investigation reported that workers in Kenya, employed through an outsourcing company, were paid less than USD 2 an hour to label disturbing content used to make ChatGPT safer, raising questions about pay and mental health support.
  • Environment: training and running large models uses significant electricity and water for data centres.
  • Academic integrity: submitting AI-generated work as your own usually breaks institutional rules; follow your school's policy and disclose AI use where required.

Regulation

Governments are starting to regulate AI. The European Union's AI Act, which entered into force in August 2024, takes a risk-based approach: a few uses are banned, "high-risk" uses such as credit scoring and hiring face strict requirements, and lower-risk systems mainly have transparency duties. It matters beyond Europe because companies serving EU customers must comply. Expect more national AI strategies and rules in Africa and elsewhere.

A practical checklist

  1. Should this problem be solved with AI at all? Who benefits, and who could be harmed?
  2. Is the data lawfully collected, minimised and secured?
  3. Have we measured performance for each affected group?
  4. Can we explain decisions, and can people appeal to a human?
  5. How could the system be misused or fail, and what is our plan when it does?
  6. Who is accountable, and how will we monitor it after launch?
Example

A county health team wants to predict which pregnant women are at risk of missing clinic visits so community health promoters can follow up. Ethical choices include: using the predictions to offer extra support, never to deny services; checking that accuracy is similar across sub-counties; storing data securely under the Data Protection Act; and explaining the programme to the community.

Key points

  • Core principles: fairness, privacy, transparency, safety, accountability and human oversight.
  • Minimise and protect personal data, and follow data protection law.
  • Document models and datasets, and explain decisions to the people affected.
  • Consider misuse, labour, environmental and societal impacts, not just accuracy.
Up next · Responsible AIMachine Learning QuizTest yourself across the series.
→

Tip: use the ← and → keys to move between pages.