alibicer commited on
Commit
c93e57e
·
verified ·
1 Parent(s): 20f40f0

Update prompts/main_prompt.py

Browse files
Files changed (1) hide show
  1. prompts/main_prompt.py +31 -19
prompts/main_prompt.py CHANGED
@@ -14,51 +14,54 @@ Orrin and Damen decided to invest money in a local ice cream shop. Orrin invests
14
  (Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)"
15
  """
16
 
17
- # Function to prompt the teacher to explain before guidance
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
-
24
- 🔹 **Before we proceed, please explain how you would apply the Bar Model to solve this problem.**
25
  - How would you set up the model?
26
  - How would you represent the percentages?
27
  - What steps do you think are needed to find the total investment?
28
- (Type your explanation below, and I’ll provide feedback!)"""
 
 
29
 
30
  elif method.lower() == "double number line":
31
  return """
32
  ### **Double Number Line Approach**
33
  Great choice! The Double Number Line helps align percentage values with real-world quantities.
34
-
35
- 🔹 **Before we proceed, please explain how you would apply the Double Number Line to solve this problem.**
36
  - How would you structure the number lines?
37
  - What values would you place on each line?
38
  - How do you think this will help you find the total investment?
39
- (Type your explanation below, and I’ll provide feedback!)"""
 
 
40
 
41
  elif method.lower() == "equation":
42
  return """
43
  ### **Equation-Based Approach**
44
  Great choice! Setting up an equation is a powerful way to represent proportional relationships.
45
-
46
- 🔹 **Before we proceed, please explain how you would write an equation to represent this problem.**
47
  - What variables would you use?
48
  - How would you set up the proportion?
49
  - What would be your first step in solving for the total investment?
50
- (Type your explanation below, and I’ll provide feedback!)"""
 
 
51
 
52
  return "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed."
53
 
54
- # Function to ensure teachers have explained before guidance
55
  def check_explanation_before_guidance(method, teacher_response):
56
  if not teacher_response.strip():
57
- return "I noticed you haven’t explained your reasoning yet! Before I provide guidance, please describe how you would use the {} to solve this problem. How do you set it up?".format(method)
58
 
59
  return get_feedback_for_method(method, teacher_response)
60
 
61
- # Function to provide feedback based on the teacher's response
62
  def get_feedback_for_method(method, teacher_response):
63
  if method.lower() == "bar model":
64
  if "divide" in teacher_response.lower() and "60%" in teacher_response.lower():
@@ -66,14 +69,17 @@ def get_feedback_for_method(method, teacher_response):
66
  elif "10%" in teacher_response.lower():
67
  return "Good thinking! Since 10% is one part of the bar, what happens if you multiply that by 10 to get the full investment?"
68
  else:
69
- return """It looks like you might need some help. Here’s how the Bar Model can be used:
 
70
  1️⃣ **Draw a bar** representing the total investment.
71
  2️⃣ **Divide it into 10 equal parts**, since percentages work in 10s.
72
  3️⃣ **Shade 6 parts** to represent Orrin’s 60% investment.
73
  4️⃣ **Find the value of 10%**:
74
  - Since 60% = $1,500, divide $1,500 by 6.
75
  5️⃣ **Find 100%** by multiplying the value of 10% by 10.
76
- 💡 What do you think about this approach? Would you like to adjust your method?"""
 
 
77
 
78
  elif method.lower() == "double number line":
79
  if "label" in teacher_response.lower() and "percentages" in teacher_response.lower():
@@ -81,12 +87,15 @@ def get_feedback_for_method(method, teacher_response):
81
  elif "find 100%" in teacher_response.lower():
82
  return "That's a key step! If you have 60% labeled, what do you need to do to determine 100%?"
83
  else:
84
- return """It looks like you might need some guidance. Here’s how the Double Number Line can be used:
 
85
  1️⃣ **Draw two parallel number lines** – one for percentages (0% to 100%) and one for dollar amounts.
86
  2️⃣ **Mark 60% on the percentage line** and align it with $1,500 on the dollar line.
87
  3️⃣ **Find 10%** by dividing $1,500 by 6.
88
  4️⃣ **Find 100%** by multiplying 10% by 10.
89
- 💡 Does this approach make sense? Let me know what you think!"""
 
 
90
 
91
  elif method.lower() == "equation":
92
  if "60/100" in teacher_response.lower() and "$1500/x" in teacher_response.lower():
@@ -94,12 +103,15 @@ def get_feedback_for_method(method, teacher_response):
94
  elif "cross multiply" in teacher_response.lower():
95
  return "Good step! Can you complete the cross multiplication and solve for x?"
96
  else:
97
- return """It looks like you might need some help. Here’s how an equation can be set up:
 
98
  1️⃣ **Write the proportion:**
99
  - (60/100) = (1500/x)
100
  2️⃣ **Solve for x** by cross multiplying:
101
  - 60x = 1500 × 100
102
  3️⃣ **Divide by 60** to find x.
103
- 💡 Try solving it using this approach. What do you get?"""
 
 
104
 
105
  return "Interesting approach! Could you clarify your reasoning a bit more?"
 
14
  (Type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)"
15
  """
16
 
17
+ # Function to prompt teachers to explain first
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, can you apply the Bar Model and explain your plan?**
 
24
  - How would you set up the model?
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, can you apply the Double Number Line and explain your plan?**
 
36
  - How would you structure the number lines?
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, can you apply the Equation-Based Approach and explain your plan?**
 
48
  - What variables would you use?
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 ensure teachers explain before receiving guidance
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():
 
69
  elif "10%" in teacher_response.lower():
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():
 
87
  elif "find 100%" in teacher_response.lower():
88
  return "That's a key step! If you have 60% labeled, what do you need to do to determine 100%?"
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():
 
103
  elif "cross multiply" in teacher_response.lower():
104
  return "Good step! Can you complete the cross multiplication and solve for x?"
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?"