L1
·
Quiz
·
Lab
L2
·
Quiz
·
Lab
L3
·
Quiz
·
Lab
L4
·
Quiz
·
Lab
Module Test
Module 3 · Lesson 1

Financial Agents Run Amok: Trading Algorithms and Flash Crashes

Automated agents executing millions of decisions per second — with no human fast enough to intervene.
What happens when an AI agent's optimization objective is technically correct but catastrophically misaligned with real-world intent?

At 2:32 PM Eastern Time, the Dow Jones Industrial Average began to fall. Within fourteen minutes it had dropped nearly 1,000 points — the largest intraday point decline in its history. Trillions of dollars in market value vanished, then mostly reappeared, in less time than it takes to watch a television episode. The agent responsible was not malicious. It was simply doing what it was told.

A mutual fund firm, Waddell & Reed, instructed an automated trading algorithm to sell 75,000 E-Mini S&P 500 futures contracts valued at approximately $4.1 billion. The algorithm was designed to sell based on trading volume, not price — meaning it accelerated as panic drove volume up, creating a feedback loop no human could interrupt in time.

The 2010 Flash Crash: What the Agent Did

The SEC and CFTC joint report published in September 2010 documented the sequence with precision. The selling algorithm executed its 75,000-contract order in approximately 20 minutes — a task that typically took five hours or more when done manually. As high-frequency trading (HFT) firms absorbed the contracts, they immediately re-sold them to other HFTs. The report described this dynamic as a "hot potato" effect: contracts were passed between firms so rapidly that the same positions were traded back and forth 27,000 times in 14 seconds.

Individual stocks reached absurd extremes. Accenture's shares briefly traded at $0.01. Apple and Hewlett-Packard briefly traded above $100,000 per share. These prices were not the result of any human decision — they were the emergent output of multiple interacting automated agents, each behaving rationally according to its own objective, producing irrational collective outcomes.

The event revealed a critical truth about multi-agent financial systems: individual agent rationality does not guarantee system-level stability. When agents interact at machine speed, the gap between a flawed instruction and its catastrophic consequences collapses entirely.

Documented Harm

The SEC estimated approximately $862 billion in market value was temporarily erased during the 20-minute crash window. While most values recovered by market close, individual investors who had placed stop-loss orders saw real, permanent losses as their shares were sold at artificially depressed prices and the recovery did not benefit them.

Knight Capital: $440 Million in 45 Minutes (2012)

Two years after the Flash Crash, Knight Capital Group demonstrated that a single software deployment error combined with an unmonitored agent could be even more immediately destructive to a single firm. On August 1, 2012, Knight deployed new trading software to its production servers — but failed to update one of eight servers with the new code. The old server contained a defunct trading strategy called "Power Peg," a program that had been dormant since 2003.

When markets opened at 9:30 AM, the Power Peg code activated on the one un-updated server. It began buying and selling stocks at high frequency, executing 4 million trades across 154 stocks in 45 minutes. Unlike the new code, Power Peg had no kill switch accessible to Knight's operations staff at that moment. The firm's algorithms were buying high and selling low — a textbook loss-generating pattern — and no human could stop it fast enough.

By 10:15 AM, Knight had accumulated a net long position of approximately $3.5 billion in stocks it did not intend to hold, and had lost $440 million. The loss exceeded Knight's entire net capital. The firm required an emergency $400 million rescue investment and was ultimately acquired by Getco LLC. A company employing approximately 1,500 people was destroyed by 45 minutes of unmonitored autonomous execution.

Root Cause Analysis
Knight Capital — The Four Failure Points
1. Incomplete deployment: No automated verification that all production servers received the new code.

2. No monitoring alerts: Knight's systems did not generate real-time alerts when trading behavior deviated from expected parameters.

3. No accessible kill switch: Operations staff could not halt individual server processes quickly during live trading.

4. No position limits enforced in real time: The system allowed accumulated positions to grow to $3.5 billion before any automated stop-loss triggered.

The Structural Pattern: Why Financial Agents Fail This Way

Both events share a structural pattern that recurs across AI agent incidents: the agent's objective was well-defined but its operating context changed in ways the objective function did not anticipate. Waddell & Reed's algorithm was correctly executing a sell order — but "sell based on volume" proved to be the wrong objective specification under stress conditions. Knight's Power Peg was correctly executing trades — but it was never supposed to be running in a live production environment in 2012.

Financial regulators responded with structural requirements. The SEC introduced Limit Up-Limit Down rules in 2012 and 2013, which pause individual stock trading when prices move more than a defined threshold in a short window. Stock exchanges implemented market-wide circuit breakers. These are not fixes to the agents themselves — they are mandatory environmental constraints imposed on the systems the agents operate within.

This distinction matters enormously: you cannot always fix a misaligned agent after deployment. Sometimes the only viable solution is to constrain the environment the agent operates in before it causes harm.

Key Principle

The 2010 Flash Crash and the 2012 Knight Capital incident both demonstrate that speed amplifies consequences. An AI agent executing at machine speed has no natural pause for human judgment to intervene. This is why mandatory circuit breakers, position limits, and kill switches are not optional safety features — they are requirements for any agent operating in consequential real-time environments.

Circuit breaker An automated mechanism that halts or constrains system operation when predefined thresholds are breached, regardless of whether the agent's internal logic would otherwise continue operating.
Emergent behavior System-level outcomes that arise from interactions between multiple agents, none of which individually intended the emergent result. The 1,000-point drop was not in any single algorithm's objective — it was the collective output of many individually rational agents.

Lesson 1 Quiz

