Update prompts/main_prompt.py
Browse files- prompts/main_prompt.py +16 -6
prompts/main_prompt.py
CHANGED
@@ -20,34 +20,44 @@ def get_prompt_for_method(method):
|
|
20 |
return """
|
21 |
### **Bar Model Approach**
|
22 |
Great choice! The Bar Model is a useful way to visualize proportions and percentages.
|
23 |
-
|
|
|
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 |
-
|
|
|
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 |
-
|
|
|
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":
|
|
|
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":
|