Update README.md
Browse files
README.md
CHANGED
@@ -60,9 +60,9 @@ llm = LLM(model=model_id, max_model_len=16384)
|
|
60 |
|
61 |
# Example problem and solution
|
62 |
problem = "Solve for x: 2x + 3 = 7"
|
63 |
-
prefix = "Step 1: Subtract 3 from both sides: 2x = 4\nStep 2: Divide by 2: x =
|
64 |
|
65 |
-
# Format the prompt
|
66 |
prompt = f"""You are given a math problem and a proposed step-by-step solution:
|
67 |
|
68 |
[Math Problem]
|
@@ -78,7 +78,7 @@ Review and critique each step in the proposed solution to determine whether each
|
|
78 |
|
79 |
prompt = tokenizer.apply_chat_template([
|
80 |
{'role': "user", "content": prompt}
|
81 |
-
], tokenize=False, add_generation_prompt=True)
|
82 |
|
83 |
# Set sampling parameters
|
84 |
sampling_params = SamplingParams(
|
@@ -92,23 +92,34 @@ outputs = llm.generate(prompt, sampling_params)
|
|
92 |
verification_cot = outputs[0].outputs[0].text
|
93 |
|
94 |
print(verification_cot)
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
-
|
100 |
|
101 |
-
|
102 |
|
103 |
-
|
104 |
|
105 |
-
|
106 |
|
107 |
-
|
108 |
|
109 |
-
|
110 |
-
#
|
111 |
-
## Step 2: The step is to divide both sides by 2, resulting in x = 2. This is the correct operation to solve for x. The step is \boxed{correct}
|
112 |
|
113 |
-
|
114 |
-
|
|
|
|
|
|
60 |
|
61 |
# Example problem and solution
|
62 |
problem = "Solve for x: 2x + 3 = 7"
|
63 |
+
prefix = "Step 1: Subtract 3 from both sides: 2x = 4\nStep 2: Divide by 2: x = 1"
|
64 |
|
65 |
+
# Format the prompt
|
66 |
prompt = f"""You are given a math problem and a proposed step-by-step solution:
|
67 |
|
68 |
[Math Problem]
|
|
|
78 |
|
79 |
prompt = tokenizer.apply_chat_template([
|
80 |
{'role': "user", "content": prompt}
|
81 |
+
], tokenize=False, add_generation_prompt=True) + "\nLet's verify step by step:"
|
82 |
|
83 |
# Set sampling parameters
|
84 |
sampling_params = SamplingParams(
|
|
|
92 |
verification_cot = outputs[0].outputs[0].text
|
93 |
|
94 |
print(verification_cot)
|
95 |
+
"""
|
96 |
+
Step 1: Subtract 3 from both sides: 2x = 4
|
97 |
+
|
98 |
+
Critique: Starting with the equation 2x + 3 = 7, subtracting 3 from both sides is a correct operation to isolate the term with the variable. So, 2x + 3 - 3 = 7 - 3, which simplifies
|
99 |
+
to 2x = 4. This step seems correct.
|
100 |
+
|
101 |
+
Step 2: Divide by 2: x = 1
|
102 |
+
|
103 |
+
Critique: Now, to solve for x, we need to divide both sides of the equation by 2. So, 2x / 2 = 4 / 2, which simplifies to x = 2. Wait a minute, the solution says x = 1, but accordin
|
104 |
+
g to this calculation, it should be x = 2. This seems incorrect.
|
105 |
+
|
106 |
+
Therefore, the first step is correct, but the second step has an error.
|
107 |
+
|
108 |
+
**Final Output:**
|
109 |
|
110 |
+
Let's verify step by step:
|
111 |
|
112 |
+
Step 1: Subtract 3 from both sides: 2x = 4
|
113 |
|
114 |
+
Critique: This step is correct. Subtracting 3 from both sides of the equation 2x + 3 = 7 properly isolates the term with the variable, resulting in 2x = 4.
|
115 |
|
116 |
+
Step 1 is \boxed{correct}
|
117 |
|
118 |
+
Step 2: Divide by 2: x = 1
|
119 |
|
120 |
+
Critique: This step is incorrect. Dividing both sides of the equation 2x = 4 by 2 should yield x = 2, not x = 1.
|
|
|
|
|
121 |
|
122 |
+
Step 2 is \boxed{incorrect}
|
123 |
+
</think>
|
124 |
+
Is the solution correct? No
|
125 |
+
"""
|