Spaces:
Sleeping
Sleeping
Update prompts/main_prompt.py
Browse files1 unmodified line2345671 unmodified line91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606110 unmodified lines7273747576777879808182838485868788891 unmodified line# Step-by-step promptsPROMPTS = ["Which representations have you already used to show the relationship between time and distance?\n""- Bar Model\n""- Double Number Line\n"1 unmodified line"- Graph\n\n""If you haven’t used all of them, let’s go through each one step by step.","Have you created a **bar model** to represent Jessica’s travel?\n""- If not, try drawing a bar to represent **2 hours = 90 miles**.\n""- Can you divide it into equal segments to show **1 hour = 45 miles**?\n""- How would you extend the bar to **3 hours**?\n""- Can you split **1 hour** into halves to show **½ hour = 22.5 miles**?\n\n""✅ Does your bar model correctly show **½, 1, 2, and 3 hours**?","Have you created a **double number line** for time and distance?\n""- If not, try drawing two parallel lines:\n"" - One for **time (hours)**\n"" - One for **distance (miles)**\n""- Can you correctly place these points?\n"" - **0 hours → 0 miles**\n"" - **½ hour → 22.5 miles**\n"" - **1 hour → 45 miles**\n"" - **2 hours → 90 miles**\n"" - **3 hours → 135 miles**\n""- Are the distances evenly spaced?\n\n""✅ Does your number line show **a proportional relationship**?","Have you created a **ratio table**?\n""- If not, try filling in this table:\n\n""| Time (hours) | Distance (miles) |\n""|-------------|-----------------|\n""| 0.5 | 22.5 |\n""| 1 | 45 |\n""| 2 | 90 |\n""| 3 | 135 |\n\n""- Can you find a pattern in the table?\n""- What would be the distance for **4 hours**?\n\n""✅ Does your table clearly show a **proportional pattern**?","Have you created a **graph** to represent this relationship?\n""- If not, try plotting these points:\n"" - (0, 0)\n"" - (0.5, 22.5)\n"" - (1, 45)\n"" - (2, 90)\n"" - (3, 135)\n""- Can you draw a straight line through them?\n""- What does the slope of the line tell you about Jessica’s driving rate?\n\n""✅ Does your graph correctly show a **linear relationship**?","Final Reflection:\n""- Which representation helped you understand the relationship best? Why?\n""- How do these representations show the **same proportional relationship** in different ways?\n""- Can you apply this method to another real-world proportional relationship?"]# State tracking function10 unmodified linesstate = gr.State(value="0") # Tracks the user's progresschatbot = gr.Chatbot(label="AI Guide", height=300)user_input = gr.Textbox(label="Your Response (optional)", placeholder="Type here or click 'Next' to continue...")next_btn = gr.Button("Next Step ➡️")def update_chat(user_response, history, state):"""Updates chat history and progresses to the next step"""history.append(("You:", user_response if user_response else ""))next_message, new_state = guide_user(state)history.append(("AI:", next_message))return history, new_statenext_btn.click(update_chat, [user_input, chatbot, state], [chatbot, state])app.launch()1 unmodified line23456789101112131415161718191 unmodified line2122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410 unmodified lines1151161171181191201211221231241251261271281291301311321 unmodified line# Step-by-step promptsPROMPTS = [# Task Introduction"## Task: Representing Jessica’s Driving Distance 🚗\n""Jessica is driving at a constant speed. She travels **90 miles in 2 hours**.\n\n""### Your Goal:\n""Represent the relationship between **time and distance** using different mathematical models:\n""✅ Bar Model\n""✅ Double Number Line\n""✅ Ratio Table\n""✅ Graph\n\n""Let’s go through each representation step by step!",# Step 1: Identifying Current Representation"Which representations have you already used to show the relationship between time and distance?\n""- Bar Model\n""- Double Number Line\n"1 unmodified line"- Graph\n\n""If you haven’t used all of them, let’s go through each one step by step.",# Step 2: Bar Model"### Step 1: Bar Model Representation 📊\n""Have you created a **bar model** to represent Jessica’s travel?\n\n""**If not, follow these steps:**\n""1️⃣ Draw a **long bar** to represent **2 hours of driving**, labeling it **90 miles**.\n""2️⃣ Divide the bar into **two equal parts** to show **1 hour = 45 miles**.\n""3️⃣ Extend the bar to **3 hours** by adding another **45-mile segment**.\n""4️⃣ Divide **one 1-hour segment in half** to show **½ hour = 22.5 miles**.\n\n""✅ Does your bar model correctly show **½, 1, 2, and 3 hours**?",# Step 3: Double Number Line"### Step 2: Double Number Line Representation 📏\n""Have you created a **double number line** for time and distance?\n\n""**If not, follow these steps:**\n""1️⃣ Draw **two parallel number lines**:\n"" - The **top line** represents **time (hours)**.\n"" - The **bottom line** represents **distance (miles)**.\n""2️⃣ Mark these key points:\n"" - **0 hours → 0 miles**\n"" - **½ hour → 22.5 miles**\n"" - **1 hour → 45 miles**\n"" - **2 hours → 90 miles**\n"" - **3 hours → 135 miles**\n""3️⃣ Ensure the distances are evenly spaced.\n\n""✅ Does your number line show a **proportional relationship**?",# Step 4: Ratio Table"### Step 3: Ratio Table Representation 📋\n""Have you created a **ratio table**?\n\n""**If not, follow these steps:**\n""1️⃣ Fill in the table below:\n\n""| Time (hours) | Distance (miles) |\n""|-------------|-----------------|\n""| 0.5 | 22.5 |\n""| 1 | 45 |\n""| 2 | 90 |\n""| 3 | 135 |\n\n""2️⃣ Look for patterns.\n""3️⃣ What would be the distance for **4 hours**?\n\n""✅ Does your table clearly show a **proportional pattern**?",# Step 5: Graph"### Step 4: Graph Representation 📈\n""Have you created a **graph** to represent this relationship?\n\n""**If not, follow these steps:**\n""1️⃣ Draw a **coordinate plane**:\n"" - **x-axis → time (hours)**\n"" - **y-axis → distance (miles)**\n""2️⃣ Plot these points:\n"" - (0, 0)\n"" - (0.5, 22.5)\n"" - (1, 45)\n"" - (2, 90)\n"" - (3, 135)\n""3️⃣ Draw a straight line through these points.\n""4️⃣ What does the **slope of the line** tell you about Jessica’s driving rate?\n\n""✅ Does your graph correctly show a **linear relationship**?",# Step 6: Final Reflection & Posing Questions"### Final Reflection 💭\n""Great job! Now, take a moment to reflect:\n""1️⃣ Which representation helped you understand the relationship best? Why?\n""2️⃣ How do these representations show the **same proportional relationship** in different ways?\n""3️⃣ Can you apply this method to another real-world proportional relationship?\n\n""### New Challenge 🌟\n""Imagine Jessica increases her speed by **10 miles per hour**. How would this affect the bar model, number line, ratio table, and graph?\n\n""Try adjusting your models to reflect this change!",# Summary of Objectives & Common Core Standards"### Summary of Objectives 🎯\n""- You explored **four ways** to represent proportional relationships: Bar Model, Double Number Line, Ratio Table, and Graph.\n""- You understood how **time and distance** relate at a constant rate.\n""- You analyzed how different models show the **same mathematical pattern**.\n\n""### Common Core Math Standards 🏆\n""- **6.RP.A.1** - Understand the concept of a ratio.\n""- **6.RP.A.3a** - Use ratio reasoning to solve real-world problems.\n""- **7.RP.A.2** - Recognize proportional relationships.\n\n""✅ **Congratulations! You’ve completed this module.** 🚀"]# State tracking function10 unmodified linesstate = gr.State(value="0") # Tracks the user's progresschatbot = gr.Chatbot(label="AI Guide", height=300, type="messages") # Fixed deprecation warninguser_input = gr.Textbox(label="Your Response (optional)", placeholder="Type here or click 'Next' to continue...")next_btn = gr.Button("Next Step ➡️")def update_chat(user_response, history, state):"""Updates chat history and progresses to the next step"""history.append({"role": "user", "content": user_response if user_response else ""})next_message, new_state = guide_user(state)history.append({"role": "assistant", "content": next_message})return history, new_statenext_btn.click(update_chat, [user_input, chatbot, state], [chatbot, state])app.launch()
prompts/main_prompt.py+81-38