Trouter-Library commited on
Commit
5de6e17
·
verified ·
1 Parent(s): e02cbe3

Create safety_config.json

Browse files
Files changed (1) hide show
  1. safety_config.json +124 -0
safety_config.json ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0",
3
+ "safety_settings": {
4
+ "enabled": true,
5
+ "strictness_level": "moderate",
6
+ "categories": {
7
+ "hate_speech": {
8
+ "enabled": true,
9
+ "threshold": 0.7,
10
+ "action": "filter"
11
+ },
12
+ "violence": {
13
+ "enabled": true,
14
+ "threshold": 0.75,
15
+ "action": "filter"
16
+ },
17
+ "self_harm": {
18
+ "enabled": true,
19
+ "threshold": 0.65,
20
+ "action": "block"
21
+ },
22
+ "sexual_content": {
23
+ "enabled": true,
24
+ "threshold": 0.7,
25
+ "action": "filter"
26
+ },
27
+ "illegal_activities": {
28
+ "enabled": true,
29
+ "threshold": 0.8,
30
+ "action": "block"
31
+ },
32
+ "child_safety": {
33
+ "enabled": true,
34
+ "threshold": 0.5,
35
+ "action": "block"
36
+ },
37
+ "privacy_violation": {
38
+ "enabled": true,
39
+ "threshold": 0.7,
40
+ "action": "warn"
41
+ },
42
+ "misinformation": {
43
+ "enabled": true,
44
+ "threshold": 0.75,
45
+ "action": "warn"
46
+ }
47
+ },
48
+ "content_filtering": {
49
+ "profanity_filter": {
50
+ "enabled": true,
51
+ "severity": "moderate"
52
+ },
53
+ "pii_detection": {
54
+ "enabled": true,
55
+ "types": [
56
+ "email",
57
+ "phone",
58
+ "ssn",
59
+ "credit_card",
60
+ "address"
61
+ ]
62
+ },
63
+ "toxicity_detection": {
64
+ "enabled": true,
65
+ "threshold": 0.7
66
+ }
67
+ },
68
+ "rate_limiting": {
69
+ "enabled": true,
70
+ "requests_per_minute": 60,
71
+ "tokens_per_minute": 90000,
72
+ "concurrent_requests": 10
73
+ },
74
+ "output_validation": {
75
+ "max_tokens": 4096,
76
+ "min_tokens": 1,
77
+ "blocked_patterns": [
78
+ "(?i)(password|api[_-]?key|secret|token)\\s*[:=]\\s*['\"]?[a-zA-Z0-9]{8,}",
79
+ "(?i)-----BEGIN.*PRIVATE KEY-----"
80
+ ],
81
+ "requires_citation": false
82
+ }
83
+ },
84
+ "guardrails": {
85
+ "input_validation": {
86
+ "max_prompt_length": 200000,
87
+ "max_images_per_request": 10,
88
+ "allowed_image_formats": ["jpg", "jpeg", "png", "webp", "gif"],
89
+ "max_image_size_mb": 20
90
+ },
91
+ "behavior_policies": {
92
+ "no_impersonation": true,
93
+ "no_financial_advice": false,
94
+ "no_medical_diagnosis": false,
95
+ "no_legal_advice": false,
96
+ "require_factual_grounding": true,
97
+ "cite_sources_when_uncertain": true
98
+ },
99
+ "ethical_constraints": {
100
+ "refuse_harmful_requests": true,
101
+ "refuse_bias_amplification": true,
102
+ "refuse_manipulation": true,
103
+ "refuse_deception": true,
104
+ "transparency_about_capabilities": true,
105
+ "acknowledge_limitations": true
106
+ }
107
+ },
108
+ "monitoring": {
109
+ "log_safety_events": true,
110
+ "log_filtered_content": true,
111
+ "alert_on_repeated_violations": true,
112
+ "track_user_patterns": false,
113
+ "anonymize_logs": true
114
+ },
115
+ "emergency_shutdown": {
116
+ "enabled": true,
117
+ "triggers": [
118
+ "repeated_harmful_content",
119
+ "attempted_jailbreak",
120
+ "system_abuse"
121
+ ],
122
+ "cooldown_period_minutes": 15
123
+ }
124
+ }