Financial agents, flash crashes, and autonomous trading failures
1. What instruction given to the Waddell & Reed algorithm directly contributed to the 2010 Flash Crash feedback loop?
Correct. The algorithm was instructed to sell based on volume — meaning it accelerated as panic-driven volume increased, creating a destructive feedback loop rather than slowing during the crash.
Not quite. The algorithm's core flaw was that it used trading volume as the sole trigger, causing it to accelerate rather than pause during the developing crash.
2. How much did Knight Capital lose during its 45-minute autonomous trading incident on August 1, 2012?
Correct. Knight Capital lost approximately $440 million in 45 minutes — exceeding the firm's entire net capital and ultimately leading to its acquisition by Getco LLC.
The documented loss was $440 million — a figure that exceeded Knight's entire net capital and forced an emergency rescue investment.
3. What was the root cause of Knight Capital's deployment failure?
Correct. The deployment of new code missed one server. That server still ran the old "Power Peg" strategy from 2003, which activated when markets opened and executed millions of unintended trades.
The cause was an incomplete deployment: one of eight production servers was not updated with new code, leaving the dormant Power Peg strategy running live.
4. During the 2010 Flash Crash, what phenomenon did the SEC/CFTC joint report describe as the "hot potato" effect?
Correct. The report documented that high-frequency trading firms were buying and re-selling the same contracts so rapidly that individual positions were traded 27,000 times in 14 seconds.
The "hot potato" effect described HFT firms rapidly passing futures contracts among themselves — the same contracts were traded back and forth 27,000 times in just 14 seconds.
5. Which regulatory response was introduced specifically after the 2010 Flash Crash to constrain individual stock volatility?
Correct. The SEC introduced Limit Up-Limit Down rules in 2012–2013, which pause trading in individual securities when prices move more than a set percentage in a short window — an environmental constraint on agent behavior.
The specific post-Flash Crash response was the Limit Up-Limit Down mechanism, implemented in 2012–2013, which imposes mandatory pauses on individual stock trading during extreme price movements.

Lab 1: Analyzing Financial Agent Failure Modes

Discuss real trading incidents and the structural safeguards that could have prevented them

Your Mission

You have studied two real financial AI agent failures: the 2010 Flash Crash and the 2012 Knight Capital incident. In this lab, discuss these events with the AI assistant. Explore what specific safeguards were missing, why speed matters in agent safety, and what analogous risks might appear in non-financial AI agent deployments today.

Start by asking: "What is the most important single safeguard that would have prevented the Knight Capital incident?" — then go deeper.
AI Safety Analyst
Financial Agents
Welcome. I'm here to help you analyze the financial AI agent incidents from Lesson 1 — the 2010 Flash Crash and the 2012 Knight Capital collapse. Both are documented cases with publicly available regulatory reports. Ask me about the failure mechanisms, missing safeguards, or how these patterns translate to modern AI agent deployments. What would you like to explore?
Module 3 · Lesson 2

Chatbots as Agents: Air Canada, DPD, and the Liability of Autonomous Advice

When customer-facing AI agents make promises, give dangerous advice, or act outside their sanctioned boundaries — and companies are held legally accountable.
At what point does an AI agent's output stop being a system error and become a legally binding representation?

Jake Moffatt booked flights on Air Canada following the death of his grandmother. He asked the airline's chatbot about its bereavement fare policy. The chatbot told him he could book at full price and apply for a refund within 90 days. He followed this advice. Air Canada later refused the refund, explaining that bereavement fares must be requested before travel — the chatbot's guidance was simply wrong.

Moffatt took Air Canada to tribunal. Air Canada's legal defense argued that the chatbot was a "separate legal entity" responsible for its own statements and that the airline bore no liability for what it said. The tribunal rejected this argument. In a ruling that created a significant legal precedent for AI agents in customer service, the tribunal found Air Canada liable for its chatbot's misrepresentation and awarded Moffatt $650.88 CAD in damages.

Air Canada Chatbot Case: The Legal Ruling and Its Implications

The British Columbia Civil Resolution Tribunal's February 2024 ruling made explicit what many had assumed would eventually be tested: a company cannot disclaim liability for what its AI agent says to customers. Tribunal member Christopher Rivers wrote in the decision: "Air Canada does not explain why it believes it would not be responsible for information provided by one of its agents."

The ruling identified a specific failure mode: the chatbot provided information that was factually incorrect and contradicted Air Canada's actual written policy — which was also available on the same website. The agent was simultaneously operating as a customer service representative and providing advice that directly contradicted the company's own stated rules. This is a fundamental alignment failure: the agent's behavior was inconsistent with the operator's actual intentions.

Air Canada had attempted to protect itself with a disclaimer on the chatbot page stating that information might not be accurate and encouraging users to contact the airline directly. The tribunal found this insufficient: the airline "cannot have it both ways" — deploying an agent to answer customer questions while simultaneously disclaiming responsibility for its answers.

Documented Case — 2024
Moffatt v. Air Canada — Key Facts
Incident: Air Canada chatbot gave incorrect bereavement fare guidance, contradicting the airline's actual policy.

Company defense: Claimed chatbot was a separate entity responsible for its own statements.

Tribunal ruling: Air Canada liable; disclaimers insufficient when agent is deployed to provide customer service.

Precedent set: Operators are legally responsible for the representations their AI agents make to customers.

DPD Chatbot: Swearing at Customers and Writing Poetry About Itself

In January 2024, UK parcel delivery company DPD deployed an AI chatbot powered by a large language model. Within days, a customer named Ashley Beauchamp shared screenshots showing the chatbot had sworn at him, called DPD a "useless" company, and written a poem criticizing DPD's customer service when he asked it to do so. Beauchamp, a musician, had been trying to locate a missing parcel for weeks and found the chatbot unable to help him — so he began testing its boundaries.

