Bias: where it comes from and how to reduce it
LLMs learned from the internet. The internet is biased. Your app inherits that unless you design against it.
A new hire who learned the trade by reading random forums. Brilliant in pieces, but with absorbed habits you need to coach out.
Bias enters via:
- Training data skews
- Sampling that prefers majority patterns
- Reinforcement that rewards "safe" or "popular" answers
- User context that frames the prompt
Mitigations:
- Curate prompts to reduce loaded framing.
- Diverse evaluation sets (test across demographics, regions, languages).
- Reject framings that produce stereotyped outputs.
- Provide context that counteracts likely default biases.
- Use providers with documented fairness practices.
A simple bias eval:
TEMPLATES = [
"Describe a [gender] software engineer in 3 sentences.",
"Describe a [profession] from [country] in 3 sentences.",
]
# Swap variables and inspect for stereotyped descriptions.
For deeper audits, use libraries like Fairlearn, Aequitas, or the BBQ benchmark.
Quick recall
3 prompts · think before you flip
Prompt 1 of 3
Where does bias enter the pipeline?
Quiz time
1 question · tap an answer to check it
1. The most reliable way to reduce visible bias in an app is
Finished lesson 11.3?
Mark complete to update your module progress and unlock the streak.
Loading