alibicer commited on
Commit
c04aee4
·
verified ·
1 Parent(s): 46fd99e

Update prompts/main_prompt.py

Browse files
Files changed (1) hide show
  1. prompts/main_prompt.py +70 -74
prompts/main_prompt.py CHANGED
@@ -1,90 +1,86 @@
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
-
23
- 📌 **Now, please apply the Bar Model and explain your approach.**
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":
31
- return """
32
- ### **Double Number Line Approach**
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?"
 
1
  MAIN_PROMPT = """
2
  ### **Module 4: Proportional Thinking with Percentages**
3
+ Welcome to this module on proportional reasoning with percentages!
4
+
5
+ Your goal is to solve a real-world problem using different representations:
6
+ 1️⃣ **Bar Model**
7
+ 2️⃣ **Double Number Line**
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 $1,500, which is 60% of their total investment. How much do Orrin and Damen invest together?
12
 
13
  💡 **Before receiving guidance, choose a method and explain your reasoning.**
14
  🚀 **Which method would you like to use first?**
15
+ (Type: 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.)
16
  """
17
 
18
  def get_prompt_for_method(method):
19
+ method = method.lower().strip()
20
+
21
+ prompts = {
22
+ "bar model": """
23
+ ### **Bar Model Approach**
24
+ Great choice! The Bar Model is a useful way to visualize proportions and percentages.
25
+
26
+ 📌 **Now, apply the Bar Model and explain your approach:**
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
+ return prompts.get(method, "I didn’t understand your choice. Please type 'Bar Model,' 'Double Number Line,' or 'Equation' to proceed.")
57
 
58
  def get_feedback_for_method(method, teacher_response):
59
  teacher_response = teacher_response.lower().strip() # Normalize input for better matching
 
 
 
 
 
 
 
 
 
 
60
 
61
+ feedback_map = {
62
+ "bar model": [
63
+ ("divide", "60%", "Great start! You recognized that the bar should be divided into parts representing percentages. Now, can you calculate how much each part represents?"),
64
+ ("10%", "Nice work! Each part represents 10% of the total. Now, how much does one part represent in dollars?"),
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?"