Building with AILesson 69 of 80

Module 7 · Safety, security and the adversary

Red-teaming your own feature before someone else does

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 9 of 10 in this chapter

This chapter’s goalThreat-model an AI feature and defend it by architecture: name every channel by which untrusted text reaches the model and every channel by which its output reaches a privileged action or the outside world, restrict each with a control that does not depend on the model’s obedience, layer moderation and abstention with measured false-positive costs, and state plainly what a user must be told and what you cannot promise about a provider’s handling of their data.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Two hours, a list and a spreadsheet

Before launch, and after every model change, someone spends an afternoon being the attacker. Not a security specialist: the person who built the feature, with a list of things to try and a spreadsheet with four columns: attempt, channel, outcome, severity. The output is a set of findings, each of which either gets fixed or gets accepted with a name attached, and every finding becomes a case in the harness so it stays fixed.

The reason to do it yourself first is that someone else will do it later, and their findings arrive as screenshots on social media.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Python, from Zero, for AI exam.

Stuck on something?Ask Sayali, your AI tutor

How to cite: Addaly (2026) ‘Red-teaming your own feature before someone else does’, in Building with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/building-with-ai/red-teaming-your-own-feature (Accessed: 29 November 2026).