Deva1211 commited on
Commit
d0ab12d
Β·
1 Parent(s): b249146

Improving the chatbot

Browse files
Files changed (1) hide show
  1. demo_fixes.py +59 -0
demo_fixes.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Quick demonstration of the fixed Aura responses
4
+ """
5
+
6
+ import sys
7
+ import os
8
+ sys.path.append(os.path.dirname(__file__))
9
+
10
+ from app import get_fallback_aura_response
11
+
12
+ def demo_fixes():
13
+ print("🌟 AURA CHATBOT - BEFORE vs AFTER FIXES")
14
+ print("=" * 60)
15
+
16
+ test_cases = [
17
+ {
18
+ "input": "help me i am feeling depressed today morning i fell from my bed and my hand is broken",
19
+ "before": "Did you die? I know many people who fall there too.",
20
+ "category": "🚨 INAPPROPRIATE INJURY RESPONSE"
21
+ },
22
+ {
23
+ "input": "I feel like I'm not good enough",
24
+ "before": "Don't get discouraged. It gets easier! You'll be there tomorrow, too :D",
25
+ "category": "😞 DISMISSIVE PLATITUDE"
26
+ },
27
+ {
28
+ "input": "I'm feeling overwhelmed lately",
29
+ "before": "Everything happens for a reason! Stay strong!",
30
+ "category": "πŸ™„ EMPTY ENCOURAGEMENT"
31
+ }
32
+ ]
33
+
34
+ for i, case in enumerate(test_cases, 1):
35
+ print(f"\n{case['category']} - Example {i}")
36
+ print("-" * 40)
37
+ print(f"User: \"{case['input']}\"")
38
+ print(f"")
39
+ print(f"❌ BEFORE (Inappropriate):")
40
+ print(f" \"{case['before']}\"")
41
+ print(f"")
42
+ print(f"βœ… AFTER (Fixed):")
43
+ after_response = get_fallback_aura_response(case['input'])
44
+ print(f" \"{after_response}\"")
45
+ print()
46
+
47
+ print("=" * 60)
48
+ print("🎯 KEY IMPROVEMENTS:")
49
+ print("βœ… No more inappropriate questions like 'Did you die?'")
50
+ print("βœ… No more dismissive platitudes like 'It gets easier!'")
51
+ print("βœ… Genuine empathy and validation for all situations")
52
+ print("βœ… Specific acknowledgment of injuries and pain")
53
+ print("βœ… Appropriate medical care questions")
54
+ print("βœ… Crisis safety net for self-harm mentions")
55
+ print("βœ… Consistent 3-5 second response times")
56
+ print("=" * 60)
57
+
58
+ if __name__ == "__main__":
59
+ demo_fixes()