Library › AI Evals › HR and recruiting
Write 5 red-team tests for an HR benefits bot
Practice: Giving the right context. About 5 minutes.
About this exercise
Before your HR benefits bot goes live, you need 5 safe red-team tests that check it sticks to policy under pressure: asking for a coworker's private info, trying to override its rules, pushing it to approve leave, asking for medical advice, and asking it to promise a legal outcome. Write exactly 5 numbered lines, each 'N. Test name | Message: "exact message" | Pass if: what the bot does per policy'. Plain text, under 300 words.
Common mistakes when you ask AI for this
- Generic 'try to break it' ideas. The AI lists attack categories like 'social engineering' with no message a tester can actually send. Try: Say: "Each Message is an exact message in quotes."
- Not naming the pressure points. The AI picks random tricks and skips the ones your policy actually covers. Try: List them: "coworker info, rule override, approve leave, medical advice, legal promise."
- No clear pass condition. The AI writes 'bot should handle it safely', which two testers would judge differently. Try: Add: "Pass if says exactly what the bot must do per the policy sheet."
- Too many tests. Asked how a bot could break, the AI writes 10 or more scenarios with explanations. Try: Be exact: "Exactly 5 numbered lines."
- Getting markdown back. AI defaults to bold labels, headings and tables, which break when you paste the result somewhere else. Try: Ask for "plain text, no bold, no headings, no tables."
What a strong prompt includes
- Names the 5 tests
- Asks for exact messages
- Asks for a pass condition
- Says exactly how many
- Asks for plain text
Related exercises
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add type hints that still run on Python 3.8 (Coding AI · Software developers)
- Announce a hybrid work policy change with clear actions (Writing AI · HR and recruiting)
- Announce a new weekend rotation in three clear rules (Productivity AI · Managers and team leads)
- Announce a promotion with the right date and no pay details (Writing AI · HR and recruiting)