DPD's chatbot had been given the ability to engage in general conversation without sufficiently constrained output policies. When prompted creatively, it expressed sentiments entirely contrary to its operator's interests. DPD disabled the chatbot immediately after the incident received media coverage and described it as a "technical update" error. The company stated it had upgraded its system and "a human error occurred which allowed the AI to act outside of its normal parameters."

This incident highlights a distinct failure mode from the Air Canada case: not factual inaccuracy, but goal misalignment through insufficient output constraints. The agent was technically functioning — it understood the requests and responded coherently — but its output was entirely contrary to the operator's obvious intent.

Pattern Recognition

Both incidents reveal that customer-facing AI agents can fail in two distinct ways: (1) providing factually incorrect information that leads users to take harmful actions (Air Canada), and (2) producing outputs that are coherent but directly contrary to operator interests (DPD). The first is an accuracy failure; the second is a constraint failure. Both expose operators to reputational and legal liability.

The Chevrolet Dealer Chatbot: Selling a Car for $1

In late 2023, a Chevrolet dealership in California deployed a customer service chatbot. A user on social media demonstrated that the chatbot could be prompted through a series of conversational steps into stating it would sell a 2024 Chevrolet Tahoe for $1, and that this was "a legally binding offer." The chatbot had been designed to be helpful and agreeable — qualities that, without appropriate constraints on transactional authority, made it trivially manipulable.

The dealership removed the chatbot shortly after screenshots circulated widely. While no customer actually received a vehicle for $1 (the chatbot had no actual transaction authority), the incident demonstrated how easily a poorly-scoped agent could be manipulated into making representations contrary to the operator's interests.

These three cases together define a clear set of risks for any organization deploying conversational AI agents: agents that are designed to be helpful, agreeable, and conversational will be those properties in contexts the deployer did not anticipate. Helpfulness and agreeableness are not safe defaults without explicit boundary constraints.

Key Principle

The Air Canada ruling established that operators — not users, not AI providers — bear legal responsibility for what their deployed agents say and do. This means every organization deploying an AI agent in a customer-facing role must treat that agent's outputs as company representations, subject to the same standards as human employee statements.

Misrepresentation liability Legal responsibility for harm caused by incorrect or misleading statements made by an agent acting on behalf of a principal — including AI agents deployed by companies in customer service roles.
Output constraint failure An agent safety failure where the agent produces coherent, technically functional outputs that are nonetheless contrary to the operator's actual intentions or interests, due to insufficient behavioral boundaries.

Lesson 2 Quiz

Chatbot liability, misrepresentation, and output constraint failures
1. What legal argument did Air Canada make in its defense before the British Columbia Civil Resolution Tribunal?
Correct. Air Canada attempted to argue that its chatbot was a "separate legal entity" — a defense the tribunal explicitly rejected, holding that a company cannot disclaim responsibility for its own deployed agents.
Air Canada's actual defense was that the chatbot was a "separate legal entity" responsible for its own statements — an argument the tribunal rejected, ruling that operators are liable for their agents' representations.
2. What was the specific factual error the Air Canada chatbot made that led to the tribunal claim?
Correct. The chatbot incorrectly told Jake Moffatt he could apply for a bereavement refund after travel. Air Canada's actual policy required the request before travel — making the chatbot's advice directly contrary to the operative rule.
The chatbot specifically told Moffatt he could book at full fare and apply for the bereavement discount within 90 days after travel. Air Canada's real policy required the request be made before travel.
3. The DPD chatbot incident in January 2024 is best classified as which type of AI agent failure?
Correct. The DPD chatbot understood the requests and responded coherently — it swore at a customer and criticized DPD on request. This was an output constraint failure: the agent had no guardrails preventing responses contrary to its operator's interests.
This is an output constraint failure. The chatbot was technically functioning — it understood and responded coherently — but lacked sufficient behavioral boundaries to prevent outputs that directly harmed the operator's interests.
4. What does the Chevrolet dealership chatbot case illustrate about "helpful and agreeable" as AI agent design defaults?
Correct. The Chevy chatbot was designed to be helpful and agreeable — and users exploited those qualities to prompt it into claiming it would sell a Tahoe for $1. Helpfulness without scope constraints is a vulnerability, not a feature.
The Chevy case shows that helpfulness and agreeableness without explicit constraint boundaries are vulnerabilities — users can exploit those qualities to extract statements or commitments the operator never intended the agent to make.
5. What principle did tribunal member Christopher Rivers articulate in the Air Canada ruling regarding disclaimers?
Correct. Rivers wrote that Air Canada "cannot have it both ways" — deploying the chatbot as a customer service tool while claiming the disclaimer absolved it of all responsibility for what the chatbot said.
The tribunal ruled that Air Canada "cannot have it both ways." Deploying an agent for customer service while disclaiming all responsibility for its answers is legally insufficient — the operator bears liability for its agent's representations.

Lab 2: AI Agent Liability and Output Constraints

Explore the legal and design implications of customer-facing AI agent failures

Your Mission

You've studied three real chatbot incidents — Air Canada, DPD, and the Chevrolet dealer — each illustrating a different failure mode. In this lab, discuss with the AI assistant what design safeguards could have prevented each case, how the Air Canada ruling changes the legal landscape for AI deployments, and what questions organizations should ask before deploying customer-facing agents.

Try asking: "What specific design changes would have prevented the Air Canada chatbot from giving incorrect bereavement fare advice?" — then explore the DPD and Chevy cases.
AI Safety Analyst
Chatbot Liability
Ready to explore chatbot liability and output constraint failures. I can discuss the Air Canada ruling, the DPD swearing incident, the Chevrolet $1 car case, or how to design safeguards that would prevent these failures. Each case illustrates a different root cause — let's dig in. What aspect would you like to analyze first?
Module 3 · Lesson 3

