Update prompts/main_prompt.py
Browse files- prompts/main_prompt.py +22 -77
prompts/main_prompt.py
CHANGED
@@ -1,117 +1,62 @@
|
|
1 |
MAIN_PROMPT = """
|
2 |
### **Module 4: Proportional Thinking with Percentages**
|
3 |
-
"Welcome to this module on proportional reasoning with percentages!
|
4 |
-
Your goal is to solve a real-world problem using different representations:
|
5 |
-
1️⃣ **Bar Model**
|
6 |
-
2️⃣ **Double Number Line**
|
7 |
-
3️⃣ **Equation-Based Approach**
|
8 |
|
9 |
🚀 **Here’s the problem:**
|
10 |
-
Orrin and Damen decided to invest money in a local ice cream shop. Orrin invests $1,500, which is 60% of their total investment. How much do Orrin and Damen invest together?
|
11 |
|
12 |
-
💡 **Before receiving guidance, choose a method
|
13 |
🚀 **Which method would you like to use first?**
|
14 |
(Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)"
|
15 |
"""
|
16 |
|
17 |
-
# Function to prompt
|
18 |
def get_prompt_for_method(method):
|
19 |
if method.lower() == "bar model":
|
20 |
return """
|
21 |
### **Bar Model Approach**
|
22 |
Great choice! The Bar Model is a useful way to visualize proportions and percentages.
|
23 |
-
**Now,
|
24 |
-
|
25 |
-
- How would you represent the percentages?
|
26 |
-
- What steps do you think are needed to find the total investment?
|
27 |
-
|
28 |
-
🚀 **Explain your thinking first, and then I will provide feedback!**
|
29 |
"""
|
30 |
|
31 |
elif method.lower() == "double number line":
|
32 |
return """
|
33 |
### **Double Number Line Approach**
|
34 |
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
35 |
-
**Now,
|
36 |
-
|
37 |
-
- What values would you place on each line?
|
38 |
-
- How do you think this will help you find the total investment?
|
39 |
-
|
40 |
-
🚀 **Explain your thinking first, and then I will provide feedback!**
|
41 |
"""
|
42 |
|
43 |
elif method.lower() == "equation":
|
44 |
return """
|
45 |
### **Equation-Based Approach**
|
46 |
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
|
47 |
-
**Now,
|
48 |
-
|
49 |
-
- How would you set up the proportion?
|
50 |
-
- What would be your first step in solving for the total investment?
|
51 |
-
|
52 |
-
🚀 **Explain your thinking first, and then I will provide feedback!**
|
53 |
"""
|
54 |
|
55 |
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
|
56 |
|
57 |
-
# Function to
|
58 |
-
def check_explanation_before_guidance(method, teacher_response):
|
59 |
-
if not teacher_response.strip():
|
60 |
-
return f"I noticed you haven’t explained your reasoning yet! 🚀 Before I provide guidance, please apply the {method} and explain your plan."
|
61 |
-
|
62 |
-
return get_feedback_for_method(method, teacher_response)
|
63 |
-
|
64 |
-
# Function to provide feedback before guiding to correct solutions
|
65 |
def get_feedback_for_method(method, teacher_response):
|
66 |
if method.lower() == "bar model":
|
67 |
if "divide" in teacher_response.lower() and "60%" in teacher_response.lower():
|
68 |
return "Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?"
|
69 |
-
|
70 |
-
return "Good thinking! Since 10% is one part of the bar, what happens if you multiply that by 10 to get the full investment?"
|
71 |
-
else:
|
72 |
-
return """
|
73 |
-
🔹 It looks like you might need some help. Here’s how the Bar Model can be used:
|
74 |
-
1️⃣ **Draw a bar** representing the total investment.
|
75 |
-
2️⃣ **Divide it into 10 equal parts**, since percentages work in 10s.
|
76 |
-
3️⃣ **Shade 6 parts** to represent Orrin’s 60% investment.
|
77 |
-
4️⃣ **Find the value of 10%**:
|
78 |
-
- Since 60% = $1,500, divide $1,500 by 6.
|
79 |
-
5️⃣ **Find 100%** by multiplying the value of 10% by 10.
|
80 |
-
|
81 |
-
💡 What do you think about this approach? Would you like to adjust your method?
|
82 |
-
"""
|
83 |
|
84 |
elif method.lower() == "double number line":
|
85 |
if "label" in teacher_response.lower() and "percentages" in teacher_response.lower():
|
86 |
-
return "Nice work! You’ve set up the number line correctly.
|
87 |
-
|
88 |
-
|
89 |
-
else:
|
90 |
-
return """
|
91 |
-
🔹 It looks like you might need some guidance. Here’s how the Double Number Line can be used:
|
92 |
-
1️⃣ **Draw two parallel number lines** – one for percentages (0% to 100%) and one for dollar amounts.
|
93 |
-
2️⃣ **Mark 60% on the percentage line** and align it with $1,500 on the dollar line.
|
94 |
-
3️⃣ **Find 10%** by dividing $1,500 by 6.
|
95 |
-
4️⃣ **Find 100%** by multiplying 10% by 10.
|
96 |
-
|
97 |
-
💡 Does this approach make sense? Let me know what you think!
|
98 |
-
"""
|
99 |
-
|
100 |
elif method.lower() == "equation":
|
101 |
if "60/100" in teacher_response.lower() and "$1500/x" in teacher_response.lower():
|
102 |
-
return "You're on the right track! Now,
|
103 |
-
|
104 |
-
|
105 |
-
else:
|
106 |
-
return """
|
107 |
-
🔹 It looks like you might need some help. Here’s how an equation can be set up:
|
108 |
-
1️⃣ **Write the proportion:**
|
109 |
-
- (60/100) = (1500/x)
|
110 |
-
2️⃣ **Solve for x** by cross multiplying:
|
111 |
-
- 60x = 1500 × 100
|
112 |
-
3️⃣ **Divide by 60** to find x.
|
113 |
-
|
114 |
-
💡 Try solving it using this approach. What do you get?
|
115 |
-
"""
|
116 |
-
|
117 |
return "Interesting approach! Could you clarify your reasoning a bit more?"
|
|
|
1 |
MAIN_PROMPT = """
|
2 |
### **Module 4: Proportional Thinking with Percentages**
|
3 |
+
"Welcome to this module on proportional reasoning with percentages!
|
4 |
+
Your goal is to solve a real-world problem using different representations:
|
5 |
+
1️⃣ **Bar Model**
|
6 |
+
2️⃣ **Double Number Line**
|
7 |
+
3️⃣ **Equation-Based Approach**
|
8 |
|
9 |
🚀 **Here’s the problem:**
|
10 |
+
Orrin and Damen decided to invest money in a local ice cream shop. Orrin invests $1,500, which is 60% of their total investment. How much do Orrin and Damen invest together?
|
11 |
|
12 |
+
💡 **Before receiving guidance, choose a method AND explain your reasoning.**
|
13 |
🚀 **Which method would you like to use first?**
|
14 |
(Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)"
|
15 |
"""
|
16 |
|
17 |
+
# Function to prompt user based on chosen method
|
18 |
def get_prompt_for_method(method):
|
19 |
if method.lower() == "bar model":
|
20 |
return """
|
21 |
### **Bar Model Approach**
|
22 |
Great choice! The Bar Model is a useful way to visualize proportions and percentages.
|
23 |
+
💡 **Now, apply the Bar Model and explain your procedure. How would you use it to solve this problem?**
|
24 |
+
The AI will assist you after you describe your approach.
|
|
|
|
|
|
|
|
|
25 |
"""
|
26 |
|
27 |
elif method.lower() == "double number line":
|
28 |
return """
|
29 |
### **Double Number Line Approach**
|
30 |
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
31 |
+
💡 **Now, apply the Double Number Line and explain your procedure. How would you use it to solve this problem?**
|
32 |
+
The AI will assist you after you describe your approach.
|
|
|
|
|
|
|
|
|
33 |
"""
|
34 |
|
35 |
elif method.lower() == "equation":
|
36 |
return """
|
37 |
### **Equation-Based Approach**
|
38 |
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
|
39 |
+
💡 **Now, apply the equation method and explain your procedure. How would you set it up to solve this problem?**
|
40 |
+
The AI will assist you after you describe your approach.
|
|
|
|
|
|
|
|
|
41 |
"""
|
42 |
|
43 |
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
|
44 |
|
45 |
+
# Function to provide feedback on teacher responses
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
def get_feedback_for_method(method, teacher_response):
|
47 |
if method.lower() == "bar model":
|
48 |
if "divide" in teacher_response.lower() and "60%" in teacher_response.lower():
|
49 |
return "Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?"
|
50 |
+
return "It looks like you might need some help. Remember, the bar represents the total investment. Try dividing it into 10 equal parts, with 6 parts representing Orrin’s 60%. How much does one part represent?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
elif method.lower() == "double number line":
|
53 |
if "label" in teacher_response.lower() and "percentages" in teacher_response.lower():
|
54 |
+
return "Nice work! You’ve set up the number line correctly. Can you now align the percentage values with the corresponding dollar amounts?"
|
55 |
+
return "No worries! Try labeling your number line with 0%, 60%, and 100% on one side and the corresponding dollar amounts on the other. How do the values align?"
|
56 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
elif method.lower() == "equation":
|
58 |
if "60/100" in teacher_response.lower() and "$1500/x" in teacher_response.lower():
|
59 |
+
return "You're on the right track! Now, how can you solve for x in your equation?"
|
60 |
+
return "Try writing the proportion as (60/100) = (1500/x). What steps would you take to solve for x?"
|
61 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
return "Interesting approach! Could you clarify your reasoning a bit more?"
|