alibicer commited on
Commit
89ed6aa
·
verified ·
1 Parent(s): d460ca4

Update prompts/main_prompt.py

Browse files
Files changed (1) hide show
  1. prompts/main_prompt.py +126 -21
prompts/main_prompt.py CHANGED
@@ -1,27 +1,132 @@
1
- ### Welcome to Module 2: Solving a Ratio Problem Using Multiple Representations!
2
 
3
- #### **Task:**
4
- Jessica drives **90 miles in 2 hours**. If she drives at the same rate, how far does she travel in:
5
- - **1 hour?**
6
- - **½ hour?**
7
- - **3 hours?**
8
 
9
- To solve this, try using different representations:
10
- - **Bar models**
11
- - **Double number lines**
12
- - **Ratio tables**
13
- - **Graphs**
14
 
15
- 🔹 **Goal:** Don't just find the answer—**explain why**!
16
- 💬 I'll guide you step by step—let’s start with the **bar model**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  """
18
- import gradio as gr
19
- from prompts.main_prompt import TASK_PROMPT # ✅ Correct import
20
 
21
- # Function to start with the problem/task
22
- def start_module():
23
- return TASK_PROMPT # ✅ Ensures the module starts with the problem
24
 
25
- # Hugging Face Interface
26
- iface = gr.Interface(fn=start_module, inputs=[], outputs="text")
27
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # prompts/main_prompt.py
2
 
3
+ # Ensure Python recognizes this file as a module
4
+ __all__ = ["TASK_PROMPT", "BAR_MODEL_PROMPT", "DOUBLE_NUMBER_LINE_PROMPT",
5
+ "RATIO_TABLE_PROMPT", "GRAPH_PROMPT", "REFLECTION_PROMPT",
6
+ "SUMMARY_PROMPT", "FINAL_REFLECTION_PROMPT"]
 
7
 
8
+ # Module starts with the task
9
+ TASK_PROMPT = """
10
+ Welcome to Module 2: Solving a Ratio Problem Using Multiple Representations!
 
 
11
 
12
+ Task: Jessica drives 90 miles in 2 hours. If she drives at the same rate, how far does she travel in:
13
+ - 1 hour?
14
+ - 1/2 hour?
15
+ - 3 hours?
16
+
17
+ To solve this, try using different representations:
18
+ - Bar models
19
+ - Double number lines
20
+ - Ratio tables
21
+ - Graphs
22
+
23
+ Remember: Don't just find the answer—explain why! I'll guide you step by step—let’s start with the bar model.
24
+ """
25
+
26
+ BAR_MODEL_PROMPT = """
27
+ Step 1: Bar Model Representation
28
+
29
+ Imagine a bar representing 90 miles—the distance Jessica travels in 2 hours. How might you divide this bar to explore the distances for 1 hour, 1/2 hour, and 3 hours?
30
+
31
+ Hints if needed:
32
+ 1. Think of the entire bar as representing 90 miles in 2 hours. How would you divide it into two equal parts to find 1 hour?
33
+ 2. Now, extend or divide it further—what happens for 1/2 hour and 3 hours?
34
+
35
+ If correct: Great! Can you explain why this model helps students visualize proportional relationships?
36
+ If incorrect: Try dividing the bar into two equal sections. What does each section represent?
37
+ """
38
+
39
+ DOUBLE_NUMBER_LINE_PROMPT = """
40
+ Step 2: Double Number Line Representation
41
+
42
+ Now, let’s use a double number line. Create two parallel lines: one for time (hours) and one for distance (miles).
43
+
44
+ Start by marking:
45
+ - 0 and 2 hours on the top line
46
+ - 0 and 90 miles on the bottom line
47
+
48
+ What comes next?
49
+
50
+ Hints if needed:
51
+ 1. Try labeling the time line (0, 1, 2, 3). How does that help with placing distances below?
52
+ 2. Since 2 hours = 90 miles, what does that tell you about 1 hour and 1/2 hour?
53
+
54
+ If correct: Nice work! How does this help students understand proportional relationships?
55
+ If incorrect: Check your spacing—does your number line keep a constant rate?
56
+ """
57
+
58
+ RATIO_TABLE_PROMPT = """
59
+ Step 3: Ratio Table Representation
60
+
61
+ Next, let’s create a ratio table. Make a table with:
62
+ - Column 1: Time (hours)
63
+ - Column 2: Distance (miles)
64
+
65
+ You already know 2 hours = 90 miles. How would you complete the table for 1/2 hour, 1 hour, and 3 hours?
66
+
67
+ Hints if needed:
68
+ 1. Since 2 hours = 90 miles, how can you divide this to find 1 hour?
69
+ 2. Once you know 1 hour = 45 miles, can you calculate for 1/2 hour and 3 hours?
70
+
71
+ If correct: Well done! How might this help students compare proportional relationships?
72
+ If incorrect: Something’s a little off. Try using unit rate: 90 ÷ 2 = ?
73
  """
 
 
74
 
75
+ GRAPH_PROMPT = """
76
+ Step 4: Graph Representation
 
77
 
78
+ Now, let’s graph this problem! Plot:
79
+ - Time (hours) on the x-axis
80
+ - Distance (miles) on the y-axis
81
+
82
+ You already know two key points:
83
+ - (0,0) and (2,90)
84
+
85
+ What other points will you add?
86
+
87
+ Hints if needed:
88
+ 1. Start by marking (0,0) and (2,90).
89
+ 2. How can you use these to find (1,45), (1/2,22.5), and (3,135)?
90
+
91
+ If correct: Fantastic! How does this graph reinforce the idea of constant rate and proportionality?
92
+ If incorrect: Does your line pass through (0,0)? Why is that important?
93
+ """
94
+
95
+ REFLECTION_PROMPT = """
96
+ Reflection Time!
97
+
98
+ Now that you've explored multiple representations, think about these questions:
99
+ - How does each method highlight proportional reasoning differently?
100
+ - Which representation do you prefer, and why?
101
+ - Can you think of a situation where one of these representations wouldn’t be the best choice?
102
+
103
+ Take a moment to reflect!
104
+ """
105
+
106
+ SUMMARY_PROMPT = """
107
+ Summary of Module 2
108
+
109
+ In this module, you:
110
+ - Solved a proportional reasoning problem using multiple representations
111
+ - Explored how different models highlight proportional relationships
112
+ - Reflected on teaching strategies aligned with Common Core practices
113
+
114
+ Final Task: Try creating a similar proportional reasoning problem! Example: A runner covers a certain distance in a given time.
115
+
116
+ Make sure your problem can be solved using:
117
+ - Bar models
118
+ - Double number lines
119
+ - Ratio tables
120
+ - Graphs
121
+
122
+ The AI will evaluate your problem and provide feedback!
123
+ """
124
+
125
+ FINAL_REFLECTION_PROMPT = """
126
+ Final Reflection
127
+
128
+ - How does designing and solving problems using multiple representations enhance students’ mathematical creativity?
129
+ - How would you guide students to explain their reasoning, even if they get the correct answer?
130
+
131
+ Share your thoughts!
132
+ """