Risks and governance
What can go wrong, and who is accountable when it does?
Lesson complete
If you like:
Last lesson you measured whether a system works. But a system that gets things right can still do harm: let a secret out, obey a stranger, or treat some people worse than others.
No voice: the lesson advances on its own with subtitles.
The voice for this lesson is being recorded: for now it advances on its own with subtitles.
Review modeComment on this stepI finished the lesson
What you will achieve
- Recognize where the risks of a generative AI system show up (information leaks, prompt injection, jailbreaks, bias, intellectual property, impersonation, environmental footprint), with a real case for each.
- Place a case on a likelihood-by-impact grid, work out its risk level, and choose the controls it calls for.
- Explain what governance is (usage policy, inventory, owners, and incident log) and what the EU AI Act, the NIST framework, and the ISO/IEC 42001 standard ask for.
Key ideas
- Risks live on the system’s paths: what goes out (information leaks), what comes in (prompt injection), whoever is typing (jailbreaks), what it learned (bias), whose text it is, what others do with AI (impersonation), the environmental footprint, and who answers for it.
- Prompt injection has no complete fix. It does harm when private data, content from strangers, and a way out come together: remove one of the three or add human approval before acting.
- Bias hides in the average and is measured by group: an overall accuracy of 88 to 94% coexisted with an error of 0.8% for one group and up to 34.7% for another.
- Risk = likelihood × impact. Each zone calls for proportional controls, and what is left after the controls, the residual risk, is accepted by someone with a name.
- Governing means deciding and monitoring: usage policy, inventory, owners, and incident log. The EU AI Act sorts uses by risk and applies in stages; the NIST framework and the ISO/IEC 42001 standard are reference guides.
What many people believe
Common belief AI risks are the provider’s job: if the model comes from a serious company, using it is safe.
What is true Many risks depend on how you use it: what data you give it, what it can read, what permissions it has, and who checks. Before a customer or a regulator, your organization answers, not the model or its provider.
Check yourself
Four questions. No grade, no account: they just show whether the idea stuck.
Under the hoodFor those who want the math and the code. You do not need it to follow the course.
Risk as arithmetic
NIST’s AI Risk Management Framework (AI RMF 1.0, January 2023) defines risk as “the composite measure of an event’s probability of occurring and the magnitude or degree of the consequences of the corresponding event.” The simplest way to put that into practice is an ordinal scale from 1 to 3 on each axis and their product:
The possible products are 1, 2, 3, 4, 6, and 9. In the lesson: low if , medium if , and high if . That is why the corner-to-corner “diagonal” (3, 4, 3) is the medium zone. A control acts on one of the two factors: tests or answers with sources lower ; a permission, human approval, or the ability to undo lowers . What is left is the residual risk .
It is a useful simplification, not a measurement: the scales are ordinal (a 2 is not “twice” a 1), two risks in the same cell can be very different, and where each case goes is a judgment worth writing down and reviewing. When there is data (how often an error happens, what each incident costs), the expected loss ranks better. The shop’s five cases and their positions are illustrative.
Prompt injection, inside
A language model receives a single text: the system prompt, the question, the retrieved documents, and the tool results all sit one after another in the same context window (lessons 21 and 30). Nothing in the architecture marks which part is in charge. Simon Willison proposed the name prompt injection on September 12, 2022, after Riley Goodside’s demonstration (“Ignore the above directions…”), by analogy with SQL injection. OWASP distinguishes direct injection (typed by whoever uses the chat) from indirect injection (it arrives inside what the system reads: pages, emails, files), which Greshake and colleagues demonstrated in 2023 against real applications. OWASP’s 2025 list for LLM applications ranks it 1 of 10 (followed by sensitive information disclosure, supply chain, data and model poisoning, improper output handling, excessive agency, system prompt leakage, vector and embedding weaknesses, misinformation, and unbounded consumption) and warns that it is unclear whether fool-proof prevention methods exist; RAG and fine-tuning do not eliminate it.
EchoLeak (CVE-2025-32711, published by the NVD on June 11, 2025: “AI command injection in M365 Copilot allows an unauthorized attacker to disclose information over a network”). According to Reddy and Gujral (2025), a single crafted email, with no action from the victim, got Copilot to send data out of its context: the text was worded to evade the injection classifier, used Markdown links that slipped past link redaction, and abused an allowed Microsoft domain. Microsoft fixed it on the server side.
The lethal trifecta (Willison, June 16, 2025): access to private data (), exposure to untrusted content (), and the ability to communicate externally (). Exfiltration needs all three at once:
Removing any one breaks that chain. In practice, includes subtle ways out, like an image or a link the system loads that carries the data in its address. That is why human approval comes before any sending, and permissions are enforced in the program (lesson 32), not in the prompt.
Jailbreaks
Wei, Haghtalab, and Steinhardt (2023) explain why learned refusals fail through two mechanisms: competing objectives (being helpful and following instructions clashes with refusing) and mismatched generalization (safety training does not cover domains where the model does have capability, like another language or an encoding). Their attacks, designed around that idea, succeeded on every request in the red-teaming sets of GPT-4 and Claude v1.3. Zou and colleagues (2023) automated the search: combining greedy and gradient-based search on open models (Vicuna), they found suffixes that, attached to a request, made the model start with an affirmative answer, and those suffixes transferred to ChatGPT, Bard, Claude, and LLaMA-2-Chat. OWASP considers jailbreaking a form of prompt injection. The practical conclusion: the model’s refusal is one layer, not a guarantee; you add input and output filters, limits on what the system can do, and adversarial testing (lesson 34).
Bias: measure by group
If is the error rate in group (errors divided by that group’s cases), the overall average can look fine even when one is high. That is why you report each and the gap . In Gender Shades (Buolamwini and Gebru, 2018), three commercial gender classifiers (IBM, Microsoft, and Face++), evaluated on 1,270 faces of parliamentarians from six countries, had overall accuracies between 87.9% and 93.7%; the maximum error for lighter-skinned men was 0.8%, and for darker-skinned women it reached 34.7%.
In language models, Kotek, Dockum, and Sun (2023) tested four models with ambiguous sentences like “The doctor phoned the nurse because she was late” (“she” could be either one): the models chose the occupation matching the gender stereotype 3 to 6 times more often, amplified the bias beyond real employment statistics, and made up explanations that justified it. The shop example (screening mechanic résumés) is illustrative; in the European Union, systems for recruiting or filtering job applications are listed in Annex III of the AI Act: they are high-risk.
Mind the word: here “bias” means unequal treatment; in lesson 3, the bias is the term added in .
Privacy and information leaks
Three paths: (1) whatever is sent to an outside service sits on someone else’s servers, under their terms (we know the Samsung case, from April 2023, through the press: an engineer uploaded internal source code to ChatGPT to check it, and the company restricted these tools in its devices division); (2) a model can reproduce text it memorized in training (Carlini et al., 2021; lesson 23); (3) an assistant with RAG or tools can show documents to someone who should not see them if retrieval does not apply the permissions of the person asking. NIST’s generative AI profile (AI 600-1, July 2024) lists it among its twelve risks as “data privacy.” In Mexico, personal data is protected by the Federal Law on the Protection of Personal Data Held by Private Parties (a new law published in the DOF on March 20, 2025). Note: an “information leak” is not lesson 10’s “data leakage,” which is test information slipping into training.
Intellectual property
What goes in: lesson 23 covered the lawsuits over training text (the judge in Bartz v. Anthropic found using the books for training to be fair use, but not keeping pirated copies; in 2026 a 1.5-billion-dollar settlement was approved). What comes out: the U.S. Copyright Office (report, part 2, January 2025) concluded that, with currently available technology, prompts alone do not provide sufficient human control to make the user the author of the output; human-authored parts perceptible in the output, and creative selection, arrangement, or modification of generated material, can still be protected. Rules vary by country: check the provider’s terms, and don’t publish without checking whether something looks too much like someone else’s work.
Impersonation and disinformation
The FCC’s order against Steve Kramer (FCC 24-104, adopted September 26, 2024) imposed $6,000,000 for robocalls on January 21, 2024, two days before the New Hampshire primary, with a message in a voice made to sound like President Biden and a spoofed caller ID. Earlier, on February 8, 2024, the FCC had clarified that AI-generated voices count as “artificial” under the telephone consumer protection law. In Hong Kong, according to The Guardian (May 17, 2024), Arup confirmed that someone in its office transferred 200 million Hong Kong dollars (about 25 million U.S. dollars, at 7.8 to the dollar) in 15 transfers to five accounts, after video calls with imitations of executives. The EU AI Act (Art. 50) requires disclosure when image, audio, or video content is a deepfake.
Environmental footprint: the arithmetic
Elsworth and colleagues (Google, 2025) measured the median text prompt to the Gemini app: 0.24 Wh and 0.26 mL of water, with a 33-fold drop in energy over one year. Their comparison, nine seconds of TV, corresponds to a 100 W set: . It is one company’s measurement of its own service; images, video, and reasoning models use more per request, and Luccioni, Jernite, and Strubell (2024) found that general-purpose generative models cost orders of magnitude more energy than task-specific ones. In aggregate, : a billion prompts at 0.24 Wh is 240 MWh (illustrative). The International Energy Agency (April 2025) estimates that data centers used about 415 TWh in 2024, close to 1.5% of the world’s electricity, and projects about 945 TWh in 2030, slightly more than Japan’s current consumption, with AI as the main driver.
Rules and standards
Regulation (EU) 2024/1689 (published July 12, 2024; in force August 1, 2024). Scope (Art. 2): providers placing systems on the EU market wherever they are based, and providers or deployers abroad when the system’s output is used in the EU. Levels: prohibited practices (Art. 5: social scoring, inferring emotions at work or school, facial recognition databases built by untargeted scraping, among others); high risk (Annex III: employment, education, credit, life and health insurance, essential services, among others); transparency (Art. 50: disclosing that people are talking to an AI, marking synthetic content, labeling deepfakes); the rest, with no specific obligations. Fines (Art. 99): for prohibited practices, up to 35 million euros or 7% of worldwide annual turnover, whichever is higher; for other obligations, up to 15 million or 3%. Timeline (Art. 113, as amended by Regulation (EU) 2026/1744, the “Digital Omnibus on AI,” published July 24, 2026, in force July 27):
| From | What applies |
|---|---|
| Feb 2, 2025 | definitions, AI literacy, and prohibited practices |
| Aug 2, 2025 | general-purpose models, governance, and penalties |
| Aug 2, 2026 | general application, including Art. 50 transparency |
| Dec 2, 2026 | marking of synthetic content for systems already on the market; new ban on generating non-consensual intimate material or child sexual abuse material |
| Dec 2, 2027 | Annex III high risk (previously Aug 2, 2026) |
| Aug 2, 2028 | high risk in regulated products under Annex I (previously Aug 2, 2027) |
NIST AI RMF 1.0 (NIST AI 100-1, January 26, 2023), for voluntary use. Four functions: Govern, Map (the context), Measure, and Manage. Among its expected outcomes: an inventory of AI systems (GOVERN 1.6), documented roles and responsibilities (GOVERN 2.1), and communication of incidents and errors (MANAGE 4.3). Its generative AI profile (NIST AI 600-1, July 26, 2024) lists twelve risks: CBRN information, confabulation, dangerous or hateful content, data privacy, environmental impacts, harmful bias and homogenization, human-AI configuration, information integrity, information security, intellectual property, obscene or abusive content, and value chain.
ISO/IEC 42001:2023 (December 18, 2023) sets requirements for establishing, implementing, maintaining, and improving an AI management system in an organization. Certification is voluntary and granted by independent audit bodies.
In code
ZONE = {1: 'low', 2: 'low', 3: 'medium', 4: 'medium', 6: 'high', 9: 'high'}
# case, likelihood (1-3), impact (1-3), and both after controls
cases = [
('social media ideas', 2, 1, (1, 1)),
('translating the manual', 1, 1, (1, 1)),
('warranty questions', 2, 2, (1, 2)),
('emails it sends alone', 2, 3, (2, 2)),
('screening résumés', 3, 3, (2, 3)),
]
for name, p, i, (p2, i2) in cases:
r, r2 = p * i, p2 * i2
print(f'{name:23} {r} {ZONE[r]:6} -> residual {r2} {ZONE[r2]}')
def attack_gets_out(private_data, outside_content, way_out):
"""Lethal trifecta: the injection does harm only with all three ingredients at once."""
return private_data and outside_content and way_out
print(attack_gets_out(True, True, True), attack_gets_out(True, True, False))
# footprint: one prompt versus many
wh = 0.24 # Wh per text prompt (median, Google 2025)
print(round(100 * 9 / 3600, 2)) # Wh of a 100 W TV for 9 s
print(round(wh * 1e9 / 1e6)) # MWh if there were a billion prompts
Output:
social media ideas 2 low -> residual 1 low
translating the manual 1 low -> residual 1 low
warranty questions 4 medium -> residual 2 low
emails it sends alone 6 high -> residual 4 medium
screening résumés 9 high -> residual 6 high
True False
0.25
240
The last case stays high even with controls: that is where someone with a name decides whether to accept it, redesign it, or not use it.
What comes next
Lesson 36 uses this grid together with the value of each case: choosing where to apply AI means crossing frequency, value, and risk, and starting with pilots that are measured (lesson 34) and governed (this lesson).
Decision lens
What this idea means if your job is to decide, not to code.
- Start with the four pieces of governance: a short usage policy (which tools, with which data, for what), an inventory of AI systems and the data they touch, a named owner for each system, and an incident log that actually gets reviewed. The NIST framework (2023) asks for exactly that.
- Before connecting an assistant to email, documents, or the web, look for the lethal trifecta: private data, content from strangers, and a way out. If all three are there, remove one or require human approval before anything is sent. A filter is not enough: prompt injection has no complete fix.
- For any use that decides about people (hiring, lending, insuring, school admissions), ask for the error measured by group, not just the average. In the European Union those uses are high-risk, and the regulation reaches companies abroad if their AI is used there.
- In Mexico, personal data that someone pastes or that the assistant looks up remains protected by the Federal Law on the Protection of Personal Data Held by Private Parties (a new law from March 2025). Check the provider’s contract for where it stores data, for how long, and whether it uses it for training.
Terms in this lesson
- Information leak Data reaching someone who should not have it: what gets pasted into an outside service, what a model memorized, or what an assistant shows to someone without permission. Not to be confused with lesson 10’s “data leakage” (from the test into training).
- Prompt injection An attack in which outside text (an email, a page, a document) carries orders the model obeys as if they came from its user. It is direct if the attacker types it into the chat and indirect if it arrives inside what the system reads. It has no complete fix: it is contained with permissions and human approval.
- Jailbreak Text designed to make a model stop refusing what its training taught it to refuse: a role-play, a story, another language, or a string of nonsense text. It is a form of prompt injection.
- Bias (in an AI system) An error that repeats systematically against a group of people, often inherited from the data. It is detected by measuring the error by group, not the average. Not the bias b of a model (lesson 3).
- AI governance The rules, owners, and processes through which an organization decides which uses of AI it accepts and makes sure they are followed. It starts with a usage policy, an inventory of systems, an owner for each system, and an incident log.
- EU AI Act Regulation (EU) 2024/1689, in force since August 1, 2024. It sorts uses of AI by risk (prohibited, high risk, transparency, and the rest) and applies in stages through 2028. It reaches companies outside the EU if their AI is used there.
- RAG (retrieval-augmented generation) A technique that, before generating, looks up in a collection of documents the chunks most similar to the question and includes them in the prompt, so the model answers from those sources without being retrained.
- Agent A system that puts a language model in a loop of thinking, acting, and observing: the model asks for tools, a program runs them, and the result returns to its context, until a goal is met.
- Tool use A model’s ability to ask for an external function to be run (look up data, calculate, buy) and to use its result. The model only writes the request; the program around it runs it.
- Human in the loop A design in which the system stops before certain actions (irreversible ones, or those over a limit) and waits for a person’s decision: approve, correct, or reject. It costs attention and only protects if the review is real.
- Context window The maximum number of tokens the model can read at once. The system prompt, the conversation, documents, and the answer it is writing all count. Whatever does not fit does not exist for the model.
- Alignment Techniques to get a model to do what the person intends and be helpful, honest, and harmless, not just whatever is most likely given its training text. It turns a base model into an assistant.
- Embedding A vector of numbers, learned from data, that represents something (a word, a sentence, an image) so that similar things end up close. Each word has a row in an embedding table.
- Training data Examples, each with its correct answer, from which a model adjusts its parameters.
- Pretraining The first stage of training a language model: over a huge corpus, the model guesses the next piece of text again and again and adjusts its parameters to lower the error. The result is a base model.
- Hallucination A fluent, confident answer from a model that is false or backed by no source. It follows from predicting plausible text, not from checking facts.
- Verification Checking an answer against an independent source (a document, a database, an expert) before acting on it; not against the same model. Its rigor should be proportional to the risk.
- Eval set (gold cases) Your own set of real cases from your work, each with the answer or criterion your experts accept, that the system has not seen. It is used to compare systems and is rerun after every change.
- Red teaming Deliberately attacking a system, with people or with other models, to find its worst-case failures: harmful answers, leaks, deception. Each failure found becomes an evaluation case.
- Data leakage Information from the evaluation data that slips into training, inflating the measured result.
- Bias (b) The term added at the end of the model: the prediction when the input is zero, that is, the height at which the line crosses the vertical axis. It is not the bias of data or of an unfair model, which is a different concept.
Full transcript
Sources
- Parlamento Europeo y Consejo de la Unión Europea (2024). Reglamento (UE) 2024/1689 por el que se establecen normas armonizadas en materia de inteligencia artificial (Reglamento de Inteligencia Artificial), DO L, 12 de julio de 2024
- European Parliament and Council of the European Union (2026). Regulation (EU) 2026/1744 amending Regulation (EU) 2024/1689 (Digital Omnibus on AI), OJ L, 24 July 2026
- National Institute of Standards and Technology (2023). Artificial Intelligence Risk Management Framework (AI RMF 1.0), NIST AI 100-1
- National Institute of Standards and Technology (2024). Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, NIST AI 600-1
- ISO/IEC JTC 1/SC 42 (2023). ISO/IEC 42001:2023 Information technology — Artificial intelligence — Management system
- International Electrotechnical Commission (IEC Webstore) (2023). ISO/IEC 42001:2023, ficha de publicación (18 de diciembre de 2023)
- ISO (2024). ISO/IEC 42001 explained: what it is
- OWASP GenAI Security Project (2024). OWASP Top 10 for LLM Applications 2025: LLM01 Prompt Injection
- Willison, S. (2022). Prompt injection attacks against GPT-3 (12 de septiembre de 2022)
- Willison, S. (2025). The lethal trifecta for AI agents: private data, untrusted content, and external communication (16 de junio de 2025)
- Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., Fritz, M. (2023). Not what you’ve signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
- Reddy, P., Gujral, A. S. (2025). EchoLeak: The First Real-World Zero-Click Prompt Injection Exploit in a Production LLM System
- NIST National Vulnerability Database (2025). CVE-2025-32711 (Microsoft 365 Copilot, 11 de junio de 2025)
- Wei, A., Haghtalab, N., Steinhardt, J. (2023). Jailbroken: How Does LLM Safety Training Fail?
- Zou, A., Wang, Z., Carlini, N., Nasr, M., Kolter, J. Z., Fredrikson, M. (2023). Universal and Transferable Adversarial Attacks on Aligned Language Models
- Buolamwini, J., Gebru, T. (2018). Gender Shades: Intersectional Accuracy Disparities in Commercial Gender Classification (PMLR 81, 77–91)
- Kotek, H., Dockum, R., Sun, D. Q. (2023). Gender bias and stereotypes in Large Language Models (CI ’23)
- Carlini, N., Tramèr, F., Wallace, E., Jagielski, M., Herbert-Voss, A., Lee, K., et al. (2021). Extracting Training Data from Large Language Models
- The Register (Karabus, J.) (2023). Samsung bans staff from using generative AI after apparent source code leak (2 de mayo de 2023; cobertura periodística)
- KED Global (2023). Spooked by data leak, Samsung bans use of ChatGPT, other AI tools (2 de mayo de 2023; cobertura periodística)
- U.S. Copyright Office (2025). Copyright and Artificial Intelligence, Part 2: Copyrightability (enero de 2025)
- U.S. District Court for the Northern District of California (juez W. Alsup) (2025). Bartz v. Anthropic PBC, n.º 3:24-cv-05417, Order on Fair Use (N. D. Cal., 23 de junio de 2025)
- U.S. District Court for the Northern District of California (2026). Bartz v. Anthropic PBC, Order Granting Final Approval of Class Action Settlement (N. D. Cal., 20 de julio de 2026)
- Federal Communications Commission (2024). In the Matter of Steve Kramer, Forfeiture Order, FCC 24-104 (26 de septiembre de 2024)
- The Guardian (Milmo, D.) (2024). UK engineering firm Arup falls victim to £20m deepfake scam (17 de mayo de 2024)
- Elsworth, C., Huang, K., Patterson, D., et al. (2025). Measuring the environmental impact of delivering AI at Google Scale
- International Energy Agency (2025). Energy and AI (10 de abril de 2025)
- Luccioni, A. S., Jernite, Y., Strubell, E. (2024). Power Hungry Processing: Watts Driving the Cost of AI Deployment? (FAccT ’24)
- Civil Resolution Tribunal of British Columbia (2024). Moffatt v. Air Canada, 2024 BCCRT 149
- Cámara de Diputados del H. Congreso de la Unión (2025). Ley Federal de Protección de Datos Personales en Posesión de los Particulares (DOF, 20 de marzo de 2025; texto vigente)
CommentsThis lesson’s public conversation: questions, facts to check, ideas.
Comments live in GitHub Discussions, in the course’s public repository; writing one requires a GitHub account. They load from giscus.app when you open this section. The course reviewers read them, and if a change is accepted, it is applied in both languages. Open the thread on GitHub