Skip to content

M14: Ethics & Responsible AI (breadth module)

M10 stopped your app being attacked. This one is about your app being fair, honest, and respectful of people even when no one's attacking it. AI systems can quietly discriminate, leak private data, state falsehoods with total confidence, and make consequential calls no one reviewed. Today you build two small responsible-AI tools, a fairness probe and a privacy redactor: and learn the habits that keep an AI app trustworthy.

Today's win: you can test your AI for unfair treatment and strip personal data before it's sent, and you can name the responsible-AI duties an engineer owns.

Today you will

  • Probe a model for bias / unfair treatment (same task, swap a sensitive attribute, compare)
  • Redact personal data (PII) before it leaves your machine, privacy by design
  • Understand the broader duties: transparency, hallucination honesty, content moderation, human-in-the-loop, accountability (and how this differs from M10's security)

Run of show (~50 min)

Time What we do
0:00 Hook + the win we're chasing
0:05 The one idea: you're responsible for the system, not just the model (full read in notes.md)
0:10 Lab Part A: fairness probe: find a difference that shouldn't be there
0:30 Lab Part B: PII redaction (no key needed) + the responsible-AI checklist
0:45 Show: post a bias you found or a redaction that worked
0:50 Wrap

If you get stuck

  • The privacy part is pure Python, no key needed. The fairness probe calls the model (reuse M4's key).
  • Bias is subtle: a difference between two outputs isn't automatic proof of bias, you (a human) judge whether it reflects a stereotype. That human judgment is the point. Nothing here can harm your computer.
  • This is educational: we probe and improve our own app responsibly; we don't ship anything harmful.

Optional challenge

Add the M14 tools to an earlier app: run redact_pii on user input before your M7 RAG / M9 agent sees it, and add a fairness probe to your capstone's eval set (M8 + M10 + M14 together). Responsible AI isn't a separate app, it's habits woven through the one you already built.