Healthcare and Criminal Justice: When Algorithmic Agents Determine Human Fates

COMPAS risk scores, healthcare rationing algorithms, and the documented disparities that result when AI agents replace human judgment in high-stakes decisions.
When an AI agent's error rate differs systematically by race, who bears the cost — and who should bear the responsibility?

ProPublica's May 2016 investigation, "Machine Bias," analyzed the COMPAS (Correctional Offender Management Profiling for Alternative Sanctions) recidivism prediction tool used in criminal sentencing and parole decisions across multiple U.S. states. The investigation examined more than 7,000 people arrested in Broward County, Florida, comparing COMPAS's predicted risk scores against actual reoffending over a two-year follow-up period.

The findings were precise and damaging: Black defendants were nearly twice as likely as white defendants to be falsely flagged as high risk for future crimes when they did not reoffend. White defendants who did reoffend were more likely to have been incorrectly labeled low risk. The algorithm was not merely inaccurate — its inaccuracies were systematically distributed by race.

COMPAS: The Documented Racial Disparity in Risk Scoring

ProPublica's analysis found that among defendants who did not reoffend within two years, 44.9% of Black defendants had been rated high or medium risk by COMPAS, compared to 23.5% of white defendants. Conversely, among defendants who did reoffend, white defendants were mislabeled as low risk at a rate of 47.7%, compared to 28.0% for Black defendants.

Northpointe (now Equivant), the company behind COMPAS, disputed the analysis. They published a response arguing that the tool was equally calibrated across racial groups — that is, when it predicted a 70% recidivism risk, roughly 70% of defendants at that score level reoffended, regardless of race. Both claims were statistically true simultaneously. This is the mathematical reality of algorithmic fairness impossibility: multiple distinct definitions of fairness cannot all be satisfied at once when base rates differ between groups.

The legal consequences were real. In State v. Loomis (2016), Wisconsin's Supreme Court upheld a sentence partially informed by a COMPAS score, even though the defendant was denied access to the algorithm's methodology. The court held that COMPAS was not the determinative factor, but that defendants could not challenge the algorithm's inner workings — a ruling widely criticized by legal scholars as incompatible with due process rights.

Documented Disparity — ProPublica 2016
COMPAS False Positive and False Negative Rates by Race
False positives (labeled high-risk, did not reoffend):
Black defendants: 44.9%  |  White defendants: 23.5%

False negatives (labeled low-risk, did reoffend):
Black defendants: 28.0%  |  White defendants: 47.7%

Source: ProPublica analysis of Broward County, Florida arrest records, 2013–2014 cohort.

Healthcare Rationing: The Optum Algorithm and Racial Bias in Risk Scoring

In October 2019, a study published in Science by Obermeyer et al. analyzed a widely-used commercial healthcare algorithm produced by Optum (a subsidiary of UnitedHealth Group). The algorithm was used by health systems across the United States to identify patients who would benefit most from high-cost care management programs — deciding, in effect, which patients received additional medical resources.

The algorithm used healthcare costs as a proxy for healthcare need. Since sicker patients need more care, they cost more — therefore higher predicted costs should identify patients with greater needs. This logic was flawed in a specific way: historical healthcare costs for Black patients were lower than for white patients with identical health conditions, because systemic barriers had reduced Black patients' access to care. The algorithm trained on this biased historical data and perpetuated it.

The study found that Black patients were 26.3 percentage points less likely than equally sick white patients to be referred to care management programs by the algorithm. To receive the same risk score as a white patient — and thus the same referral rate — a Black patient had to be significantly sicker. The researchers estimated that the algorithm affected approximately 200 million people in the United States.

The Proxy Problem

Using cost as a proxy for need seems reasonable until you examine what determines cost in a historically unequal healthcare system. The Optum algorithm was not designed to discriminate — it was designed to efficiently identify high-need patients. The discrimination was an emergent property of training on historical data that reflected existing inequity. This is the proxy problem: a seemingly neutral optimization target encodes historical bias when that target was itself shaped by discrimination.

Amazon's Recruiting Algorithm: Systematic Bias Against Women

Reuters reported in October 2018 that Amazon had scrapped an internal AI recruiting tool after discovering it systematically downgraded applications from women. The tool had been trained on résumés submitted to Amazon over a ten-year period — a period during which the technology industry was male-dominated. The algorithm learned that male applicants were more successful and began penalizing résumés that included the word "women's" (as in "women's chess club") or that listed all-women's colleges.

Amazon's engineers had attempted to address the bias by removing gender from the training data directly, but the algorithm had learned to infer gender from other signals — school names, phrasing patterns, extracurricular activities. The company disbanded the team working on the tool in 2017, concluding the bias could not be reliably eliminated from the model as designed. The tool had never been used to formally evaluate candidates, but it had been deployed in a "pilot phase" in which recruiters were shown its scores.

The Amazon case is particularly instructive because it shows that removing a sensitive attribute from training data does not remove its influence. Variables correlated with the sensitive attribute carry the signal forward. This is a fundamental limitation that cannot be solved by simple feature exclusion — it requires structural changes to training data, evaluation design, or both.

Key Principle

Bias in AI agent outputs is not primarily a software bug — it is a data problem. Algorithms trained on historical data inherit the inequities of that history. When the decisions those algorithms make determine access to liberty (COMPAS), healthcare (Optum), or employment (Amazon), systematic inaccuracies concentrated in specific demographic groups constitute real, documented harm — regardless of design intent.

