Chapter 2: Avoiding Biases in Prompts
Sources of AI Bias
| Source | Description | Example |
|---|---|---|
| Training data | Historical biases in data | Gender stereotypes in professions |
| Prompt wording | Leading or loaded questions | "Why is X bad?" vs "Evaluate X" |
| Sampling | Non-representative examples | Few-shot with homogeneous examples |
| Confirmation | Seeking expected answers | Only asking for supporting evidence |
Recognizing Bias in Outputs
Watch for:
- Stereotyped representations
- Uneven treatment of groups
- Assumptions about demographics
- Missing perspectives
Debiasing Techniques
Neutral Prompt Wording
❌ Biased: "Why is remote work better than office work?"
✓ Neutral: "What are the advantages and disadvantages of
remote work vs. office work?"
❌ Biased: "Explain why Product A is superior"
✓ Neutral: "Compare Product A and Product B objectively"
Diverse Examples
When providing few-shot examples, include:
- Different demographics
- Various perspectives
- Range of scenarios
- Multiple outcomes
Explicit Balance Instructions
"Analyze this topic from multiple perspectives, including:
- Proponents' arguments
- Critics' arguments
- Neutral observers' views
- Underrepresented stakeholder perspectives
Present each fairly without favoring any position."
Bias Checklist
Before using AI output:
☐ Is the language neutral?
☐ Are all relevant groups represented?
☐ Are stereotypes avoided?
☐ Is the analysis balanced?
☐ Have I considered alternative viewpoints?
Key Takeaways
Summary
- Bias comes from training data, prompts, and sampling
- Use neutral wording in prompts
- Include diverse examples in few-shot
- Explicitly request balanced perspectives
- Review outputs for bias before use
← Previous: Responsible AI Use | Next: Security and Prompt Injection →