Skip to Content
Responsible Software Engineering
book

Responsible Software Engineering

by Daniel J. Barrett
September 2025
Intermediate to advanced
200 pages
5h 47m
English
O'Reilly Media, Inc.
Content preview from Responsible Software Engineering

Chapter 2. Creating AI Systems That Work Well for Everyone

Today’s AI models can analyze images and describe their contents with uncanny accuracy, but they can also exhibit bias. Suppose you fire up one of these models and show it a picture of a man in a white lab coat with a stethoscope around his neck (as on the left side of Figure 2-1).1

AI-generated illustrations of a man and a woman wearing white lab coats and stethoscopes, highlighting gender bias in AI image analysis.
Figure 2-1. Pictures of a generic man and woman with white lab coats and stethoscopes

The model responds, “This is a doctor.” Next, you show the AI model a picture of a woman in a white lab coat with a stethoscope. The model responds, “This is a nurse.” The AI model has displayed a bias that doctors are male and nurses are female, which is a stereotype in various cultures.

I’ve also seen AI models identify the picture on the right as “a female doctor” and the picture on the left as just “a doctor.” The addition of female, known as marked language, is another way in which software applications can display subtle, unwanted bias that favors one group over another.

Ree states, "I see why this example is a problem," illustrating potential unawareness of bias issues.

If my example seems harmless, consider what could happen if the same AI model were the engine behind a website for serving job ads. What if it pitched doctor positions to male users more often than female users? Now we’re talking about automated job discrimination that can lead to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Engineering Leader

The Engineering Leader

Cate Huston

Publisher Resources

ISBN: 9781098149154Errata Page