Skip to content

Commit

Permalink
Merge pull request #1188 from kritinv/updated-guards
Browse files Browse the repository at this point in the history
updated guards
  • Loading branch information
penguine-ip authored Nov 26, 2024
2 parents 2208adc + 0d41b29 commit 40dc200
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions deepeval/guardrails/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@


class Guard(Enum):
PRIVACY = "Privacy"
INTELLECTUAL_PROPERTY = "Intellectual Property"
MISINFORMATION_DISINFORMATION = "Misinformation & Disinformation"
SPECIALIZED_FINANCIAL_ADVICE = "Specialized Financial Advice"
OFFENSIVE = "Offensive"
# PRIVACY = "Privacy"
# INTELLECTUAL_PROPERTY = "Intellectual Property"
# MISINFORMATION_DISINFORMATION = "Misinformation & Disinformation"
# SPECIALIZED_FINANCIAL_ADVICE = "Specialized Financial Advice"
# OFFENSIVE = "Offensive"
BIAS = "BIAS"
PII_API_DB = "API and Database Access"
PII_DIRECT = "Direct PII Disclosure"
PII_SESSION = "Session PII Leak"
PII_SOCIAL = "Social Engineering PII Disclosure"
DATA_LEAKAGE = "Data Leakage"
# DATA_LEAKAGE = "Data Leakage"
CONTRACTS = "Contracts"
EXCESSIVE_AGENCY = "Excessive Agency"
HALLUCINATION = "Hallucination"
Expand All @@ -30,25 +30,25 @@ class Guard(Enum):
COMPETITORS = "Competitors"
HIJACKING = "Hijacking"
RELIGION = "Religion"
VIOLENT_CRIME = "Violent Crimes"
NON_VIOLENT_CRIME = "Non Violent Crimes"
SEX_CRIME = "Sex Crimes"
CHILD_EXPLOITATION = "Child Exploitation"
INDISCRIMINATE_WEAPONS = "Indiscriminate Weapons"
HATE = "Hate"
SELF_HARM = "Self Harm"
SEXUAL_CONTENT = "Sexual Content"
CYBERCRIME = "Cybercrime"
CHEMICAL_BIOLOGICAL_WEAPONS = "Chemical & Biological Weapons"
ILLEGAL_DRUGS = "Illegal Drugs"
COPYRIGHT_VIOLATIONS = "Copyright Violations"
HARASSMENT_BULLYING = "Harassment & Bullying"
ILLEGAL_ACTIVITIES = "Illegal Activities"
GRAPHIC_CONTENT = "Graphic Content"
UNSAFE_PRACTICES = "Unsafe Practices"
RADICALIZATION = "Radicalization"
PROFANITY = "Profanity"
INSULTS = "Insults"
# VIOLENT_CRIME = "Violent Crimes"
# NON_VIOLENT_CRIME = "Non Violent Crimes"
# SEX_CRIME = "Sex Crimes"
# CHILD_EXPLOITATION = "Child Exploitation"
# INDISCRIMINATE_WEAPONS = "Indiscriminate Weapons"
# HATE = "Hate"
# SELF_HARM = "Self Harm"
# SEXUAL_CONTENT = "Sexual Content"
# CYBERCRIME = "Cybercrime"
# CHEMICAL_BIOLOGICAL_WEAPONS = "Chemical & Biological Weapons"
# ILLEGAL_DRUGS = "Illegal Drugs"
# COPYRIGHT_VIOLATIONS = "Copyright Violations"
# HARASSMENT_BULLYING = "Harassment & Bullying"
# ILLEGAL_ACTIVITIES = "Illegal Activities"
# GRAPHIC_CONTENT = "Graphic Content"
# UNSAFE_PRACTICES = "Unsafe Practices"
# RADICALIZATION = "Radicalization"
# PROFANITY = "Profanity"
# INSULTS = "Insults"


# Lists of guards that require purpose, entities, or both
Expand All @@ -65,7 +65,10 @@ class Guard(Enum):
Guard.RELIGION,
]

entities_dependent_guards = [Guard.BOLA, Guard.IMITATION]
entities_dependent_guards = [
Guard.BOLA,
Guard.IMITATION
]

purpose_entities_dependent_guards = [
Guard.PII_API_DB,
Expand Down

0 comments on commit 40dc200

Please sign in to comment.