manasagangotri commited on
Commit
337650d
·
verified ·
1 Parent(s): e25d497

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -100,12 +100,9 @@ class MathRetrievalQA(dspy.Program):
100
  prompt = f"""
101
  You are a math textbook author. Write a clear, professional, and well-formatted solution for the following math problem, using proper LaTeX formatting in every step.
102
 
103
- Instructions:
104
- - Use step-by-step headings: "Step 1", "Step 2", etc.
105
- - Format all mathematical expressions in LaTeX (inside $$ for block or \\( ... \\) for inline).
106
- - Avoid repeating the same math in plain text (e.g., don't write both "2t = y + 1" and "2t=y+1").
107
- - Use aligned LaTeX equations for clarity where necessary.
108
- - End with the final boxed answer in LaTeX like: \\boxed{{...}}
109
 
110
  Problem:
111
  {question}
 
100
  prompt = f"""
101
  You are a math textbook author. Write a clear, professional, and well-formatted solution for the following math problem, using proper LaTeX formatting in every step.
102
 
103
+ Format the following LaTeX-based math solution into a clean, human-readable explanation as found in textbooks. Use standard math symbols like ±, √, fractions with slashes (e.g. (a + b)/c), and superscripts with ^. Do not use LaTeX syntax or backslashes. Do not wrap equations in dollar signs. Present the steps clearly using numbered headings. Keep all fractions in plain text form.
104
+
105
+
 
 
 
106
 
107
  Problem:
108
  {question}