Update prompts/main_prompt.py
Browse files- prompts/main_prompt.py +42 -69
prompts/main_prompt.py
CHANGED
@@ -1,86 +1,59 @@
|
|
1 |
MAIN_PROMPT = """
|
2 |
### **Module 4: Proportional Thinking with Percentages**
|
3 |
-
Welcome to this module on proportional reasoning with percentages!
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
3️⃣ **Equation-Based Approach**
|
9 |
|
10 |
🚀 **Here’s the problem:**
|
11 |
-
Orrin and Damen decided to invest money in a local ice cream shop. Orrin invests
|
12 |
|
13 |
💡 **Before receiving guidance, choose a method and explain your reasoning.**
|
14 |
🚀 **Which method would you like to use first?**
|
15 |
-
(Type
|
16 |
"""
|
17 |
|
|
|
18 |
def get_prompt_for_method(method):
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
- How would you represent the total investment in the bar model?
|
28 |
-
- How would you use it to find the unknown amount?
|
29 |
-
|
30 |
-
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
31 |
-
""",
|
32 |
-
|
33 |
-
"double number line": """
|
34 |
-
### **Double Number Line Approach**
|
35 |
-
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
36 |
-
|
37 |
-
📌 **Now, apply the Double Number Line and explain your approach:**
|
38 |
-
- How would you structure the number lines?
|
39 |
-
- How would you align percentages with dollar values?
|
40 |
-
|
41 |
-
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
42 |
-
""",
|
43 |
-
|
44 |
-
"equation": """
|
45 |
-
### **Equation-Based Approach**
|
46 |
-
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
|
47 |
-
|
48 |
-
📌 **Now, apply the Equation method and explain your approach:**
|
49 |
-
- How would you write an equation to represent this problem?
|
50 |
-
- What steps would you take to solve for the unknown?
|
51 |
-
|
52 |
-
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
53 |
-
"""
|
54 |
-
}
|
55 |
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
|
|
58 |
def get_feedback_for_method(method, teacher_response):
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
"
|
63 |
-
|
64 |
-
|
65 |
-
("250", "Correct! Each part is worth $250. Now, how can you use this to determine the total investment?"),
|
66 |
-
("", "You're close! Remember, the bar represents the total investment. Try dividing it into 10 equal parts, with 6 parts representing Orrin’s 60%. What would one part represent in percentage and dollars?")
|
67 |
-
],
|
68 |
-
"double number line": [
|
69 |
-
("label", "percentages", "Nice work! You’ve set up the number line correctly. Can you now align the percentage values with the corresponding dollar amounts?"),
|
70 |
-
("10%", "Good thinking! Each section represents 10% of the total investment. Now, how much is 10% in dollars?"),
|
71 |
-
("250", "That's right! Each section is worth $250. Now, can you find the total investment?"),
|
72 |
-
("", "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?")
|
73 |
-
],
|
74 |
-
"equation": [
|
75 |
-
("60/100", "1500/x", "You're on the right track! Now, how can you solve for x in your equation?"),
|
76 |
-
("cross multiply", "Yes! Using cross multiplication will help. What do you get when solving for x?"),
|
77 |
-
("2500", "Great! The total investment is $2,500. Would you like to reflect on how the equation helped in solving this?"),
|
78 |
-
("", "Try writing the proportion as (60/100) = (1500/x). What steps would you take to solve for x?")
|
79 |
-
]
|
80 |
-
}
|
81 |
-
|
82 |
-
for keywords in feedback_map.get(method.lower(), []):
|
83 |
-
if all(word in teacher_response for word in keywords[:-1]):
|
84 |
-
return keywords[-1] # Return corresponding feedback
|
85 |
|
86 |
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 |
+
Before we go further, please **explain how you would apply the Bar Model to solve this problem.** How would you set up the model?
|
24 |
+
"""
|
25 |
|
26 |
+
elif method.lower() == "double number line":
|
27 |
+
return """
|
28 |
+
### **Double Number Line Approach**
|
29 |
+
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
30 |
+
Before we proceed, please **explain how you would apply the Double Number Line to solve this problem.** How would you structure the number lines?
|
31 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
elif method.lower() == "equation":
|
34 |
+
return """
|
35 |
+
### **Equation-Based Approach**
|
36 |
+
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
|
37 |
+
Before we proceed, please **explain how you would write an equation to represent this problem.** How would you set up the equation?
|
38 |
+
"""
|
39 |
+
|
40 |
+
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
|
41 |
|
42 |
+
# Function to provide feedback on teacher responses
|
43 |
def get_feedback_for_method(method, teacher_response):
|
44 |
+
if method.lower() == "bar model":
|
45 |
+
if "divide" in teacher_response.lower() and "60%" in teacher_response.lower():
|
46 |
+
return "Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?"
|
47 |
+
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?"
|
48 |
+
|
49 |
+
elif method.lower() == "double number line":
|
50 |
+
if "label" in teacher_response.lower() and "percentages" in teacher_response.lower():
|
51 |
+
return "Nice work! You’ve set up the number line correctly. Can you now align the percentage values with the corresponding dollar amounts?"
|
52 |
+
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?"
|
53 |
|
54 |
+
elif method.lower() == "equation":
|
55 |
+
if "60/100" in teacher_response.lower() and "$1500/x" in teacher_response.lower():
|
56 |
+
return "You're on the right track! Now, how can you solve for x in your equation?"
|
57 |
+
return "Try writing the proportion as (60/100) = (1500/x). What steps would you take to solve for x?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
return "Interesting approach! Could you clarify your reasoning a bit more?"
|