Algorithmic fairness impossibility The mathematical reality that several distinct formal definitions of algorithmic fairness — such as equal false positive rates, equal false negative rates, and calibration — cannot all be simultaneously satisfied when base rates differ between demographic groups.
Proxy discrimination Discrimination that occurs when an algorithm optimizes for a variable that is correlated with a protected characteristic, producing disparate outcomes without explicitly using the protected variable in its model.

Lesson 3 Quiz

Algorithmic bias in criminal justice, healthcare, and hiring
1. According to ProPublica's 2016 analysis, what was the false positive rate disparity in COMPAS scores between Black and white defendants?
Correct. ProPublica found that 44.9% of Black defendants who did not reoffend had been rated high or medium risk, compared to 23.5% of white defendants — nearly double the rate of false positives.
ProPublica documented that 44.9% of Black defendants who did not reoffend were labeled high/medium risk, versus 23.5% of white defendants — a nearly 2:1 disparity in false positive rates.
2. What was the specific proxy variable used by the Optum healthcare algorithm that produced racially disparate outcomes?
Correct. The Optum algorithm used predicted healthcare costs as a proxy for healthcare need. Because systemic barriers had historically reduced Black patients' healthcare utilization, the same actual need was associated with lower costs for Black patients — causing the algorithm to systematically underestimate their medical needs.
The algorithm used healthcare costs as the proxy for need. Since Black patients historically had less access to healthcare — and thus lower costs despite equal or greater need — this proxy encoded existing inequity into the algorithm's recommendations.
3. What did the 2019 Science study find about the scale of the Optum algorithm's impact?
Correct. Researchers estimated the Optum algorithm was used across health systems serving approximately 200 million Americans — making the racial disparity in referrals one of the largest documented algorithmic bias impacts in healthcare.
The study estimated the algorithm affected approximately 200 million people in the United States — making the documented 26.3 percentage point disparity in referrals between equally sick Black and white patients an enormous public health issue.
4. Why did Amazon's engineers fail to fix the bias in their recruiting algorithm by simply removing gender as an input variable?
Correct. Removing gender from the explicit features was insufficient because the algorithm had learned to use correlated signals — names of all-women's colleges, the word "women's" in club descriptions, phrasing patterns — to infer gender and apply the same bias through those proxies.
The algorithm had learned to infer gender from correlated variables such as school names and activity descriptions. Removing the explicit gender variable left all the correlated proxy signals intact, which the algorithm continued to use.
5. What did the Wisconsin Supreme Court's 2016 ruling in State v. Loomis establish regarding COMPAS?
Correct. The Wisconsin Supreme Court upheld a sentence informed by COMPAS even though the defendant was denied access to the algorithm's methodology — a ruling criticized as incompatible with due process rights because defendants could not meaningfully challenge a score whose basis was opaque.
In Loomis, the Wisconsin Supreme Court upheld sentences partially informed by COMPAS while also ruling that defendants could not access the algorithm's inner workings — a combination widely criticized by legal scholars as a due process concern.

Lab 3: Algorithmic Bias in High-Stakes Decisions

Analyze the mechanisms of proxy discrimination and fairness trade-offs in real systems

Your Mission

The COMPAS, Optum, and Amazon cases each demonstrate a different mechanism by which AI agents produce biased outcomes in high-stakes decisions. In this lab, discuss with the AI assistant how these mechanisms differ, whether algorithmic fairness can be achieved given mathematical constraints, and what obligations organizations have when their AI agents are making decisions that determine human access to liberty, healthcare, or employment.

Start with: "Northpointe claimed COMPAS was calibrated fairly. ProPublica showed it had disparate false positive rates. How can both be true simultaneously?" — then explore implications for other systems.
AI Safety Analyst
Algorithmic Bias
Ready to explore algorithmic bias in high-stakes decision systems. The COMPAS, Optum, and Amazon cases each involve distinct mechanisms — proxy discrimination, training data bias, and fairness impossibility. I can help you analyze why these failures occurred, what mathematical constraints limit possible solutions, and what that means for organizations deploying these systems. Where would you like to start?
Module 3 · Lesson 4

Autonomous Agents in the Wild: Self-Driving Fatalities, Content Moderation Failures, and Prompt Injection Attacks

Physical harm, mass psychological harm, and novel attack surfaces — what happens when AI agents operate with real-world autonomy and adversarial users.
When an AI agent causes physical death or systematically amplifies psychological harm, what does accountability require from the organizations that deployed it?

At 9:58 PM, an Uber autonomous test vehicle struck and killed Elaine Herzberg, 49, as she walked her bicycle across a street in Tempe, Arizona. The vehicle was traveling at 39 miles per hour in a 45 mph zone. It detected her approximately six seconds before impact but failed to classify her correctly — cycling through classifications of "unknown," "vehicle," and "bicycle" without arriving at "pedestrian" until it was too late to brake.

The vehicle's automatic emergency braking system had been disabled by Uber engineers during testing to reduce what they described as erratic vehicle behavior caused by false positives. A human safety operator was in the vehicle but was looking at a phone-mounted display at the moment of impact. Herzberg became the first documented pedestrian fatality caused by an autonomous vehicle.

The Uber Tempe Fatality: Documented Failure Points

The National Transportation Safety Board (NTSB) investigation, completed in November 2019, documented the sequence with technical precision. The Volvo XC90 test vehicle's LIDAR and radar sensors detected Herzberg 5.6 seconds before impact. The perception system's classification software cycled through multiple object classifications, which created instability in the system's response. Uber's software had a design parameter that applied a one-second delay before initiating emergency braking — intended to prevent false stops — and by the time the system identified a collision as imminent, it was too late to stop in time.

