Spaces:
Sleeping
Sleeping
Update chain_problems.py
Browse files- chain_problems.py +11 -2
chain_problems.py
CHANGED
@@ -6,7 +6,7 @@ from models import chat_model
|
|
6 |
|
7 |
logger = logging.getLogger(__name__)
|
8 |
|
9 |
-
# Updated prompt template
|
10 |
problem_prompt_template = PromptTemplate(
|
11 |
input_variables=["responses", "internal_report"],
|
12 |
template=(
|
@@ -15,7 +15,16 @@ problem_prompt_template = PromptTemplate(
|
|
15 |
"You also have an internal analysis report:\n"
|
16 |
"{internal_report}\n\n"
|
17 |
"From these inputs, determine a 'problem severity percentage' for the user in the following areas: "
|
18 |
-
"stress_management, low_therapy, balanced_weight, restless_night, lack_of_motivation, gut_health, anxiety, burnout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
"Return your answer in JSON format with keys: stress_management, low_therapy, balanced_weight, restless_night, "
|
20 |
"lack_of_motivation, gut_health, anxiety, burnout.\n"
|
21 |
"Ensure severity percentages are numbers from 0 to 100.\n\n"
|
|
|
6 |
|
7 |
logger = logging.getLogger(__name__)
|
8 |
|
9 |
+
# Updated prompt template with guidance connecting themes to question responses
|
10 |
problem_prompt_template = PromptTemplate(
|
11 |
input_variables=["responses", "internal_report"],
|
12 |
template=(
|
|
|
15 |
"You also have an internal analysis report:\n"
|
16 |
"{internal_report}\n\n"
|
17 |
"From these inputs, determine a 'problem severity percentage' for the user in the following areas: "
|
18 |
+
"stress_management, low_therapy, balanced_weight, restless_night, lack_of_motivation, gut_health, anxiety, burnout.\n\n"
|
19 |
+
"Consider the following connections between the questions and these themes:\n"
|
20 |
+
"- stress_management is influenced by responses such as stress_level, stress_management, mood, mindfulness_frequency, and similar stress-related questions.\n"
|
21 |
+
"- low_therapy relates to aspects of the user's mindset, wellness_goals, personal_growth_reflection, and similar therapeutic indicators.\n"
|
22 |
+
"- balanced_weight depends on exercise, eating_habits, dietary_restrictions, activity_tracking, and other fitness/nutrition details.\n"
|
23 |
+
"- restless_night is linked to answers about sleep duration, bedtime_routine, uninterrupted_sleep, and other sleep quality indicators.\n"
|
24 |
+
"- lack_of_motivation correlates with mood, energy_rating, personal_growth_reflection, break_frequency, and similar motivation-related queries.\n"
|
25 |
+
"- gut_health is connected to eating_habits, dietary_restrictions, health_issues, and other digestive or nutritional feedback.\n"
|
26 |
+
"- anxiety is associated with responses about mood, stress_level, mindset, and related emotional well-being questions.\n"
|
27 |
+
"- burnout may be reflected in high stress_level, low energy_rating, lack_of_motivation, and related fatigue or overwhelm indicators.\n\n"
|
28 |
"Return your answer in JSON format with keys: stress_management, low_therapy, balanced_weight, restless_night, "
|
29 |
"lack_of_motivation, gut_health, anxiety, burnout.\n"
|
30 |
"Ensure severity percentages are numbers from 0 to 100.\n\n"
|