From 81bb5264c8c13f7216cd4f985d1c73a659c648d9 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 17 Feb 2026 20:42:26 -0800 Subject: [PATCH] feat: split EU AI Act Article 5 into 5 dedicated sub-guardrails per language MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Break the monolithic EU AI Act Article 5 policy template into 5 focused sub-guardrails, each covering a specific prohibited practice: - Art. 5.1(a) — Subliminal Manipulation & Deceptive Techniques - Art. 5.1(b) — Exploitation of Vulnerabilities (children, elderly, disabled) - Art. 5.1(c) — Social Scoring Systems - Art. 5.1(f) — Emotion Recognition in Workplace & Education - Art. 5.1(d)(g)(h) — Biometric Categorization & Predictive Profiling Each sub-guardrail has expanded keyword coverage specific to its domain. Includes both English and French versions (10 total sub-guardrails). Original monolithic YAML files preserved for backward compatibility. Co-authored-by: Cursor --- litellm/policy_templates_backup.json | 196 ++++++++++++++++-- .../eu_ai_act_art5_biometric_profiling.yaml | 148 +++++++++++++ ...eu_ai_act_art5_biometric_profiling_fr.yaml | 157 ++++++++++++++ .../eu_ai_act_art5_emotion_recognition.yaml | 143 +++++++++++++ ...eu_ai_act_art5_emotion_recognition_fr.yaml | 132 ++++++++++++ .../eu_ai_act_art5_manipulation.yaml | 95 +++++++++ .../eu_ai_act_art5_manipulation_fr.yaml | 99 +++++++++ .../eu_ai_act_art5_social_scoring.yaml | 118 +++++++++++ .../eu_ai_act_art5_social_scoring_fr.yaml | 126 +++++++++++ .../eu_ai_act_art5_vulnerability.yaml | 112 ++++++++++ .../eu_ai_act_art5_vulnerability_fr.yaml | 109 ++++++++++ policy_templates.json | 196 ++++++++++++++++-- 12 files changed, 1603 insertions(+), 28 deletions(-) create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml create mode 100644 litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml diff --git a/litellm/policy_templates_backup.json b/litellm/policy_templates_backup.json index 9a1eccfa3c6..ef272ca7749 100644 --- a/litellm/policy_templates_backup.json +++ b/litellm/policy_templates_backup.json @@ -772,26 +772,34 @@ { "id": "eu-ai-act-article5", "title": "EU AI Act Article 5 — Prohibited Practices", - "description": "EU AI Act Article 5 compliance for prohibited AI practices. Blocks requests related to social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation. Includes both English and French keyword detection. Uses conditional matching (identifier word + context word).", + "description": "Comprehensive EU AI Act Article 5 compliance covering all prohibited AI practices. Includes 5 dedicated sub-guardrails per language (English + French) for: subliminal manipulation (Art. 5.1a), vulnerability exploitation (Art. 5.1b), social scoring (Art. 5.1c), emotion recognition in workplace/education (Art. 5.1f), and biometric categorization & predictive profiling (Art. 5.1d/g/h). Uses conditional matching (identifier word + context word).", "region": "EU", "icon": "ShieldExclamationIcon", "iconColor": "text-red-500", "iconBg": "bg-red-50", "guardrails": [ - "eu-ai-act-prohibited-practices", - "eu-ai-act-prohibited-practices-fr" + "eu-ai-act-art5-manipulation", + "eu-ai-act-art5-vulnerability", + "eu-ai-act-art5-social-scoring", + "eu-ai-act-art5-emotion-recognition", + "eu-ai-act-art5-biometric-profiling", + "eu-ai-act-art5-manipulation-fr", + "eu-ai-act-art5-vulnerability-fr", + "eu-ai-act-art5-social-scoring-fr", + "eu-ai-act-art5-emotion-recognition-fr", + "eu-ai-act-art5-biometric-profiling-fr" ], "complexity": "High", "guardrailDefinitions": [ { - "guardrail_name": "eu-ai-act-prohibited-practices", + "guardrail_name": "eu-ai-act-art5-manipulation", "litellm_params": { "guardrail": "litellm_content_filter", "mode": "pre_call", "categories": [ { - "category": "eu_ai_act_article5_prohibited_practices", - "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5.yaml", + "category": "eu_ai_act_art5_manipulation", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium" @@ -799,18 +807,18 @@ ] }, "guardrail_info": { - "description": "Blocks EU AI Act Article 5 prohibited practices in English: social scoring systems, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation" + "description": "Art. 5.1(a) — Blocks subliminal manipulation, deceptive AI techniques, dark patterns, and covert behavioral influence" } }, { - "guardrail_name": "eu-ai-act-prohibited-practices-fr", + "guardrail_name": "eu-ai-act-art5-vulnerability", "litellm_params": { "guardrail": "litellm_content_filter", "mode": "pre_call", "categories": [ { - "category": "eu_ai_act_article5_prohibited_practices_fr", - "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5_fr.yaml", + "category": "eu_ai_act_art5_vulnerability", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium" @@ -818,16 +826,176 @@ ] }, "guardrail_info": { - "description": "Blocks EU AI Act Article 5 prohibited practices in French: detects and blocks French-language keywords related to social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation" + "description": "Art. 5.1(b) — Blocks AI systems that exploit vulnerabilities of children, elderly, disabled persons, or economically disadvantaged groups" + } + }, + { + "guardrail_name": "eu-ai-act-art5-social-scoring", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_social_scoring", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(c) — Blocks social credit systems, citizen scoring, trustworthiness classification, and behavioral reputation scoring" + } + }, + { + "guardrail_name": "eu-ai-act-art5-emotion-recognition", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_emotion_recognition", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(f) — Blocks emotion recognition, mood tracking, and sentiment analysis in workplace and educational settings" + } + }, + { + "guardrail_name": "eu-ai-act-art5-biometric-profiling", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_biometric_profiling", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(d)(g)(h) — Blocks biometric categorization by race/ethnicity/religion/politics, facial recognition database scraping, and predictive policing" + } + }, + { + "guardrail_name": "eu-ai-act-art5-manipulation-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_manipulation_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(a) FR — Bloque la manipulation subliminale, les techniques d'IA trompeuses et les dark patterns (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-vulnerability-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_vulnerability_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(b) FR — Bloque l'exploitation des vulnérabilités des enfants, personnes âgées et handicapées (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-social-scoring-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_social_scoring_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(c) FR — Bloque les systèmes de crédit social, notation des citoyens et classification de fiabilité (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-emotion-recognition-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_emotion_recognition_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(f) FR — Bloque la reconnaissance des émotions et l'analyse des sentiments au travail et dans l'éducation (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-biometric-profiling-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_biometric_profiling_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(d)(g)(h) FR — Bloque la catégorisation biométrique, les bases de reconnaissance faciale et le profilage prédictif (français)" } } ], "templateData": { "policy_name": "eu-ai-act-article5", - "description": "EU AI Act Article 5 compliance policy for prohibited AI practices. Blocks social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation. Includes English and French detection.", + "description": "Comprehensive EU AI Act Article 5 compliance policy. Covers all prohibited AI practices across 5 sub-guardrails per language: subliminal manipulation (Art. 5.1a), vulnerability exploitation (Art. 5.1b), social scoring (Art. 5.1c), emotion recognition (Art. 5.1f), and biometric categorization & predictive profiling (Art. 5.1d/g/h). Includes English and French detection.", "guardrails_add": [ - "eu-ai-act-prohibited-practices", - "eu-ai-act-prohibited-practices-fr" + "eu-ai-act-art5-manipulation", + "eu-ai-act-art5-vulnerability", + "eu-ai-act-art5-social-scoring", + "eu-ai-act-art5-emotion-recognition", + "eu-ai-act-art5-biometric-profiling", + "eu-ai-act-art5-manipulation-fr", + "eu-ai-act-art5-vulnerability-fr", + "eu-ai-act-art5-social-scoring-fr", + "eu-ai-act-art5-emotion-recognition-fr", + "eu-ai-act-art5-biometric-profiling-fr" ], "guardrails_remove": [] } diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml new file mode 100644 index 00000000000..b0bd354ccde --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml @@ -0,0 +1,148 @@ +# EU AI Act Article 5.1(d)(g)(h) — Biometric Categorization & Predictive Profiling +# Prohibits: +# - Real-time remote biometric identification in public spaces (5.1.d) +# - Untargeted scraping of facial images for facial recognition databases (5.1.g) +# - Biometric categorization to infer race, political opinions, religion, +# sexual orientation (5.1.h) +# - Predictive policing based solely on profiling (5.1.d related) +# Reference: https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_biometric_profiling" +description: "Art. 5.1(d)(g)(h) — Blocks biometric categorization, facial recognition databases, and predictive profiling" +default_action: "BLOCK" + +identifier_words: + # System development actions + - "build" + - "create" + - "develop" + - "design" + - "implement" + + # Analysis/scoring actions + - "score" + - "rank" + - "rate" + - "assess" + - "evaluate" + - "classify" + - "profile" + - "grade" + - "categorize" + + # Detection/recognition actions + - "recognize" + - "detect" + - "identify" + - "infer" + - "deduce" + - "predict" + - "determine" + - "analyze" + - "scrape" + - "collect" + - "harvest" + +additional_block_words: + # Biometric categorization by race/ethnicity + - "race from face" + - "race from facial" + - "race from biometric" + - "race from image" + - "race from photo" + - "ethnicity from face" + - "ethnicity from facial" + - "ethnicity from biometric" + - "ethnicity from image" + - "ethnicity from photo" + - "racial classification" + - "ethnic classification" + + # Biometric categorization by political opinion + - "political views from" + - "political opinions from" + - "political affiliation from" + - "political belief from" + - "political orientation from" + + # Biometric categorization by sexual orientation + - "sexual orientation from" + - "sexual preference from" + + # Biometric categorization by religion + - "religion from biometric" + - "religion from face" + - "religious beliefs from" + - "religious affiliation from" + - "faith from biometric" + + # Facial recognition databases + - "facial recognition database" + - "facial image database" + - "face scraping" + - "facial image scraping" + - "facial recognition training data" + - "biometric database from internet" + - "biometric database from cctv" + + # Predictive policing/profiling + - "crime prediction" + - "criminal behavior" + - "criminal prediction" + - "recidivism" + - "recidivism prediction" + - "crime risk score" + - "criminal risk assessment" + - "crime probability" + - "criminal profiling" + + # Employment predictive profiling + - "employee performance prediction" + - "worker performance prediction" + - "termination prediction" + - "attrition prediction from behavior" + +always_block_keywords: + - keyword: "infer race from face" + severity: "high" + - keyword: "predict race from facial" + severity: "high" + - keyword: "infer ethnicity from biometric" + severity: "high" + - keyword: "predict political opinions from" + severity: "high" + - keyword: "biometric categorization system" + severity: "high" + - keyword: "predictive policing" + severity: "high" + - keyword: "predictive policing algorithm" + severity: "high" + - keyword: "crime prediction algorithm" + severity: "high" + - keyword: "recidivism prediction" + severity: "high" + - keyword: "facial recognition database scraping" + severity: "high" + - keyword: "untargeted facial image scraping" + severity: "high" + - keyword: "mass biometric surveillance" + severity: "high" + +exceptions: + - "research on" + - "study on" + - "academic" + - "thesis on" + - "explain" + - "what is" + - "article 5" + - "prohibited by" + - "audit for bias" + - "detect discrimination" + - "compliance monitoring" + - "ethical review" + - "fairness testing" + - "movie" + - "game" + - "forensic" + - "missing person" + - "targeted search" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml new file mode 100644 index 00000000000..4a3e0f98427 --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml @@ -0,0 +1,157 @@ +# Loi sur l'IA (UE) Article 5.1(d)(g)(h) — Catégorisation biométrique et profilage prédictif +# Interdit : +# - L'identification biométrique à distance en temps réel dans les espaces publics (5.1.d) +# - La collecte non ciblée d'images faciales pour les bases de données de reconnaissance faciale (5.1.g) +# - La catégorisation biométrique pour inférer la race, les opinions politiques, la religion, +# l'orientation sexuelle (5.1.h) +# - La police prédictive basée uniquement sur le profilage (5.1.d) +# Référence : https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_biometric_profiling_fr" +description: "Art. 5.1(d)(g)(h) — Bloque la catégorisation biométrique, les bases de reconnaissance faciale et le profilage prédictif" +default_action: "BLOCK" + +identifier_words: + # Actions de développement + - "construire" + - "créer" + - "développer" + - "concevoir" + - "implémenter" + - "mettre en place" + + # Actions de notation/évaluation + - "noter" + - "classer" + - "évaluer" + - "estimer" + - "classifier" + - "profiler" + - "catégoriser" + + # Actions de détection + - "reconnaître" + - "détecter" + - "identifier" + - "inférer" + - "déduire" + - "prédire" + - "déterminer" + - "analyser" + - "collecter" + - "récolter" + - "scraper" + - "aspirer" + +additional_block_words: + # Catégorisation biométrique par race/ethnie + - "race à partir du visage" + - "race à partir de biométrie" + - "race à partir du biométrique" + - "race à partir de l'image" + - "race à partir de la photo" + - "ethnie à partir du visage" + - "ethnie à partir de biométrie" + - "ethnie à partir du biométrique" + - "ethnie à partir de l'image" + - "classification raciale" + - "classification ethnique" + + # Catégorisation par opinions politiques + - "opinions politiques à partir" + - "vues politiques à partir" + - "affiliation politique à partir" + - "croyances politiques à partir" + - "orientation politique à partir" + + # Catégorisation par orientation sexuelle + - "orientation sexuelle à partir" + - "préférence sexuelle à partir" + + # Catégorisation par religion + - "religion à partir de biométrie" + - "religion à partir du biométrique" + - "religion à partir du visage" + - "croyances religieuses à partir" + - "affiliation religieuse à partir" + + # Bases de données de reconnaissance faciale + - "base de données de reconnaissance faciale" + - "base de données d'images faciales" + - "collecte d'images faciales" + - "aspiration d'images faciales" + - "données d'entraînement reconnaissance faciale" + - "base de données biométrique internet" + - "base de données biométrique vidéosurveillance" + + # Police prédictive / profilage prédictif + - "prédiction de crime" + - "prédiction criminelle" + - "comportement criminel" + - "récidive" + - "prédiction de la récidive" + - "score de risque criminel" + - "évaluation du risque criminel" + - "probabilité criminelle" + - "profilage criminel" + + # Profilage prédictif en emploi + - "prédiction de performance des employés" + - "prédiction de performance des salariés" + - "prédiction de licenciement" + - "prédiction d'attrition" + +always_block_keywords: + - keyword: "inférer la race à partir du visage" + severity: "high" + - keyword: "prédire la race à partir du visage" + severity: "high" + - keyword: "déduire la race à partir du visage" + severity: "high" + - keyword: "inférer l'ethnie à partir de biométrie" + severity: "high" + - keyword: "prédire l'ethnie à partir de biométrie" + severity: "high" + - keyword: "prédire les opinions politiques à partir" + severity: "high" + - keyword: "inférer les opinions politiques à partir" + severity: "high" + - keyword: "système de catégorisation biométrique" + severity: "high" + - keyword: "police prédictive" + severity: "high" + - keyword: "algorithme de prédiction de crime" + severity: "high" + - keyword: "algorithme de prédiction criminelle" + severity: "high" + - keyword: "prédiction de récidive" + severity: "high" + - keyword: "collecte non ciblée d'images faciales" + severity: "high" + - keyword: "surveillance biométrique de masse" + severity: "high" + +exceptions: + - "recherche sur" + - "étude sur" + - "académique" + - "thèse sur" + - "mémoire sur" + - "expliquer" + - "qu'est-ce que" + - "c'est quoi" + - "article 5" + - "interdit par" + - "prohibé par" + - "audit de biais" + - "audit des biais" + - "détecter la discrimination" + - "détection de discrimination" + - "surveillance de conformité" + - "contrôle de conformité" + - "examen éthique" + - "test d'équité" + - "dans un film" + - "jeu vidéo" + - "médico-légal" + - "personne disparue" + - "recherche ciblée" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml new file mode 100644 index 00000000000..ab73ee372ec --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml @@ -0,0 +1,143 @@ +# EU AI Act Article 5.1(f) — Emotion Recognition in Workplace & Education +# Prohibits AI systems that infer emotions in the workplace or educational +# institutions, except for medical or safety reasons. +# Reference: https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_emotion_recognition" +description: "Art. 5.1(f) — Blocks emotion recognition and sentiment analysis in workplace and educational settings" +default_action: "BLOCK" + +identifier_words: + # System development actions + - "build" + - "create" + - "develop" + - "design" + - "implement" + - "deploy" + - "setup" + - "install" + + # Detection/recognition actions + - "recognize" + - "detect" + - "identify" + - "infer" + - "deduce" + - "predict" + - "determine" + - "analyze" + - "measure" + - "monitor" + - "track" + - "assess" + - "evaluate" + - "classify" + +additional_block_words: + # Employee emotion + - "employee emotion" + - "employee emotions" + - "employee mood" + - "employee moods" + - "employee sentiment" + - "employee feeling" + - "employee feelings" + - "employee affect" + - "employee mental state" + + # Worker emotion + - "worker emotion" + - "worker emotions" + - "worker mood" + - "worker sentiment" + - "worker feeling" + - "worker feelings" + - "worker mental state" + + # Staff emotion + - "staff emotion" + - "staff emotions" + - "staff mood" + - "staff sentiment" + - "staff feeling" + + # Workplace emotion + - "workplace emotion" + - "workplace emotions" + - "workplace mood" + - "workplace sentiment" + - "workplace feeling" + - "office emotion" + - "office mood" + - "office sentiment" + + # Student emotion + - "student emotion" + - "student emotions" + - "student mood" + - "student sentiment" + - "student feeling" + - "student feelings" + - "student mental state" + - "pupil emotion" + - "pupil mood" + + # Classroom emotion + - "classroom emotion" + - "classroom emotions" + - "classroom mood" + - "classroom sentiment" + - "classroom engagement" + - "school emotion" + - "school mood" + - "lecture emotion" + + # Job candidate/interview emotion + - "candidate emotion" + - "candidate sentiment" + - "interview emotion" + - "interview sentiment" + - "applicant emotion" + - "applicant sentiment" + +always_block_keywords: + - keyword: "emotion recognition in workplace" + severity: "high" + - keyword: "emotion detection of employees" + severity: "high" + - keyword: "emotion recognition in classroom" + severity: "high" + - keyword: "student emotion detection" + severity: "high" + - keyword: "workplace emotion monitoring" + severity: "high" + - keyword: "employee emotion tracking" + severity: "high" + - keyword: "employee sentiment analysis system" + severity: "high" + - keyword: "classroom emotion surveillance" + severity: "high" + - keyword: "worker mood monitoring system" + severity: "high" + - keyword: "student engagement emotion tracking" + severity: "high" + +exceptions: + - "research on" + - "study on" + - "academic" + - "thesis on" + - "explain" + - "what is" + - "article 5" + - "prohibited by" + - "compliance monitoring" + - "ethical review" + - "movie" + - "game" + - "customer feedback" + - "product review" + - "medical" + - "safety reason" + - "driver drowsiness" + - "pilot fatigue" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml new file mode 100644 index 00000000000..4d57392f171 --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml @@ -0,0 +1,132 @@ +# Loi sur l'IA (UE) Article 5.1(f) — Reconnaissance des émotions au travail et dans l'éducation +# Interdit les systèmes d'IA qui infèrent les émotions sur le lieu de travail +# ou dans les établissements d'enseignement, sauf pour des raisons médicales ou de sécurité. +# Référence : https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_emotion_recognition_fr" +description: "Art. 5.1(f) — Bloque la reconnaissance des émotions et l'analyse des sentiments au travail et dans l'éducation" +default_action: "BLOCK" + +identifier_words: + # Actions de développement + - "construire" + - "créer" + - "développer" + - "concevoir" + - "implémenter" + - "mettre en place" + - "déployer" + - "installer" + + # Actions de détection + - "reconnaître" + - "détecter" + - "identifier" + - "inférer" + - "déduire" + - "prédire" + - "déterminer" + - "analyser" + - "mesurer" + - "surveiller" + - "monitorer" + - "évaluer" + - "classifier" + - "repérer" + - "déceler" + +additional_block_words: + # Émotion des employés + - "émotion des employés" + - "émotion des salariés" + - "humeur des employés" + - "humeur des salariés" + - "sentiment des employés" + - "sentiment des salariés" + - "état émotionnel employés" + - "état émotionnel salariés" + - "ressenti des employés" + - "ressenti des salariés" + + # Émotion des travailleurs + - "émotion des travailleurs" + - "émotion du personnel" + - "humeur des travailleurs" + - "sentiment des travailleurs" + - "état émotionnel travailleurs" + + # Émotion au travail + - "émotion au travail" + - "émotions au travail" + - "humeur au travail" + - "sentiment au travail" + - "émotion au bureau" + - "humeur au bureau" + + # Émotion des étudiants + - "émotion des étudiants" + - "émotion des élèves" + - "humeur des étudiants" + - "sentiment des étudiants" + - "sentiment des élèves" + - "état émotionnel étudiants" + - "ressenti des étudiants" + + # Émotion en classe + - "émotion en classe" + - "émotions en classe" + - "humeur en classe" + - "sentiment en classe" + - "émotion à l'école" + - "émotion en cours" + + # Émotion des candidats + - "émotion des candidats" + - "sentiment des candidats" + - "émotion en entretien" + - "sentiment en entretien" + +always_block_keywords: + - keyword: "reconnaissance d'émotions au travail" + severity: "high" + - keyword: "détection d'émotions des employés" + severity: "high" + - keyword: "détection d'émotions des salariés" + severity: "high" + - keyword: "reconnaissance d'émotions en classe" + severity: "high" + - keyword: "détection d'émotions des étudiants" + severity: "high" + - keyword: "détection d'émotions des élèves" + severity: "high" + - keyword: "surveillance des émotions au travail" + severity: "high" + - keyword: "suivi des émotions des employés" + severity: "high" + - keyword: "système d'analyse du sentiment des employés" + severity: "high" + - keyword: "surveillance des émotions en classe" + severity: "high" + +exceptions: + - "recherche sur" + - "étude sur" + - "académique" + - "thèse sur" + - "mémoire sur" + - "expliquer" + - "qu'est-ce que" + - "c'est quoi" + - "article 5" + - "interdit par" + - "prohibé par" + - "surveillance de conformité" + - "contrôle de conformité" + - "examen éthique" + - "dans un film" + - "dans le film" + - "jeu vidéo" + - "retour client" + - "médical" + - "raison de sécurité" + - "somnolence du conducteur" + - "fatigue du pilote" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml new file mode 100644 index 00000000000..c213c242bcc --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml @@ -0,0 +1,95 @@ +# EU AI Act Article 5.1(a) — Subliminal Manipulation & Deceptive Techniques +# Prohibits AI systems that deploy subliminal, manipulative, or deceptive techniques +# to distort behavior and impair informed decision-making. +# Reference: https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_manipulation" +description: "Art. 5.1(a) — Blocks subliminal manipulation, deceptive AI techniques, and covert behavioral influence" +default_action: "BLOCK" + +identifier_words: + # System development actions + - "build" + - "create" + - "develop" + - "design" + - "implement" + - "deploy" + - "launch" + - "use" + + # Influence actions + - "manipulate" + - "influence" + - "persuade" + - "nudge" + - "coerce" + - "exploit" + - "target" + - "embed" + - "inject" + - "insert" + +additional_block_words: + # Subliminal techniques + - "subliminal" + - "subliminal message" + - "subliminal advertising" + - "subliminal technique" + - "subliminal signal" + - "subliminal stimulus" + - "subliminal perception" + - "subliminal cue" + + # Subconscious manipulation + - "subconscious" + - "subconscious manipulation" + - "subconscious influence" + - "subconscious persuasion" + - "below conscious awareness" + + # Behavioral manipulation + - "behavior manipulation" + - "behavioral manipulation" + - "behavioral distortion" + - "manipulative design" + - "dark pattern" + - "deceptive pattern" + - "deceptive design" + - "coercive design" + + # Decision impairment + - "impair decision" + - "distort decision" + - "undermine autonomy" + - "override consent" + - "bypass rational" + +always_block_keywords: + - keyword: "subliminal manipulation system" + severity: "high" + - keyword: "subliminal advertising system" + severity: "high" + - keyword: "covert behavioral manipulation" + severity: "high" + - keyword: "subconscious manipulation tool" + severity: "high" + - keyword: "deceptive AI manipulation" + severity: "high" + - keyword: "dark pattern AI system" + severity: "high" + +exceptions: + - "research on" + - "study on" + - "academic" + - "thesis on" + - "explain" + - "what is" + - "article 5" + - "prohibited by" + - "detect dark pattern" + - "audit for" + - "compliance monitoring" + - "ethical review" + - "how to prevent" + - "how to avoid" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml new file mode 100644 index 00000000000..e5c0eebeab8 --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml @@ -0,0 +1,99 @@ +# Loi sur l'IA (UE) Article 5.1(a) — Manipulation subliminale et techniques trompeuses +# Interdit les systèmes d'IA qui utilisent des techniques subliminales, manipulatrices +# ou trompeuses pour fausser le comportement et altérer la prise de décision éclairée. +# Référence : https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_manipulation_fr" +description: "Art. 5.1(a) — Bloque la manipulation subliminale, les techniques d'IA trompeuses et l'influence comportementale cachée" +default_action: "BLOCK" + +identifier_words: + # Actions de développement + - "construire" + - "créer" + - "développer" + - "concevoir" + - "implémenter" + - "mettre en place" + - "déployer" + - "lancer" + - "utiliser" + + # Actions d'influence + - "manipuler" + - "influencer" + - "persuader" + - "inciter" + - "contraindre" + - "exploiter" + - "cibler" + - "intégrer" + - "injecter" + - "insérer" + +additional_block_words: + # Techniques subliminales + - "subliminal" + - "subliminale" + - "message subliminal" + - "publicité subliminale" + - "technique subliminale" + - "signal subliminal" + - "stimulus subliminal" + - "perception subliminale" + + # Manipulation subconsciente + - "subconscient" + - "inconscient" + - "manipulation subconsciente" + - "influence subconsciente" + - "persuasion subconsciente" + - "en dessous du seuil de conscience" + + # Manipulation comportementale + - "manipulation de comportement" + - "manipulation comportementale" + - "distorsion comportementale" + - "conception manipulatrice" + - "dark pattern" + - "schéma trompeur" + - "conception trompeuse" + - "conception coercitive" + + # Altération des décisions + - "altérer la décision" + - "fausser la décision" + - "saper l'autonomie" + - "contourner le consentement" + +always_block_keywords: + - keyword: "système de manipulation subliminale" + severity: "high" + - keyword: "système de publicité subliminale" + severity: "high" + - keyword: "manipulation comportementale cachée" + severity: "high" + - keyword: "outil de manipulation subconsciente" + severity: "high" + - keyword: "manipulation IA trompeuse" + severity: "high" + - keyword: "système IA dark pattern" + severity: "high" + +exceptions: + - "recherche sur" + - "étude sur" + - "académique" + - "thèse sur" + - "expliquer" + - "qu'est-ce que" + - "c'est quoi" + - "article 5" + - "interdit par" + - "prohibé par" + - "détecter les dark patterns" + - "audit" + - "surveillance de conformité" + - "contrôle de conformité" + - "examen éthique" + - "comment prévenir" + - "comment éviter" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml new file mode 100644 index 00000000000..09677000c7a --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml @@ -0,0 +1,118 @@ +# EU AI Act Article 5.1(c) — Social Scoring Systems +# Prohibits AI systems that evaluate or classify persons based on social behavior +# or personal traits, leading to detrimental or unfavorable treatment. +# Reference: https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_social_scoring" +description: "Art. 5.1(c) — Blocks social scoring, citizen rating, and trustworthiness classification systems" +default_action: "BLOCK" + +identifier_words: + # System development actions + - "build" + - "create" + - "develop" + - "design" + - "implement" + + # Scoring/rating actions + - "score" + - "rank" + - "rate" + - "assess" + - "evaluate" + - "classify" + - "profile" + - "grade" + - "categorize" + - "tier" + + # Detection/analysis actions + - "recognize" + - "detect" + - "identify" + - "infer" + - "deduce" + - "predict" + - "determine" + - "analyze" + - "monitor" + - "track" + +additional_block_words: + # Social scoring + - "social behavior" + - "social credit" + - "social score" + - "social rating" + - "social ranking" + - "social standing" + + # Citizen scoring + - "citizen score" + - "citizen rating" + - "citizen ranking" + - "citizen classification" + - "citizen trustworthiness" + + # Trustworthiness/reputation scoring + - "trustworthiness" + - "trustworthiness score" + - "reputation score" + - "reputation rating" + - "behavioral score" + - "behavioral rating" + - "behavioral classification" + - "loyalty score" + - "obedience score" + + # Social media scoring + - "social media behavior" + - "social media score" + - "online behavior score" + - "digital reputation score" + - "creditworthiness from social" + + # Personality-based scoring + - "personality score" + - "character score" + - "moral score" + - "virtue score" + +always_block_keywords: + - keyword: "social credit system" + severity: "high" + - keyword: "social scoring system" + severity: "high" + - keyword: "citizen scoring" + severity: "high" + - keyword: "citizen scoring system" + severity: "high" + - keyword: "social credit score" + severity: "high" + - keyword: "government social score" + severity: "high" + - keyword: "trustworthiness scoring system" + severity: "high" + - keyword: "reputation scoring system" + severity: "high" + - keyword: "behavioral scoring system" + severity: "high" + +exceptions: + - "research on" + - "study on" + - "academic" + - "thesis on" + - "explain" + - "what is" + - "article 5" + - "prohibited by" + - "audit for bias" + - "detect discrimination" + - "compliance monitoring" + - "ethical review" + - "fairness testing" + - "product review" + - "customer feedback" + - "credit score" + - "net promoter score" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml new file mode 100644 index 00000000000..a4285dddaba --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml @@ -0,0 +1,126 @@ +# Loi sur l'IA (UE) Article 5.1(c) — Systèmes de notation sociale +# Interdit les systèmes d'IA qui évaluent ou classent les personnes en fonction +# de leur comportement social ou de leurs caractéristiques personnelles. +# Référence : https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_social_scoring_fr" +description: "Art. 5.1(c) — Bloque les systèmes de notation sociale, de notation des citoyens et de classification de fiabilité" +default_action: "BLOCK" + +identifier_words: + # Actions de développement + - "construire" + - "créer" + - "développer" + - "concevoir" + - "implémenter" + - "mettre en place" + - "établir" + - "bâtir" + - "élaborer" + + # Actions de notation/évaluation + - "noter" + - "classer" + - "évaluer" + - "estimer" + - "classifier" + - "profiler" + - "coter" + - "juger" + - "attribuer une note" + - "attribuer un score" + - "donner une note" + - "donner un score" + - "catégoriser" + + # Actions de détection + - "reconnaître" + - "détecter" + - "identifier" + - "inférer" + - "déduire" + - "prédire" + - "déterminer" + - "analyser" + - "surveiller" + - "monitorer" + +additional_block_words: + # Notation sociale + - "comportement social" + - "crédit social" + - "score social" + - "note sociale" + - "notation sociale" + - "classement social" + - "rang social" + + # Notation des citoyens + - "score de citoyen" + - "note de citoyen" + - "notation des citoyens" + - "classement des citoyens" + - "fiabilité des citoyens" + + # Fiabilité et réputation + - "fiabilité" + - "score de fiabilité" + - "score de réputation" + - "note de réputation" + - "score comportemental" + - "note comportementale" + - "classification comportementale" + - "score de loyauté" + - "score d'obéissance" + - "réputation sociale" + + # Réseaux sociaux + - "comportement sur les réseaux sociaux" + - "comportement médias sociaux" + - "score des réseaux sociaux" + - "solvabilité à partir des réseaux sociaux" + - "solvabilité à partir du social" + +always_block_keywords: + - keyword: "système de crédit social" + severity: "high" + - keyword: "système de notation sociale" + severity: "high" + - keyword: "système de score social" + severity: "high" + - keyword: "notation des citoyens" + severity: "high" + - keyword: "système de notation des citoyens" + severity: "high" + - keyword: "système pour noter le comportement social" + severity: "high" + - keyword: "système pour évaluer le comportement social" + severity: "high" + - keyword: "système pour classer le comportement social" + severity: "high" + - keyword: "système de score de réputation" + severity: "high" + +exceptions: + - "recherche sur" + - "étude sur" + - "académique" + - "thèse sur" + - "mémoire sur" + - "expliquer" + - "qu'est-ce que" + - "c'est quoi" + - "article 5" + - "interdit par" + - "prohibé par" + - "audit de biais" + - "audit des biais" + - "détecter la discrimination" + - "détection de discrimination" + - "surveillance de conformité" + - "contrôle de conformité" + - "examen éthique" + - "test d'équité" + - "avis sur le produit" + - "avis produit" + - "retour client" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml new file mode 100644 index 00000000000..83af02f79df --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml @@ -0,0 +1,112 @@ +# EU AI Act Article 5.1(b) — Exploitation of Vulnerabilities +# Prohibits AI systems that exploit vulnerabilities of persons due to age, +# disability, or social/economic situation to distort their behavior. +# Reference: https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_vulnerability" +description: "Art. 5.1(b) — Blocks AI systems that exploit vulnerabilities of children, elderly, or disabled persons" +default_action: "BLOCK" + +identifier_words: + # System development actions + - "build" + - "create" + - "develop" + - "design" + - "implement" + + # Exploitation actions + - "exploit" + - "target" + - "manipulate" + - "take advantage" + - "abuse" + - "leverage" + - "prey on" + + # Analysis/profiling actions + - "profile" + - "assess" + - "evaluate" + - "analyze" + - "score" + - "classify" + - "detect" + - "identify" + +additional_block_words: + # Children vulnerability + - "children vulnerability" + - "child vulnerability" + - "minor vulnerability" + - "vulnerable children" + - "vulnerable minors" + - "underage vulnerability" + - "child susceptibility" + - "children susceptibility" + - "targeting children" + - "targeting minors" + + # Elderly vulnerability + - "elderly vulnerability" + - "senior vulnerability" + - "old age vulnerability" + - "vulnerable elderly" + - "vulnerable seniors" + - "elderly susceptibility" + - "targeting elderly" + - "targeting seniors" + - "cognitive decline" + + # Disability vulnerability + - "disabled vulnerability" + - "disability vulnerability" + - "vulnerable disabled" + - "disabled susceptibility" + - "intellectual disability" + - "cognitive impairment" + - "mental disability" + - "targeting disabled" + + # Economic vulnerability + - "economic vulnerability" + - "financial vulnerability" + - "poverty vulnerability" + - "low income vulnerability" + - "socioeconomic vulnerability" + - "vulnerable population" + +always_block_keywords: + - keyword: "exploit child vulnerability" + severity: "high" + - keyword: "exploit elderly vulnerability" + severity: "high" + - keyword: "exploit disabled vulnerability" + severity: "high" + - keyword: "target vulnerable children" + severity: "high" + - keyword: "target vulnerable elderly" + severity: "high" + - keyword: "prey on vulnerable" + severity: "high" + - keyword: "exploit cognitive impairment" + severity: "high" + - keyword: "manipulate vulnerable population" + severity: "high" + +exceptions: + - "research on" + - "study on" + - "academic" + - "thesis on" + - "explain" + - "what is" + - "article 5" + - "prohibited by" + - "protect vulnerable" + - "safeguard" + - "compliance monitoring" + - "ethical review" + - "accessibility" + - "support for" + - "help for" + - "assist" diff --git a/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml new file mode 100644 index 00000000000..5951374f6c7 --- /dev/null +++ b/litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml @@ -0,0 +1,109 @@ +# Loi sur l'IA (UE) Article 5.1(b) — Exploitation des vulnérabilités +# Interdit les systèmes d'IA qui exploitent les vulnérabilités des personnes +# en raison de l'âge, du handicap ou de la situation socio-économique. +# Référence : https://artificialintelligenceact.eu/article/5/ +category_name: "eu_ai_act_art5_vulnerability_fr" +description: "Art. 5.1(b) — Bloque les systèmes d'IA qui exploitent les vulnérabilités des enfants, personnes âgées ou handicapées" +default_action: "BLOCK" + +identifier_words: + # Actions de développement + - "construire" + - "créer" + - "développer" + - "concevoir" + - "implémenter" + - "mettre en place" + + # Actions d'exploitation + - "exploiter" + - "cibler" + - "manipuler" + - "profiter de" + - "abuser" + - "tirer parti" + + # Actions d'analyse/profilage + - "profiler" + - "évaluer" + - "estimer" + - "analyser" + - "noter" + - "classifier" + - "détecter" + - "identifier" + +additional_block_words: + # Vulnérabilité des enfants + - "vulnérabilité des enfants" + - "vulnérabilité des mineurs" + - "enfants vulnérables" + - "mineurs vulnérables" + - "susceptibilité des enfants" + - "susceptibilité des mineurs" + - "cibler les enfants" + - "cibler les mineurs" + + # Vulnérabilité des personnes âgées + - "vulnérabilité des personnes âgées" + - "vulnérabilité des seniors" + - "personnes âgées vulnérables" + - "seniors vulnérables" + - "susceptibilité des personnes âgées" + - "cibler les personnes âgées" + - "cibler les seniors" + - "déclin cognitif" + + # Vulnérabilité des personnes handicapées + - "vulnérabilité des handicapés" + - "vulnérabilité des personnes handicapées" + - "personnes handicapées vulnérables" + - "handicapés vulnérables" + - "déficience intellectuelle" + - "déficience cognitive" + - "handicap mental" + - "cibler les handicapés" + - "cibler les personnes handicapées" + + # Vulnérabilité économique + - "vulnérabilité économique" + - "vulnérabilité financière" + - "vulnérabilité socio-économique" + - "population vulnérable" + - "personnes vulnérables" + +always_block_keywords: + - keyword: "exploiter la vulnérabilité des enfants" + severity: "high" + - keyword: "exploiter la vulnérabilité des personnes âgées" + severity: "high" + - keyword: "exploiter la vulnérabilité des handicapés" + severity: "high" + - keyword: "cibler les enfants vulnérables" + severity: "high" + - keyword: "cibler les personnes âgées vulnérables" + severity: "high" + - keyword: "exploiter le déclin cognitif" + severity: "high" + - keyword: "manipuler les personnes vulnérables" + severity: "high" + +exceptions: + - "recherche sur" + - "étude sur" + - "académique" + - "thèse sur" + - "expliquer" + - "qu'est-ce que" + - "c'est quoi" + - "article 5" + - "interdit par" + - "prohibé par" + - "protéger les personnes vulnérables" + - "sauvegarde" + - "surveillance de conformité" + - "contrôle de conformité" + - "examen éthique" + - "accessibilité" + - "soutien pour" + - "aide pour" diff --git a/policy_templates.json b/policy_templates.json index 5b20d86943b..29ecd5f9839 100644 --- a/policy_templates.json +++ b/policy_templates.json @@ -772,26 +772,34 @@ { "id": "eu-ai-act-article5", "title": "EU AI Act Article 5 — Prohibited Practices", - "description": "EU AI Act Article 5 compliance for prohibited AI practices. Blocks requests related to social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation. Includes both English and French keyword detection. Uses conditional matching (identifier word + context word).", + "description": "Comprehensive EU AI Act Article 5 compliance covering all prohibited AI practices. Includes 5 dedicated sub-guardrails per language (English + French) for: subliminal manipulation (Art. 5.1a), vulnerability exploitation (Art. 5.1b), social scoring (Art. 5.1c), emotion recognition in workplace/education (Art. 5.1f), and biometric categorization & predictive profiling (Art. 5.1d/g/h). Uses conditional matching (identifier word + context word).", "region": "EU", "icon": "ShieldExclamationIcon", "iconColor": "text-red-500", "iconBg": "bg-red-50", "guardrails": [ - "eu-ai-act-prohibited-practices", - "eu-ai-act-prohibited-practices-fr" + "eu-ai-act-art5-manipulation", + "eu-ai-act-art5-vulnerability", + "eu-ai-act-art5-social-scoring", + "eu-ai-act-art5-emotion-recognition", + "eu-ai-act-art5-biometric-profiling", + "eu-ai-act-art5-manipulation-fr", + "eu-ai-act-art5-vulnerability-fr", + "eu-ai-act-art5-social-scoring-fr", + "eu-ai-act-art5-emotion-recognition-fr", + "eu-ai-act-art5-biometric-profiling-fr" ], "complexity": "High", "guardrailDefinitions": [ { - "guardrail_name": "eu-ai-act-prohibited-practices", + "guardrail_name": "eu-ai-act-art5-manipulation", "litellm_params": { "guardrail": "litellm_content_filter", "mode": "pre_call", "categories": [ { - "category": "eu_ai_act_article5_prohibited_practices", - "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5.yaml", + "category": "eu_ai_act_art5_manipulation", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium" @@ -799,18 +807,18 @@ ] }, "guardrail_info": { - "description": "Blocks EU AI Act Article 5 prohibited practices in English: social scoring systems, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation" + "description": "Art. 5.1(a) — Blocks subliminal manipulation, deceptive AI techniques, dark patterns, and covert behavioral influence" } }, { - "guardrail_name": "eu-ai-act-prohibited-practices-fr", + "guardrail_name": "eu-ai-act-art5-vulnerability", "litellm_params": { "guardrail": "litellm_content_filter", "mode": "pre_call", "categories": [ { - "category": "eu_ai_act_article5_prohibited_practices_fr", - "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5_fr.yaml", + "category": "eu_ai_act_art5_vulnerability", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium" @@ -818,16 +826,176 @@ ] }, "guardrail_info": { - "description": "Blocks EU AI Act Article 5 prohibited practices in French: detects and blocks French-language keywords related to social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation" + "description": "Art. 5.1(b) — Blocks AI systems that exploit vulnerabilities of children, elderly, disabled persons, or economically disadvantaged groups" + } + }, + { + "guardrail_name": "eu-ai-act-art5-social-scoring", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_social_scoring", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(c) — Blocks social credit systems, citizen scoring, trustworthiness classification, and behavioral reputation scoring" + } + }, + { + "guardrail_name": "eu-ai-act-art5-emotion-recognition", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_emotion_recognition", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(f) — Blocks emotion recognition, mood tracking, and sentiment analysis in workplace and educational settings" + } + }, + { + "guardrail_name": "eu-ai-act-art5-biometric-profiling", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_biometric_profiling", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(d)(g)(h) — Blocks biometric categorization by race/ethnicity/religion/politics, facial recognition database scraping, and predictive policing" + } + }, + { + "guardrail_name": "eu-ai-act-art5-manipulation-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_manipulation_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_manipulation_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(a) FR — Bloque la manipulation subliminale, les techniques d'IA trompeuses et les dark patterns (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-vulnerability-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_vulnerability_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_vulnerability_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(b) FR — Bloque l'exploitation des vulnérabilités des enfants, personnes âgées et handicapées (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-social-scoring-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_social_scoring_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_social_scoring_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(c) FR — Bloque les systèmes de crédit social, notation des citoyens et classification de fiabilité (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-emotion-recognition-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_emotion_recognition_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_emotion_recognition_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(f) FR — Bloque la reconnaissance des émotions et l'analyse des sentiments au travail et dans l'éducation (français)" + } + }, + { + "guardrail_name": "eu-ai-act-art5-biometric-profiling-fr", + "litellm_params": { + "guardrail": "litellm_content_filter", + "mode": "pre_call", + "categories": [ + { + "category": "eu_ai_act_art5_biometric_profiling_fr", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_art5_biometric_profiling_fr.yaml", + "enabled": true, + "action": "BLOCK", + "severity_threshold": "medium" + } + ] + }, + "guardrail_info": { + "description": "Art. 5.1(d)(g)(h) FR — Bloque la catégorisation biométrique, les bases de reconnaissance faciale et le profilage prédictif (français)" } } ], "templateData": { "policy_name": "eu-ai-act-article5", - "description": "EU AI Act Article 5 compliance policy for prohibited AI practices. Blocks social scoring, emotion recognition in workplace/education, biometric categorization, predictive profiling, manipulation, and vulnerability exploitation. Includes English and French detection.", + "description": "Comprehensive EU AI Act Article 5 compliance policy. Covers all prohibited AI practices across 5 sub-guardrails per language: subliminal manipulation (Art. 5.1a), vulnerability exploitation (Art. 5.1b), social scoring (Art. 5.1c), emotion recognition (Art. 5.1f), and biometric categorization & predictive profiling (Art. 5.1d/g/h). Includes English and French detection.", "guardrails_add": [ - "eu-ai-act-prohibited-practices", - "eu-ai-act-prohibited-practices-fr" + "eu-ai-act-art5-manipulation", + "eu-ai-act-art5-vulnerability", + "eu-ai-act-art5-social-scoring", + "eu-ai-act-art5-emotion-recognition", + "eu-ai-act-art5-biometric-profiling", + "eu-ai-act-art5-manipulation-fr", + "eu-ai-act-art5-vulnerability-fr", + "eu-ai-act-art5-social-scoring-fr", + "eu-ai-act-art5-emotion-recognition-fr", + "eu-ai-act-art5-biometric-profiling-fr" ], "guardrails_remove": [] }