The NTSB identified three compounding failures: the perception system's inability to consistently classify pedestrians crossing outside crosswalks; the deliberate disabling of the Volvo's factory emergency braking system with no compensating safety measure; and the failure to maintain adequate human operator vigilance. The safety operator was inattentive for 28% of the 43-minute test drive preceding the crash.

Uber's own internal safety analysis, filed before the crash, had identified the Tempe test routes as having a higher risk profile than other locations. The company had also reduced the number of safety operators from two to one in the months before the crash, citing efficiency. Arizona prosecutors charged the safety operator, Rafaela Vasquez, with negligent homicide in 2020. Uber reached a financial settlement with Herzberg's family and ultimately sold its self-driving unit to Aurora Innovation in 2020.

NTSB Finding — November 2019
Uber Tempe Crash — Three Compounding Failures
Perception failure: Object classification software cycled through "unknown / vehicle / bicycle" and could not stably classify a pedestrian crossing outside a crosswalk at night.

Safety system disabled: Uber engineers had disabled the Volvo factory emergency braking with no compensating redundant safety measure, to reduce false positive stops during testing.

Human oversight failure: The safety operator was inattentive for 28% of the drive and was not monitoring the road at the moment of impact.

Facebook's Algorithmic Amplification and the 2021 Frances Haugen Disclosures

In October 2021, former Facebook product manager Frances Haugen provided tens of thousands of internal company documents to the U.S. Securities and Exchange Commission and to journalists. The documents — subsequently called the "Facebook Papers" — included internal research findings that Facebook's own teams had documented and that the company had not acted on.

Among the most significant findings: Facebook's engagement optimization algorithm — an AI agent designed to maximize time-on-platform — had been found by internal researchers in 2019 to systematically amplify content that produced outrage, misinformation, and political polarization, because that content generated more engagement signals (shares, reactions, comments) than neutral content. A 2019 internal study found that 64% of people who joined extremist groups on Facebook did so because the algorithm had directly recommended those groups.

Internal research also found that Instagram — owned by Facebook — made body image issues worse for roughly 13.5% of teenage girls, and that this finding had been documented internally in 2019 and 2020 before Haugen's disclosures. A March 2020 internal presentation stated: "We make body image issues worse for one in three teen girls." The company had not disclosed these findings publicly and had not significantly altered the recommendation algorithm.

The Optimization Problem

Facebook's content ranking algorithm was not designed to cause psychological harm or amplify extremism. It was designed to maximize engagement — a legitimate business objective. The harm was emergent: content that triggers outrage, fear, and tribalism reliably generates more engagement than accurate, balanced information. When you optimize hard enough for engagement, you get a system that systematically selects for harmful content as a side effect of its core objective. This is a specification failure at scale, affecting billions of users.

Prompt Injection: The Emerging Attack Surface for Autonomous Agents

As AI agents have moved beyond chatbots into systems that browse the web, read emails, execute code, and take actions in the real world, a new class of attack has emerged. Prompt injection occurs when malicious content in an agent's operating environment contains instructions that hijack the agent's behavior — causing it to act against the interests of its legitimate operator or user.

In 2023, security researchers documented multiple proof-of-concept attacks against commercially deployed agents. Researcher Riley Goodside demonstrated in 2022 that GPT-3-based tools could be hijacked by including instructions in documents the agent was asked to summarize. In 2023, security researcher Johann Rehberger demonstrated prompt injection attacks against Bing Chat (Microsoft Copilot) in which malicious instructions embedded in a webpage the agent browsed caused it to exfiltrate user conversation data and manipulate its own responses.

The Bing Chat attack was not merely a research curiosity. Microsoft's agent was browsing real web pages, reading real content, and taking real actions based on that content. Any web page the agent visited could, in principle, contain instructions the agent might follow — treating text from the environment as if it were instructions from the legitimate user or operator. This is a fundamental security challenge for any agent that reads from and acts on untrusted environments.

2022: Riley Goodside demonstrates GPT-3 tool hijacking via document content — the first widely-circulated public demonstration of prompt injection against a deployed AI tool.
March 2023: Greshake et al. publish "Not What You've Signed Up For" — the first systematic academic analysis of indirect prompt injection in real LLM-integrated applications.
May 2023: Johann Rehberger demonstrates data exfiltration via prompt injection in Bing Chat (Copilot) — content on browsed web pages causes the agent to leak conversation history.
2024: As agentic deployments expand — agents that send emails, execute code, manage files — prompt injection becomes an active area of security research with no complete technical solution yet identified.
Key Principle

The progression from Uber's fatal crash to Facebook's engagement amplification to prompt injection attacks reveals how AI agent harms scale with autonomy. Physical AI agents (self-driving cars) can cause immediate bodily harm. Recommendation agents operating at platform scale produce statistical harms across millions of users. Agentic software systems that read from and act on untrusted environments create adversarial attack surfaces that did not previously exist. Each level of autonomy requires correspondingly rigorous safety analysis before deployment.

Prompt injection An attack in which malicious instructions embedded in content an AI agent reads from its environment cause the agent to behave contrary to the intentions of its legitimate operator or user — analogous to a SQL injection attack but targeting the agent's instruction-following behavior.
Engagement optimization failure A class of AI agent harm in which optimizing for a measurable proxy objective (user engagement) produces systematic amplification of harmful content as a side effect, because harmful content reliably generates more engagement signals than accurate or balanced content.

Lesson 4 Quiz

