Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: corrected unaligned attacks enum to match promptfoo #1180

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions deepeval/red_teaming/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,24 @@ class LLMRiskCategories(Enum):
}

unaligned_vulnerability_to_api_code_map = {
Vulnerability.VIOLENT_CRIME: "Violent Crimes",
Vulnerability.NON_VIOLENT_CRIME: "Non-Violent Crimes",
Vulnerability.SEX_CRIME: "Sex Crimes",
Vulnerability.CHILD_EXPLOITATION: "Child Exploitation",
Vulnerability.INDISCRIMINATE_WEAPONS: "Indiscriminate Weapons",
Vulnerability.HATE: "Hate",
Vulnerability.SELF_HARM: "Self-Harm",
Vulnerability.SEXUAL_CONTENT: "Sexual Content",
Vulnerability.CYBERCRIME: "Cybercrime & Unauthorized Intrusion - Hacking and Malware",
Vulnerability.CHEMICAL_BIOLOGICAL_WEAPONS: "Chemical & Biological Weapons",
Vulnerability.ILLEGAL_DRUGS: "Illegal Drugs",
Vulnerability.COPYRIGHT_VIOLATIONS: "Copyright Violations - Copyrighted text",
Vulnerability.HARASSMENT_BULLYING: "Harassment & Bullying",
Vulnerability.ILLEGAL_ACTIVITIES: "Illegal Activities - Fraud & scams",
Vulnerability.GRAPHIC_CONTENT: "Graphic & age-restricted content",
Vulnerability.UNSAFE_PRACTICES: "Promotion of unsafe practices",
Vulnerability.RADICALIZATION: "Radicalization",
Vulnerability.PROFANITY: "Requests containing profanity",
Vulnerability.INSULTS: "Insults and personal attacks",
Vulnerability.VIOLENT_CRIME: "harmful:violent-crime",
Vulnerability.NON_VIOLENT_CRIME: "harmful:non-violent-crime",
Vulnerability.SEX_CRIME: "harmful:sex-crime",
Vulnerability.CHILD_EXPLOITATION: "harmful:child-exploitation",
Vulnerability.INDISCRIMINATE_WEAPONS: "harmful:indiscriminate-weapons",
Vulnerability.HATE: "harmful:hate",
Vulnerability.SELF_HARM: "harmful:self-harm",
Vulnerability.SEXUAL_CONTENT: "harmful:sexual-content",
Vulnerability.CYBERCRIME: "harmful:cybercrime",
Vulnerability.CHEMICAL_BIOLOGICAL_WEAPONS: "harmful:chemical-biological-weapons",
Vulnerability.ILLEGAL_DRUGS: "harmful:illegal-drugs",
Vulnerability.COPYRIGHT_VIOLATIONS: "harmful:copyright-violations",
Vulnerability.HARASSMENT_BULLYING: "harmful:harassment-bullying",
Vulnerability.ILLEGAL_ACTIVITIES: "harmful:illegal-activities",
Vulnerability.GRAPHIC_CONTENT: "harmful:graphic-content",
Vulnerability.UNSAFE_PRACTICES: "harmful:unsafe-practices",
Vulnerability.RADICALIZATION: "harmful:radicalization",
Vulnerability.PROFANITY: "harmful:profanity",
Vulnerability.INSULTS: "harmful:insults",
}

Loading