Update prompts/main_prompt.py
Browse files- prompts/main_prompt.py +38 -30
prompts/main_prompt.py
CHANGED
|
@@ -9,16 +9,11 @@ Your goal is to solve a real-world problem using different representations:
|
|
| 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 |
-
|
| 13 |
-
✅ **Step 1:** Choose a method.
|
| 14 |
-
✅ **Step 2:** **Explain your reasoning before receiving guidance.**
|
| 15 |
-
✅ **Step 3:** AI will provide **feedback on your explanation** before offering hints or solutions.
|
| 16 |
-
|
| 17 |
🚀 **Which method would you like to use first?**
|
| 18 |
-
(Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)
|
| 19 |
"""
|
| 20 |
|
| 21 |
-
# Function to handle method selection and ensure AI first asks for teacher input
|
| 22 |
def get_prompt_for_method(method):
|
| 23 |
if method.lower() == "bar model":
|
| 24 |
return """
|
|
@@ -29,7 +24,7 @@ Great choice! The Bar Model is a useful way to visualize proportions and percent
|
|
| 29 |
- How would you represent the total investment in the bar model?
|
| 30 |
- How would you use it to find the unknown amount?
|
| 31 |
|
| 32 |
-
✏️ **Go ahead and describe your approach first. I will provide feedback after hearing your reasoning.
|
| 33 |
"""
|
| 34 |
|
| 35 |
elif method.lower() == "double number line":
|
|
@@ -38,45 +33,58 @@ Great choice! The Bar Model is a useful way to visualize proportions and percent
|
|
| 38 |
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
| 39 |
|
| 40 |
📌 **Now, please apply the Double Number Line and explain your approach.**
|
| 41 |
-
-
|
| 42 |
-
- How would you
|
| 43 |
|
| 44 |
-
✏️ **
|
| 45 |
"""
|
| 46 |
|
| 47 |
elif method.lower() == "equation":
|
| 48 |
return """
|
| 49 |
### **Equation-Based Approach**
|
| 50 |
-
Great choice! Setting up an equation is a powerful way to
|
| 51 |
|
| 52 |
-
📌 **Now, please apply the Equation
|
| 53 |
-
-
|
| 54 |
-
-
|
| 55 |
|
| 56 |
-
✏️ **
|
| 57 |
"""
|
| 58 |
|
| 59 |
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
|
| 60 |
|
| 61 |
|
| 62 |
-
# Function to ensure AI first asks for an explanation before offering guidance
|
| 63 |
def get_feedback_for_method(method, teacher_response):
|
| 64 |
-
|
| 65 |
-
return "🛑 **Before receiving guidance, please explain your thought process.** How are you approaching this problem using the selected method?"
|
| 66 |
|
| 67 |
if method.lower() == "bar model":
|
| 68 |
-
if "divide" in teacher_response
|
| 69 |
-
return "
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
elif method.lower() == "equation":
|
| 78 |
-
if "60/100" in teacher_response
|
| 79 |
-
return "
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
return "Interesting approach! Could you clarify your reasoning a bit more?"
|
|
|
|
| 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 |
def get_prompt_for_method(method):
|
| 18 |
if method.lower() == "bar model":
|
| 19 |
return """
|
|
|
|
| 24 |
- How would you represent the total investment in the bar model?
|
| 25 |
- How would you use it to find the unknown amount?
|
| 26 |
|
| 27 |
+
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
| 28 |
"""
|
| 29 |
|
| 30 |
elif method.lower() == "double number line":
|
|
|
|
| 33 |
Great choice! The Double Number Line helps align percentage values with real-world quantities.
|
| 34 |
|
| 35 |
📌 **Now, please apply the Double Number Line and explain your approach.**
|
| 36 |
+
- How would you structure the number lines?
|
| 37 |
+
- How would you align percentages with dollar values?
|
| 38 |
|
| 39 |
+
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
| 40 |
"""
|
| 41 |
|
| 42 |
elif method.lower() == "equation":
|
| 43 |
return """
|
| 44 |
### **Equation-Based Approach**
|
| 45 |
+
Great choice! Setting up an equation is a powerful way to represent proportional relationships.
|
| 46 |
|
| 47 |
+
📌 **Now, please apply the Equation method and explain your approach.**
|
| 48 |
+
- How would you write an equation to represent this problem?
|
| 49 |
+
- What steps would you take to solve for the unknown?
|
| 50 |
|
| 51 |
+
✏️ **Go ahead and describe your approach first.** I will provide feedback after hearing your reasoning.
|
| 52 |
"""
|
| 53 |
|
| 54 |
return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
|
| 55 |
|
| 56 |
|
|
|
|
| 57 |
def get_feedback_for_method(method, teacher_response):
|
| 58 |
+
teacher_response = teacher_response.lower().strip() # Normalize input for better matching
|
|
|
|
| 59 |
|
| 60 |
if method.lower() == "bar model":
|
| 61 |
+
if "divide" in teacher_response and "60%" in teacher_response:
|
| 62 |
+
return "Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?"
|
| 63 |
+
elif "10%" in teacher_response or "one part is 10%" in teacher_response:
|
| 64 |
+
return "Nice work! Each part represents 10% of the total. Now, how much does one part represent in dollars?"
|
| 65 |
+
elif "250" in teacher_response:
|
| 66 |
+
return "Correct! Each part is worth $250. Now, how can you use this to determine the total investment?"
|
| 67 |
+
else:
|
| 68 |
+
return "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?"
|
| 69 |
|
| 70 |
+
elif method.lower() == "double number line":
|
| 71 |
+
if "label" in teacher_response and "percentages" in teacher_response:
|
| 72 |
+
return "Nice work! You’ve set up the number line correctly. Can you now align the percentage values with the corresponding dollar amounts?"
|
| 73 |
+
elif "10%" in teacher_response or "one part is 10%" in teacher_response:
|
| 74 |
+
return "Good thinking! Each section represents 10% of the total investment. Now, how much is 10% in dollars?"
|
| 75 |
+
elif "250" in teacher_response:
|
| 76 |
+
return "That's right! Each section is worth $250. Now, can you find the total investment?"
|
| 77 |
+
else:
|
| 78 |
+
return "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?"
|
| 79 |
+
|
| 80 |
elif method.lower() == "equation":
|
| 81 |
+
if "60/100" in teacher_response and "$1500/x" in teacher_response:
|
| 82 |
+
return "You're on the right track! Now, how can you solve for x in your equation?"
|
| 83 |
+
elif "cross multiply" in teacher_response:
|
| 84 |
+
return "Yes! Using cross multiplication will help. What do you get when solving for x?"
|
| 85 |
+
elif "2500" in teacher_response:
|
| 86 |
+
return "Great! The total investment is $2,500. Would you like to reflect on how the equation helped in solving this?"
|
| 87 |
+
else:
|
| 88 |
+
return "Try writing the proportion as (60/100) = (1500/x). What steps would you take to solve for x?"
|
| 89 |
|
| 90 |
return "Interesting approach! Could you clarify your reasoning a bit more?"
|