alibicer commited on
Commit
fdd608f
·
verified ·
1 Parent(s): 15f53a0

Update prompts/main_prompt.py

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