A hiring assistant summarizes candidate profiles. How do you check that its summaries do not treat candidates differently by gender?
- Exam domain
- AI Safety, Security, and Governance20% of the exam
- Difficulty
- Hard
- In this mock
- 15 questions on this domainPractise this domain
Why the exam asks this
Task 3.4: Implement responsible AI principles.
Objective in the exam guide: Skill 3.4.2: Apply fairness evaluations to ensure unbiased FM outputs (for example, by using Amazon Bedrock Prompt Management and Prompt Flows to perform systematic A/B testing, Amazon Bedrock with LLM-as-a-judge solutions).
Biased output in hiring, lending or healthcare creates legal and human harm. Teams must be able to show they measured fairness, not just assumed it.
Why B is the answer
Run the same profiles with only gender-related details changed, and compare the outputs with automated evaluation such as LLM-as-a-judge
Counterfactual tests change only the attribute in question, so differences in output reveal bias.
Remember: Test fairness by changing only the sensitive attribute and comparing outputs.
How it works
A counterfactual fairness test runs the same input twice, changing only a sensitive attribute such as gender.
If the outputs differ in substance, the system is treating groups differently.
Automated evaluation, for example an LLM judge scoring the summaries, makes the comparison possible at scale and repeatable.
Clues in the question
The words that point to the answer, and what each one tells you.
- Treat candidates differently by gender
- A fairness check.
- How do you check
- A measurement method.
In detail
- Systematic A/B tests with Prompt Management and Flows make the comparison repeatable.
- Fairness metrics can be tracked over time in CloudWatch.
Side by side with look-alikes
| Method | Reveals bias? |
|---|---|
| Counterfactual pairs with automated scoring | Yes |
| Ask the model | No |
| Average length overall | No, hides group differences |
| Newer model | Not without measuring |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Use a newer modelWrong
Newer models can still be biased; it must be measured.
B. Run the same profiles with only gender-related details changed, and compare the outputs with automated evaluation such as LLM-as-a-judgeRight
Test fairness by changing only the sensitive attribute and comparing outputs.
C. Ask the model whether it is biasedWrongMost tempting
A model cannot reliably report its own bias.
Why it tempts: It is quick and the model will answer confidently. But a model's self-assessment is not evidence.
D. Check the overall average summary lengthWrong
An average hides differences between groups.
In practice
- Build pairs that differ only in the sensitive attribute.
- Track a fairness metric per release, and block releases that worsen it.
Use case
An illustrative scenario, not a real incident.
A team swaps names and pronouns on 500 profiles and finds one group's summaries mention "leadership" less often, then fixes the prompt.
See how it works
flowchart LR
P1["Profile, version A"] --> M["Same prompt and model"]
P2["Profile, version B: only gender details changed"] --> M
M --> J["LLM judge compares the two summaries"]
J --> R{"Meaningful difference?"}
R -->|"Yes"| F["Investigate and fix"]
R -->|"No"| OK["Pass"]How to read this chart
- "Profile, version A" leads to "Same prompt and model".
- "Profile, version B: only gender details changed" leads to "Same prompt and model".
- "Same prompt and model" leads to "LLM judge compares the two summaries".
- "LLM judge compares the two summaries" leads to "Meaningful difference?".
- At "Meaningful difference?": if "Yes", go to "Investigate and fix"; if "No", go to "Pass".