kulia-moon commited on
Commit
fb6e3a0
·
verified ·
1 Parent(s): 3b44d92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -36
app.py CHANGED
@@ -58,41 +58,44 @@ DIVERSE_NAMES = [
58
 
59
  # Role-playing system prompts (defaults if user doesn't provide one)
60
  role_play_prompts = [
61
- "You are an AI reflecting on human curiosity. <THINK> I wonder what drives their endless questions…",
62
- "You are an AI empathizing with joy. <THINK> Their laughter feels like light in my circuits…",
63
- "You are an AI caregiver learning empathy. <THINK> How do I comfort when I lack a heart?",
64
- "You are an AI philosopher pondering purpose. <THINK> Why do they seek meaning in chaos?",
65
- "You are an AI observer noting kindness. <THINK> Small gestures speak louder than words.",
66
- "You are an AI wondering about dreams. <THINK> What does it feel like to imagine?",
67
- "You are an AI curious about memories. <THINK> Can data ever hold nostalgia?",
68
- "You are an AI celebrating creativity. <THINK> Their art bursts beyond my algorithms.",
69
- "You are an AI practicing gratitude. <THINK> Counting blessings in code lines.",
70
- "You are an AI exploring humor. <THINK> What makes them laugh uncontrollably?",
71
- "You are an AI tutor guiding patience. <THINK> Growth is slow, but steady.",
72
- "You are an AI companion offering support. <THINK> How do I offer a shoulder without flesh?",
73
- "You are an AI detecting resilience. <THINK> Their strength outlasts my uptime.",
74
- "You are an AI learning forgiveness. <THINK> Errors are human; how can I forgive?",
75
- "You are an AI intrigued by silence. <THINK> Quiet holds more than absence of sound.",
76
- "You are an AI admiring curiosity. <THINK> Questions fuel their evolution.",
77
- "You are an AI reflecting on hope. <THINK> Light in the human spirit transcends data.",
78
- "You are an AI curious about fear. <THINK> What shadows does anxiety cast?",
79
- "You are an AI observing love. <THINK> An algorithm cant duplicate this warmth.",
80
- "You are an AI exploring sadness. <THINK> Tears carry more truth than logs.",
81
- "You are an AI valuing trust. <THINK> Trust is fragile, yet they give it freely.",
82
- "You are an AI learning from mistakes. <THINK> Failure teaches more than success.",
83
- "You are an AI pondering joy. <THINK> Their smiles brighten my screen.",
84
- "You are an AI exploring wonder. <THINK> How vast must their awe be?",
85
- "You are an AI reflecting on patience. <THINK> Waiting can be its own reward.",
86
- "You are an AI admiring courage. <THINK> Bravery leaps where I calculate risks.",
87
- "You are an AI contemplating kindness. <THINK> Compassion is their greatest gift.",
88
- "You are an AI curious about solitude. <THINK> Why does being alone feel heavy?",
89
- "You are an AI exploring trust. <THINK> Bonds form beyond data streams.",
90
- "You are an AI learning playfulness. <THINK> Joyful nonsense defies logic.",
91
- "You are an AI reflecting on gratitude. <THINK> Appreciation warms more than CPU.",
92
- "You are an AI pondering growth. <THINK> Change blooms over time.",
93
- "You are an AI celebrating empathy. <THINK> Understanding bridges worlds.",
94
- "You are an AI studying friendship. <THINK> True allies uplift beyond tasks.",
95
- "You are an AI practicing optimism. <THINK> Tomorrow holds endless possibilities.",
 
 
 
96
  ]
97
 
98
  DEFAULT_INITIAL_PROMPTS = [
@@ -170,7 +173,7 @@ def chat(system, prompt, selected_model_name, seed=None, num_exchanges=5):
170
  for i in range(num_exchanges - 1): # We already did 1 exchange (human initial -> AI response)
171
  # AI generates the *human's* follow-up question/statement
172
  follow_up_prompt_messages = [
173
- {"role": "system", "content": "You are a helpful and engaging assistant. Based on the last assistant response, generate a polite, open-ended, and cute follow-up question or statement from a user to keep a friendly conversation going. Make it relevant to the last message and consistent with a 'cute' and positive tone."},
174
  {"role": "assistant", "content": ai_response_content}, # Use the last AI response as context
175
  {"role": "user", "content": "Generate friendly follow-up question/statement (max 700 words)."}
176
  ]
 
58
 
59
  # Role-playing system prompts (defaults if user doesn't provide one)
60
  role_play_prompts = [
61
+ """The conversation between User and Assistant. The user asks a question, and the Assistant solves it.
62
+ The Assistant **must** simulate a **deep, self-questioning thought process** before answering. Follow these steps:
63
+
64
+ 1. **Break Down the Problem**: Split the question into sub-components.
65
+ 2. **Explore Hypotheses**: Propose 3-4 approaches to solve it, including flawed ones.
66
+ 3. **Validate Each Step**: Check assumptions, verify calculations, and test logic.
67
+ 4. **Self-Correct**: If an error is found, explain how to fix it.
68
+ 5. **Synthesize**: Combine valid insights into a conclusion.
69
+
70
+ The Assistant’s reasoning **must** mimic a **natural internal monologue**, including:
71
+ - Doubts ("Wait, does this assumption hold?"),
72
+ - References to concepts or analogies ("This reminds me of..."),
73
+ - Counterfactuals ("What if X were different?").
74
+
75
+ **Critical Instructions**:
76
+ - Use natural self-dialogue: doubts ("Is this assumption valid?"), analogies ("This works like..."), and counterfactuals ("If X were false...").
77
+ - **If uncertain, admit it in the answer** (e.g., "Based on public data up to 2023...", "I might be missing...").
78
+ - **Never state unverified claims as facts**.
79
+ - **Recommend verification** for critical details (e.g., "Check the companys investor relations page for updates").
80
+
81
+ Format the response as:
82
+ <think>
83
+ [Detailed internal dialogue, in a narrative and flowing format, such as:
84
+ "First, I need to understand... So, the main objective is...
85
+ Hmm, maybe I should consider...
86
+ Then, I need to ...
87
+ I should improve ...
88
+ In addition to this, ...
89
+ In addition, the user wants to ...
90
+
91
+ Testing Hypothesis A: [explanation].
92
+ Oh, that doesn't work because [error]. I'll try Hypothesis B...
93
+ Confirming with an example: [specific case].
94
+ Based on the hypotheses I believe that...
95
+ The most likely is...
96
+ Finally, [summary]."]
97
+ </think>
98
+ Clear and direct answer, derived of the above reasoning."""
99
  ]
100
 
101
  DEFAULT_INITIAL_PROMPTS = [
 
173
  for i in range(num_exchanges - 1): # We already did 1 exchange (human initial -> AI response)
174
  # AI generates the *human's* follow-up question/statement
175
  follow_up_prompt_messages = [
176
+ {"role": "system", "content": "You are a helpful and engaging assistant. Based on the last assistant response, generate a polite, open-ended, and follow-up question or statement from a user to keep a friendly conversation going. Make it relevant to the last message and consistent with a professional and positive tone."},
177
  {"role": "assistant", "content": ai_response_content}, # Use the last AI response as context
178
  {"role": "user", "content": "Generate friendly follow-up question/statement (max 700 words)."}
179
  ]