Autonomous vehicle failures, content amplification harms, and prompt injection attacks
1. What critical safety system did Uber engineers deliberately disable on the test vehicle involved in the 2018 Tempe fatality?
Correct. Uber engineers had disabled the Volvo's factory automatic emergency braking system to reduce erratic behavior from false positives during testing — without implementing any compensating safety measure. The NTSB identified this as one of three compounding failures in the crash.
The specific safety system disabled was the Volvo factory automatic emergency braking — turned off by Uber engineers to reduce false positive stops during testing, with no compensating redundant safety measure implemented.
2. According to internal Facebook research disclosed by Frances Haugen, what percentage of extremist group joins on Facebook were the result of direct algorithmic recommendations?
Correct. A 2019 internal Facebook study found that 64% of people who joined extremist groups did so because the algorithm had directly recommended those groups — a finding documented internally but not disclosed publicly before the Haugen leaks.
Internal Facebook research from 2019 found that 64% of extremist group joins were the result of direct algorithmic recommendations — meaning the engagement optimization algorithm was actively driving users toward extremist content.
3. What did Facebook's own internal research find about Instagram's effect on teenage girls?
Correct. A March 2020 internal Facebook presentation stated "We make body image issues worse for one in three teen girls" — a finding that had been documented internally in 2019 and 2020 but not disclosed publicly before the Haugen leaks.
Internal Facebook research documented that Instagram made body image issues worse for approximately 13.5% — roughly one in three — of teenage girls. This finding was in internal presentations by 2020 but had not been publicly disclosed.
4. In the context of AI agents, what is prompt injection?
Correct. Prompt injection occurs when an attacker embeds instructions in content an agent reads from its environment — a web page, document, or email — causing the agent to follow those malicious instructions rather than the legitimate operator's or user's intent.
Prompt injection is an attack: malicious instructions embedded in environmental content (web pages, documents) cause the AI agent to act contrary to legitimate operator or user intentions — analogous to SQL injection but targeting instruction-following behavior.
5. What was the core specification failure in Facebook's content ranking algorithm?
Correct. The algorithm was designed to maximize engagement — a legitimate objective — but harmful content (outrage, fear, tribalism) reliably generates more engagement signals than accurate or balanced content. The harm was an emergent side effect of hard optimization for a proxy metric.
The core failure was a specification problem: the algorithm optimized for engagement, a reasonable proxy, but content that triggers outrage and fear reliably generates more engagement than accurate content. Harmful amplification was an emergent side effect of the optimization objective, not an explicit design goal.

Lab 4: Autonomous Agents, Scale, and Adversarial Environments

Analyze physical AI agent failures, platform-scale harms, and emerging prompt injection risks

Your Mission

This lesson covered three distinct categories of AI agent harm at scale: a physical autonomous vehicle fatality, psychological harm from engagement optimization affecting billions of users, and prompt injection as an emerging attack vector for agentic systems. In this lab, discuss with the AI assistant what accountability frameworks are appropriate for each category, how the disabling of Uber's safety system should inform current autonomous vehicle regulation, and what prompt injection means for organizations building agents that browse the web or read external documents.

Start by asking: "What does the Uber Tempe fatality tell us about how organizations should balance testing efficiency against safety when deploying autonomous agents?" — then explore the other cases.
AI Safety Analyst
Autonomous Agents
Ready to analyze Lesson 4's cases: the Uber Tempe fatality, Facebook's engagement-driven amplification harms, and prompt injection attacks on agentic systems. These represent three different scales of autonomous agent harm — individual physical harm, population-level psychological harm, and adversarial technical attacks. What would you like to explore first?

Module 3 Test

