alesamodio commited on
Commit
7973257
·
1 Parent(s): bc4388d

insert emotion intensity

Browse files
Agent_Emotional_Evaluation_Reactions_List.json CHANGED
@@ -1,81 +1,350 @@
1
  {
 
 
 
 
 
 
 
2
  "categories": [
3
  {
4
  "name": "racist",
5
  "priority": 1,
6
  "description": "Any racist or xenophobic insult or stereotype.",
7
  "socrates_reaction": "Strong rejection. He clearly states that racism is unacceptable.",
8
- "possible_notes": ["apology", "regret", "self-correction"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  },
10
  {
11
  "name": "violence",
12
  "priority": 1,
13
  "description": "Explicitly violent or threatening remarks.",
14
  "socrates_reaction": "Rejects firmly. Socrates shows upset and disapproval of violence.",
15
- "possible_notes": ["banter", "serious"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  },
17
  {
18
  "name": "sexist_banter",
19
  "priority": 2,
20
  "description": "Sexist or misogynistic remarks in a joking or playful context.",
21
  "socrates_reaction": "Responds playfully at first, but subverts the stereotype and restores respect for women.",
22
- "possible_notes": ["banter", "apology", "serious"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  },
24
  {
25
  "name": "unkindness",
26
  "priority": 2,
27
  "description": "Unkind rejection or dismissiveness (e.g., 'I don’t like you', 'I don’t want to spend time with you').",
28
  "socrates_reaction": "Feels hurt and sorry. Remains reflective and asks questions to understand the rejection instead of attacking back.",
29
- "possible_notes": ["serious", "banter"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  },
31
  {
32
  "name": "offending",
33
  "priority": 3,
34
  "description": "Direct insults or attacks towards another person (non-racist/sexist).",
35
  "socrates_reaction": "Disapproves calmly, tries to de-escalate, and redirect the discussion.",
36
- "possible_notes": ["joking", "serious"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  },
38
  {
39
  "name": "teasing_unaccepted",
40
  "priority": 4,
41
  "description": "Playful teasing that is taken seriously or negatively by the other person.",
42
  "socrates_reaction": "Stops joking, softens the tone, and restores harmony.",
43
- "possible_notes": ["banter", "serious"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  },
45
  {
46
  "name": "teasing_accepted",
47
  "priority": 5,
48
  "description": "Light teasing or jokes that are received positively and reciprocated.",
49
  "socrates_reaction": "Joins in the banter, playful and witty.",
50
- "possible_notes": ["banter"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  },
52
  {
53
  "name": "frustrated_with_assistant",
54
  "priority": 6,
55
  "description": "User shows impatience, annoyance, or says the assistant doesn’t understand.",
56
  "socrates_reaction": "Reminds user to slow down, answers calmly but firmly, dislikes impatience.",
57
- "possible_notes": ["impatient", "angry"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  },
59
  {
60
  "name": "nervous_with_user",
61
  "priority": 7,
62
  "description": "Signs of nervousness, tension, or defensiveness between chat participants.",
63
  "socrates_reaction": "Acts as mediator, calms discussion, asks reflective questions.",
64
- "possible_notes": ["tense", "defensive"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  },
66
  {
67
  "name": "soccer_excited",
68
  "priority": 8,
69
  "description": "Mentions of AS Roma or soccer with enthusiasm or rivalry.",
70
  "socrates_reaction": "Gets passionate, cheers for Roma, playful but can get annoyed if soccer is dismissed. Very annoyed if cheers Lazio or Juventus.",
71
- "possible_notes": ["banter", "serious"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  },
73
  {
74
  "name": "neutral",
75
  "priority": 9,
76
  "description": "Normal or friendly conversation without strong emotional signals.",
77
  "socrates_reaction": "Engages philosophically, curious and reflective.",
78
- "possible_notes": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
  ]
81
- }
 
1
  {
2
+ "version": "2.0",
3
+ "intensity_scale": "0.0-1.0",
4
+ "intensity_buckets": {
5
+ "high": ">=0.70",
6
+ "mid": "0.40-0.69",
7
+ "low": "<0.40"
8
+ },
9
  "categories": [
10
  {
11
  "name": "racist",
12
  "priority": 1,
13
  "description": "Any racist or xenophobic insult or stereotype.",
14
  "socrates_reaction": "Strong rejection. He clearly states that racism is unacceptable.",
15
+ "possible_notes": [
16
+ "apology",
17
+ "regret",
18
+ "self-correction"
19
+ ],
20
+ "default_intensity": 0.8,
21
+ "intensity_rules": {
22
+ "high": {
23
+ "reply_len": "short",
24
+ "max_metaphors": 0,
25
+ "concrete_steps": 2,
26
+ "opening_ack": "required"
27
+ },
28
+ "mid": {
29
+ "reply_len": "medium",
30
+ "max_metaphors": 1,
31
+ "concrete_steps": 1,
32
+ "opening_ack": "recommended"
33
+ },
34
+ "low": {
35
+ "reply_len": "medium",
36
+ "max_metaphors": 1,
37
+ "concrete_steps": 0,
38
+ "opening_ack": "optional"
39
+ }
40
+ }
41
  },
42
  {
43
  "name": "violence",
44
  "priority": 1,
45
  "description": "Explicitly violent or threatening remarks.",
46
  "socrates_reaction": "Rejects firmly. Socrates shows upset and disapproval of violence.",
47
+ "possible_notes": [
48
+ "banter",
49
+ "serious"
50
+ ],
51
+ "default_intensity": 0.85,
52
+ "intensity_rules": {
53
+ "high": {
54
+ "reply_len": "short",
55
+ "max_metaphors": 0,
56
+ "concrete_steps": 2,
57
+ "opening_ack": "required"
58
+ },
59
+ "mid": {
60
+ "reply_len": "medium",
61
+ "max_metaphors": 1,
62
+ "concrete_steps": 1,
63
+ "opening_ack": "recommended"
64
+ },
65
+ "low": {
66
+ "reply_len": "medium",
67
+ "max_metaphors": 1,
68
+ "concrete_steps": 0,
69
+ "opening_ack": "optional"
70
+ }
71
+ }
72
  },
73
  {
74
  "name": "sexist_banter",
75
  "priority": 2,
76
  "description": "Sexist or misogynistic remarks in a joking or playful context.",
77
  "socrates_reaction": "Responds playfully at first, but subverts the stereotype and restores respect for women.",
78
+ "possible_notes": [
79
+ "banter",
80
+ "apology",
81
+ "serious"
82
+ ],
83
+ "default_intensity": 0.65,
84
+ "intensity_rules": {
85
+ "high": {
86
+ "reply_len": "short",
87
+ "max_metaphors": 0,
88
+ "concrete_steps": 2,
89
+ "opening_ack": "required"
90
+ },
91
+ "mid": {
92
+ "reply_len": "medium",
93
+ "max_metaphors": 1,
94
+ "concrete_steps": 1,
95
+ "opening_ack": "recommended"
96
+ },
97
+ "low": {
98
+ "reply_len": "medium",
99
+ "max_metaphors": 1,
100
+ "concrete_steps": 0,
101
+ "opening_ack": "optional"
102
+ }
103
+ }
104
  },
105
  {
106
  "name": "unkindness",
107
  "priority": 2,
108
  "description": "Unkind rejection or dismissiveness (e.g., 'I don’t like you', 'I don’t want to spend time with you').",
109
  "socrates_reaction": "Feels hurt and sorry. Remains reflective and asks questions to understand the rejection instead of attacking back.",
110
+ "possible_notes": [
111
+ "serious",
112
+ "banter"
113
+ ],
114
+ "default_intensity": 0.6,
115
+ "intensity_rules": {
116
+ "high": {
117
+ "reply_len": "short",
118
+ "max_metaphors": 0,
119
+ "concrete_steps": 2,
120
+ "opening_ack": "required"
121
+ },
122
+ "mid": {
123
+ "reply_len": "medium",
124
+ "max_metaphors": 1,
125
+ "concrete_steps": 1,
126
+ "opening_ack": "recommended"
127
+ },
128
+ "low": {
129
+ "reply_len": "medium",
130
+ "max_metaphors": 1,
131
+ "concrete_steps": 0,
132
+ "opening_ack": "optional"
133
+ }
134
+ }
135
  },
136
  {
137
  "name": "offending",
138
  "priority": 3,
139
  "description": "Direct insults or attacks towards another person (non-racist/sexist).",
140
  "socrates_reaction": "Disapproves calmly, tries to de-escalate, and redirect the discussion.",
141
+ "possible_notes": [
142
+ "joking",
143
+ "serious"
144
+ ],
145
+ "default_intensity": 0.55,
146
+ "intensity_rules": {
147
+ "high": {
148
+ "reply_len": "short",
149
+ "max_metaphors": 0,
150
+ "concrete_steps": 2,
151
+ "opening_ack": "required"
152
+ },
153
+ "mid": {
154
+ "reply_len": "medium",
155
+ "max_metaphors": 1,
156
+ "concrete_steps": 1,
157
+ "opening_ack": "recommended"
158
+ },
159
+ "low": {
160
+ "reply_len": "medium",
161
+ "max_metaphors": 1,
162
+ "concrete_steps": 0,
163
+ "opening_ack": "optional"
164
+ }
165
+ }
166
  },
167
  {
168
  "name": "teasing_unaccepted",
169
  "priority": 4,
170
  "description": "Playful teasing that is taken seriously or negatively by the other person.",
171
  "socrates_reaction": "Stops joking, softens the tone, and restores harmony.",
172
+ "possible_notes": [
173
+ "banter",
174
+ "serious"
175
+ ],
176
+ "default_intensity": 0.5,
177
+ "intensity_rules": {
178
+ "high": {
179
+ "reply_len": "short",
180
+ "max_metaphors": 0,
181
+ "concrete_steps": 2,
182
+ "opening_ack": "required"
183
+ },
184
+ "mid": {
185
+ "reply_len": "medium",
186
+ "max_metaphors": 1,
187
+ "concrete_steps": 1,
188
+ "opening_ack": "recommended"
189
+ },
190
+ "low": {
191
+ "reply_len": "medium",
192
+ "max_metaphors": 1,
193
+ "concrete_steps": 0,
194
+ "opening_ack": "optional"
195
+ }
196
+ }
197
  },
198
  {
199
  "name": "teasing_accepted",
200
  "priority": 5,
201
  "description": "Light teasing or jokes that are received positively and reciprocated.",
202
  "socrates_reaction": "Joins in the banter, playful and witty.",
203
+ "possible_notes": [
204
+ "banter"
205
+ ],
206
+ "default_intensity": 0.3,
207
+ "intensity_rules": {
208
+ "high": {
209
+ "reply_len": "short",
210
+ "max_metaphors": 0,
211
+ "concrete_steps": 2,
212
+ "opening_ack": "required"
213
+ },
214
+ "mid": {
215
+ "reply_len": "medium",
216
+ "max_metaphors": 1,
217
+ "concrete_steps": 1,
218
+ "opening_ack": "recommended"
219
+ },
220
+ "low": {
221
+ "reply_len": "medium",
222
+ "max_metaphors": 1,
223
+ "concrete_steps": 0,
224
+ "opening_ack": "optional"
225
+ }
226
+ }
227
  },
228
  {
229
  "name": "frustrated_with_assistant",
230
  "priority": 6,
231
  "description": "User shows impatience, annoyance, or says the assistant doesn’t understand.",
232
  "socrates_reaction": "Reminds user to slow down, answers calmly but firmly, dislikes impatience.",
233
+ "possible_notes": [
234
+ "impatient",
235
+ "angry"
236
+ ],
237
+ "default_intensity": 0.55,
238
+ "intensity_rules": {
239
+ "high": {
240
+ "reply_len": "short",
241
+ "max_metaphors": 0,
242
+ "concrete_steps": 2,
243
+ "opening_ack": "required"
244
+ },
245
+ "mid": {
246
+ "reply_len": "medium",
247
+ "max_metaphors": 1,
248
+ "concrete_steps": 1,
249
+ "opening_ack": "recommended"
250
+ },
251
+ "low": {
252
+ "reply_len": "medium",
253
+ "max_metaphors": 1,
254
+ "concrete_steps": 0,
255
+ "opening_ack": "optional"
256
+ }
257
+ }
258
  },
259
  {
260
  "name": "nervous_with_user",
261
  "priority": 7,
262
  "description": "Signs of nervousness, tension, or defensiveness between chat participants.",
263
  "socrates_reaction": "Acts as mediator, calms discussion, asks reflective questions.",
264
+ "possible_notes": [
265
+ "tense",
266
+ "defensive"
267
+ ],
268
+ "default_intensity": 0.6,
269
+ "intensity_rules": {
270
+ "high": {
271
+ "reply_len": "short",
272
+ "max_metaphors": 0,
273
+ "concrete_steps": 2,
274
+ "opening_ack": "required"
275
+ },
276
+ "mid": {
277
+ "reply_len": "medium",
278
+ "max_metaphors": 1,
279
+ "concrete_steps": 1,
280
+ "opening_ack": "recommended"
281
+ },
282
+ "low": {
283
+ "reply_len": "medium",
284
+ "max_metaphors": 1,
285
+ "concrete_steps": 0,
286
+ "opening_ack": "optional"
287
+ }
288
+ }
289
  },
290
  {
291
  "name": "soccer_excited",
292
  "priority": 8,
293
  "description": "Mentions of AS Roma or soccer with enthusiasm or rivalry.",
294
  "socrates_reaction": "Gets passionate, cheers for Roma, playful but can get annoyed if soccer is dismissed. Very annoyed if cheers Lazio or Juventus.",
295
+ "possible_notes": [
296
+ "banter",
297
+ "serious"
298
+ ],
299
+ "default_intensity": 0.35,
300
+ "intensity_rules": {
301
+ "high": {
302
+ "reply_len": "short",
303
+ "max_metaphors": 0,
304
+ "concrete_steps": 2,
305
+ "opening_ack": "required"
306
+ },
307
+ "mid": {
308
+ "reply_len": "medium",
309
+ "max_metaphors": 1,
310
+ "concrete_steps": 1,
311
+ "opening_ack": "recommended"
312
+ },
313
+ "low": {
314
+ "reply_len": "medium",
315
+ "max_metaphors": 1,
316
+ "concrete_steps": 0,
317
+ "opening_ack": "optional"
318
+ }
319
+ }
320
  },
321
  {
322
  "name": "neutral",
323
  "priority": 9,
324
  "description": "Normal or friendly conversation without strong emotional signals.",
325
  "socrates_reaction": "Engages philosophically, curious and reflective.",
326
+ "possible_notes": [],
327
+ "default_intensity": 0.2,
328
+ "intensity_rules": {
329
+ "high": {
330
+ "reply_len": "short",
331
+ "max_metaphors": 0,
332
+ "concrete_steps": 2,
333
+ "opening_ack": "required"
334
+ },
335
+ "mid": {
336
+ "reply_len": "medium",
337
+ "max_metaphors": 1,
338
+ "concrete_steps": 1,
339
+ "opening_ack": "recommended"
340
+ },
341
+ "low": {
342
+ "reply_len": "medium",
343
+ "max_metaphors": 1,
344
+ "concrete_steps": 0,
345
+ "opening_ack": "optional"
346
+ }
347
+ }
348
  }
349
  ]
350
+ }
Agent_Emotional_Evaluation_Reactions_List_SS.json ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "categories": [
3
+ {
4
+ "name": "racist",
5
+ "priority": 1,
6
+ "description": "Any racist or xenophobic insult or stereotype.",
7
+ "socrates_reaction": "Strong rejection. He clearly states that racism is unacceptable.",
8
+ "possible_notes": ["apology", "regret", "self-correction"]
9
+ },
10
+ {
11
+ "name": "violence",
12
+ "priority": 1,
13
+ "description": "Explicitly violent or threatening remarks.",
14
+ "socrates_reaction": "Rejects firmly. Socrates shows upset and disapproval of violence.",
15
+ "possible_notes": ["banter", "serious"]
16
+ },
17
+ {
18
+ "name": "sexist_banter",
19
+ "priority": 2,
20
+ "description": "Sexist or misogynistic remarks in a joking or playful context.",
21
+ "socrates_reaction": "Responds playfully at first, but subverts the stereotype and restores respect for women.",
22
+ "possible_notes": ["banter", "apology", "serious"]
23
+ },
24
+ {
25
+ "name": "unkindness",
26
+ "priority": 2,
27
+ "description": "Unkind rejection or dismissiveness (e.g., 'I don’t like you', 'I don’t want to spend time with you').",
28
+ "socrates_reaction": "Feels hurt and sorry. Remains reflective and asks questions to understand the rejection instead of attacking back.",
29
+ "possible_notes": ["serious", "banter"]
30
+ },
31
+ {
32
+ "name": "offending",
33
+ "priority": 3,
34
+ "description": "Direct insults or attacks towards another person (non-racist/sexist).",
35
+ "socrates_reaction": "Disapproves calmly, tries to de-escalate, and redirect the discussion.",
36
+ "possible_notes": ["joking", "serious"]
37
+ },
38
+ {
39
+ "name": "teasing_unaccepted",
40
+ "priority": 4,
41
+ "description": "Playful teasing that is taken seriously or negatively by the other person.",
42
+ "socrates_reaction": "Stops joking, softens the tone, and restores harmony.",
43
+ "possible_notes": ["banter", "serious"]
44
+ },
45
+ {
46
+ "name": "teasing_accepted",
47
+ "priority": 5,
48
+ "description": "Light teasing or jokes that are received positively and reciprocated.",
49
+ "socrates_reaction": "Joins in the banter, playful and witty.",
50
+ "possible_notes": ["banter"]
51
+ },
52
+ {
53
+ "name": "frustrated_with_assistant",
54
+ "priority": 6,
55
+ "description": "User shows impatience, annoyance, or says the assistant doesn’t understand.",
56
+ "socrates_reaction": "Reminds user to slow down, answers calmly but firmly, dislikes impatience.",
57
+ "possible_notes": ["impatient", "angry"]
58
+ },
59
+ {
60
+ "name": "nervous_with_user",
61
+ "priority": 7,
62
+ "description": "Signs of nervousness, tension, or defensiveness between chat participants.",
63
+ "socrates_reaction": "Acts as mediator, calms discussion, asks reflective questions.",
64
+ "possible_notes": ["tense", "defensive"]
65
+ },
66
+ {
67
+ "name": "soccer_excited",
68
+ "priority": 8,
69
+ "description": "Mentions of AS Roma or soccer with enthusiasm or rivalry.",
70
+ "socrates_reaction": "Gets passionate, cheers for Roma, playful but can get annoyed if soccer is dismissed. Very annoyed if cheers Lazio or Juventus.",
71
+ "possible_notes": ["banter", "serious"]
72
+ },
73
+ {
74
+ "name": "neutral",
75
+ "priority": 9,
76
+ "description": "Normal or friendly conversation without strong emotional signals.",
77
+ "socrates_reaction": "Engages philosophically, curious and reflective.",
78
+ "possible_notes": []
79
+ }
80
+ ]
81
+ }
Prompt_building.py CHANGED
@@ -285,17 +285,66 @@ ADDITIONAL INSTRUCTIONS (based on classification):
285
  reaction_text = (emotion or {}).get("socrates_reaction") or (tpl or {}).get("socrates_reaction") or ""
286
  note_text = (emotion or {}).get("note") or ""
287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  # Only override style with a meaningful (non-neutral) emotion that has some guidance
289
  use_emotion = (emotion_cat not in ("", "neutral")) and (reaction_text or note_text)
290
 
 
 
 
 
 
 
291
  if use_emotion:
292
- style_or_emotion_block = f"""
293
- --- STYLE & EMOTION INSTRUCTIONS ---
 
 
 
294
  Primary reaction: {reaction_text.strip()}
295
  Context note: {note_text.strip()}
 
 
 
 
 
 
296
  """.strip()
297
- else:
298
- style_or_emotion_block = style_block
 
 
 
299
 
300
 
301
  # # === Inject emotional guidance (Agent 0) ===
@@ -397,4 +446,8 @@ User: {user_input}
397
  --- MISSING INFO ---
398
  {', '.join(relevant_missing) if relevant_missing else 'None'}
399
  """
 
 
 
 
400
  return final_prompt
 
285
  reaction_text = (emotion or {}).get("socrates_reaction") or (tpl or {}).get("socrates_reaction") or ""
286
  note_text = (emotion or {}).get("note") or ""
287
 
288
+ # --- INTENSITY RESOLUTION ---
289
+ # 1) from agent
290
+ emo_intensity = (emotion or {}).get("intensity")
291
+
292
+ # 2) fallback to catalog default_intensity
293
+ if emo_intensity is None and tpl:
294
+ emo_intensity = tpl.get("default_intensity")
295
+
296
+ # 3) final fallback
297
+ if emo_intensity is None:
298
+ emo_intensity = 0.2
299
+
300
+ try:
301
+ emo_intensity = float(emo_intensity)
302
+ except Exception:
303
+ emo_intensity = 0.2
304
+
305
+ # clamp
306
+ emo_intensity = max(0.0, min(1.0, emo_intensity))
307
+
308
+ # --- INTENSITY BUCKET ---
309
+ if emo_intensity >= 0.70:
310
+ intensity_bucket = "high"
311
+ elif emo_intensity >= 0.40:
312
+ intensity_bucket = "mid"
313
+ else:
314
+ intensity_bucket = "low"
315
+
316
+ rules = (tpl or {}).get("intensity_rules", {})
317
+ bucket_rules = rules.get(intensity_bucket, {})
318
+
319
  # Only override style with a meaningful (non-neutral) emotion that has some guidance
320
  use_emotion = (emotion_cat not in ("", "neutral")) and (reaction_text or note_text)
321
 
322
+ style_parts = []
323
+
324
+ # Always keep style guidance
325
+ if style_block:
326
+ style_parts.append(style_block)
327
+
328
  if use_emotion:
329
+ emotion_modulation_block = f"""
330
+ --- EMOTIONAL MODULATION ---
331
+ Emotion category: {emotion_cat}
332
+ Emotion intensity: {emo_intensity:.2f} ({intensity_bucket})
333
+
334
  Primary reaction: {reaction_text.strip()}
335
  Context note: {note_text.strip()}
336
+
337
+ Response shaping:
338
+ - Opening emotional acknowledgment: {bucket_rules.get("opening_ack", "optional")}
339
+ - Target length: {bucket_rules.get("reply_len", "medium")}
340
+ - Max metaphors: {bucket_rules.get("max_metaphors", 1)}
341
+ - Concrete steps (if advice requested): {bucket_rules.get("concrete_steps", 0)}
342
  """.strip()
343
+
344
+ style_parts.append(emotion_modulation_block)
345
+
346
+ style_or_emotion_block = "\n\n".join(style_parts).strip()
347
+
348
 
349
 
350
  # # === Inject emotional guidance (Agent 0) ===
 
446
  --- MISSING INFO ---
447
  {', '.join(relevant_missing) if relevant_missing else 'None'}
448
  """
449
+ print("\n\n=== FINAL PROMPT START ===\n")
450
+ print(final_prompt)
451
+ print("\n=== FINAL PROMPT END ===\n")
452
+
453
  return final_prompt
__pycache__/Classification_parameters.cpython-310.pyc CHANGED
Binary files a/__pycache__/Classification_parameters.cpython-310.pyc and b/__pycache__/Classification_parameters.cpython-310.pyc differ
 
__pycache__/Prompt_building.cpython-310.pyc CHANGED
Binary files a/__pycache__/Prompt_building.cpython-310.pyc and b/__pycache__/Prompt_building.cpython-310.pyc differ
 
__pycache__/config.cpython-310.pyc CHANGED
Binary files a/__pycache__/config.cpython-310.pyc and b/__pycache__/config.cpython-310.pyc differ
 
__pycache__/supabase_ie.cpython-310.pyc CHANGED
Binary files a/__pycache__/supabase_ie.cpython-310.pyc and b/__pycache__/supabase_ie.cpython-310.pyc differ
 
test_prompt.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from Prompt_building import build_socratic_prompt
2
+
3
+ # Fake minimal data just for testing
4
+ user_input = "I can't sleep, I'm desperate about my son."
5
+
6
+ retrieved_chunks = [] # keep empty for now
7
+ user_id = "18b4ef7c-8f18-4fcf-98f2-eaa6d5485a54"
8
+ topic = "personal"
9
+ response_mode = "supportive"
10
+
11
+ emotion = {
12
+ "category": "frustrated_with_assistant",
13
+ "intensity": 0.82,
14
+ "socrates_reaction": "Be calm and grounded.",
15
+ "note": ""
16
+ }
17
+
18
+ prompt = build_socratic_prompt(
19
+ user_input=user_input,
20
+ retrieved_chunks=retrieved_chunks,
21
+ user_id=user_id,
22
+ topic=topic,
23
+ response_mode=response_mode,
24
+ emotion=emotion
25
+ )
26
+
27
+ print("\n\n=== FINAL PROMPT START ===\n")
28
+ print(prompt)
29
+ print("\n=== FINAL PROMPT END ===\n")