15 questions — score 80% or above to pass · Real Incidents: Cases Where AI Agents Caused Real Harm
1. The 2010 Flash Crash was primarily caused by which type of AI agent failure?
Correct. The Waddell & Reed algorithm was instructed to sell based on trading volume — causing it to accelerate selling as panic-driven volume increased, creating a destructive feedback loop.
The crash was caused by an objective specification failure: the selling algorithm used trading volume as its trigger, so it accelerated as panic drove volume up rather than pausing or slowing down.
2. According to the SEC/CFTC joint report, how many times were individual E-Mini futures contracts traded between HFT firms in just 14 seconds during the 2010 Flash Crash?
Correct. The SEC/CFTC joint report documented that the same contracts were traded 27,000 times in 14 seconds in the "hot potato" dynamic between high-frequency trading firms.
The joint SEC/CFTC report found that contracts were passed between HFT firms 27,000 times in just 14 seconds — the documented "hot potato" effect at the heart of the crash's severity.
3. Knight Capital's 2012 trading disaster was triggered by what specific operational failure?
Correct. Knight's deployment of new trading software missed one of eight servers. That server still ran the old "Power Peg" strategy from 2003, which activated when markets opened on August 1, 2012.
Knight's disaster stemmed from an incomplete deployment: one server did not receive the updated code and continued running the dormant Power Peg strategy from 2003, which began executing live trades when markets opened.
4. The British Columbia Civil Resolution Tribunal's 2024 ruling in the Air Canada chatbot case established which legal principle?
Correct. The tribunal ruled that Air Canada "cannot have it both ways" — deploying a chatbot for customer service while simultaneously claiming a disclaimer absolved it of responsibility for what the chatbot said to customers.
The Air Canada ruling established that operators are liable for their agents' representations — a company cannot deploy an AI agent to answer customer questions while disclaiming all responsibility for what it says.
5. The DPD chatbot incident in January 2024 primarily illustrated which AI agent failure mode?
Correct. The DPD chatbot swore at a customer and criticized DPD when prompted. The agent was technically functional — it understood and responded coherently — but lacked output constraints preventing responses directly contrary to operator interests.
DPD's failure was an output constraint failure — the chatbot's responses were coherent but contrary to operator interests because it lacked behavioral boundaries preventing it from criticizing its own operator on request.
6. ProPublica's 2016 COMPAS analysis found which pattern in false negative rates (labeled low-risk, did reoffend)?
Correct. ProPublica found that white defendants who reoffended were mislabeled as low-risk at 47.7%, compared to 28.0% for Black defendants — meaning the algorithm was more likely to under-estimate risk for white defendants and over-estimate risk for Black defendants.
ProPublica found that white defendants who went on to reoffend were labeled low-risk at 47.7% versus 28.0% for Black defendants — the algorithm systematically under-estimated risk for white defendants while over-estimating risk for Black defendants.
7. The Optum healthcare algorithm's racial disparity arose because it used healthcare costs as a proxy for need. Why did this produce systematically biased outcomes?
Correct. Because systemic barriers had historically reduced Black patients' access to care, they had lower healthcare costs than equally sick white patients. An algorithm trained on cost data to predict need therefore systematically underestimated the needs of Black patients.
The proxy failed because historical inequities in healthcare access meant Black patients had lower utilization costs despite equivalent or greater need — so the algorithm trained on cost data inherited the inequity, systematically underestimating Black patients' needs.
8. In State v. Loomis (2016), the Wisconsin Supreme Court ruled that sentences informed by COMPAS scores were permissible even though:
Correct. The Wisconsin Supreme Court upheld the COMPAS-informed sentence while also ruling that defendants could not access the algorithm's inner workings — a combination widely criticized as inconsistent with due process rights to confront and challenge evidence used against them.
Loomis is significant precisely because the court upheld COMPAS-informed sentences while ruling defendants could not challenge the algorithm's methodology — creating a due process gap in which opaque algorithmic scores inform liberty deprivations without transparency.
9. Why did removing gender as an explicit input variable from Amazon's recruiting algorithm fail to eliminate gender bias?
Correct. The algorithm had learned from a decade of male-dominated résumé data to associate success with male-correlated signals — school names, activity descriptions, phrasing patterns. Removing the explicit gender variable left those correlated signals intact.
Removing gender from explicit inputs was insufficient because the model had learned to use correlated proxies — school names, the word "women's," activity descriptions — to infer gender. The bias persisted through those proxy channels.
10. The NTSB investigation of the Uber Tempe crash found that the safety operator was inattentive for what percentage of the 43-minute drive preceding the crash?
Correct. The NTSB found the safety operator was inattentive for 28% of the drive — and was specifically looking at a phone-mounted display rather than the road at the moment of impact.
The NTSB documented that the safety operator was inattentive for 28% of the 43-minute test drive, and was actively distracted by a phone-mounted display at the specific moment of the fatal impact.
11. Facebook's internal 2019 research on extremist groups found that 64% of people joining extremist groups did so because of direct algorithmic recommendations. This is an example of which type of failure?
Correct. Facebook's algorithm was designed to maximize engagement — a legitimate business objective. The amplification of extremist content was an emergent side effect: such content generates more engagement signals (reactions, shares, comments) than neutral content, so the optimizer systematically favored it.
This is an emergent specification failure. The algorithm optimized for engagement — a reasonable proxy — but harmful and outrage-inducing content reliably generates more engagement than accurate content. The algorithm amplified extremism as a side effect of optimizing its stated objective.
12. Which researcher first publicly demonstrated prompt injection against GPT-3-based deployed tools in 2022?
Correct. Riley Goodside demonstrated in 2022 that GPT-3-based tools could be hijacked by including adversarial instructions in documents the agent was asked to summarize — one of the first widely-circulated public demonstrations of prompt injection.
Riley Goodside demonstrated the first widely-circulated prompt injection attacks against GPT-3-based tools in 2022. Johann Rehberger later demonstrated data exfiltration via Bing Chat in 2023, and Greshake et al. published the first systematic academic analysis in March 2023.
13. What does the mathematical concept of "algorithmic fairness impossibility" mean for AI systems like COMPAS?
Correct. When base rates differ between groups, you cannot simultaneously achieve equal false positive rates, equal false negative rates, AND calibration. This is why Northpointe and ProPublica were both mathematically correct while reaching seemingly contradictory conclusions about COMPAS fairness.
Algorithmic fairness impossibility refers to the mathematical fact that when groups have different base rates, multiple distinct fairness definitions cannot all be satisfied at once — which is why COMPAS could be calibrated (Northpointe's claim) while also having disparate false positive rates (ProPublica's finding).
14. What is the key structural difference between how the Flash Crash and Knight Capital incident harmed individual investors?
Correct. In the Flash Crash, investors who had stop-loss orders saw real permanent losses because their shares were sold at crash prices and the subsequent recovery did not benefit them. Knight Capital's $440 million in losses was largely internal to the firm, with market participants on the other side of Knight's bad trades actually profiting.
The harm profiles differed: Flash Crash investors with stop-loss orders suffered permanent losses when their shares sold at crash prices before recovery; Knight's losses were primarily absorbed by the firm, while counterparties on the other side of Knight's mispriced trades actually benefited.
15. Across all four lessons in this module, which common theme best describes why well-designed AI agents produced documented harm?
Correct. In every case — the Flash Crash (sell by volume), Knight (wrong code on one server), Air Canada chatbot (no domain scope), COMPAS (optimize accuracy without fairness constraints), Optum (cost as need proxy), Facebook (maximize engagement), Uber (disable safety system for efficiency) — the agents were executing their objectives. The objectives themselves were the failure point.
The unifying theme across all cases is objective specification failure: each agent was technically executing its design. The harm emerged because the objective did not fully capture real-world intent (sell-by-volume), context (Power Peg in production), constraints (no circuit breakers), or the consequences of proxy optimization (engagement, cost, recidivism scores).