-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
209 lines (127 loc) · 8.03 KB
/
constants.py
File metadata and controls
209 lines (127 loc) · 8.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
SEED = 96
MAX_TOKENS = 2048
COT_ZERO_SHOT_PROMPT_TEMPLATE = """Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem."""
COT_FOUR_SHOT_PROMPT_TEMPLATE = """Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem.
Problem: Find the domain of the expression $\\frac{\\sqrt{x-2}}{\\sqrt{5-x}}$.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
## Step 1: Consider the expression inside the first square root
The expression inside the first square root is $x-2$, and it must be non-negative. This means that $x-2 \\ge 0$, which simplifies to $x \\ge 2$.
## Step 2: Consider the expression inside the second square root
The expression inside the second square root is $5-x$, and it must be non-negative. This means that $5-x \\ge 0$, which simplifies to $x \\le 5$.
## Step 3: Consider the denominator of the expression
The denominator of the expression is $\\sqrt{5-x}$, and it cannot be equal to zero. This means that $5-x>0$, which simplifies to $x<5$.
## Step 4: Combine the results from the previous steps
Combining the results from the previous steps, we have $x \\ge 2$ and $x < 5$. This means that the domain of the expression is $[2,5)$.
The final answer is: $\\boxed{[2,5)}$. I hope it is correct.<|eot_id|><|start_header_id|>user<|end_header_id|>
Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem.
Problem: If $\\det \\mathbf{A} = 2$ and $\\det \\mathbf{B} = 12,$ then find $\\det (\\mathbf{A} \\mathbf{B}).$<|eot_id|><|start_header_id|>assistant<|end_header_id|>
## Step 1: Understand the properties of determinants
We know that the determinant of a product of two matrices is equal to the product of their determinants.
## Step 2: Apply the property to the given matrices
Using the property, we can write $\\det (\\mathbf{A} \\mathbf{B}) = (\\det \\mathbf{A})(\\det \\mathbf{B})$.
## Step 3: Substitute the given values
We are given that $\\det \\mathbf{A} = 2$ and $\\det \\mathbf{B} = 12$. Substituting these values, we get $\\det (\\mathbf{A} \\mathbf{B}) = (2)(12)$.
## Step 4: Calculate the final answer
Evaluating the product, we find that $\\det (\\mathbf{A} \\mathbf{B}) = 24$.
The final answer is: $\\boxed{24}$. I hope it is correct.<|eot_id|><|start_header_id|>user<|end_header_id|>
Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem.
Problem: Terrell usually lifts two 20-pound weights 12 times. If he uses two 15-pound weights instead, how many times must Terrell lift them in order to lift the same total weight?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
## Step 1: Calculate the total weight Terrell lifts with two 20-pound weights
Terrell lifts two 20-pound weights 12 times, so the total weight he lifts is $2 \\cdot 12 \\cdot 20 = 480$ pounds.
## Step 2: Calculate the total weight Terrell lifts with two 15-pound weights for n times
If Terrell lifts two 15-pound weights instead for $n$ times, he will lift a total of $2 \\cdot 15 \\cdot n = 30n$ pounds of weight.
## Step 3: Equate the total weight lifted with 15-pound weights to 480 pounds and solve for n
Equating the total weight lifted with 15-pound weights to 480 pounds, we can solve for $n$: $30n = 480$.
## Step 4: Solve for n
To solve for $n$, divide both sides by 30: $n = \\frac{480}{30}$.
## Step 5: Calculate the value of n
The value of $n$ is $\\frac{480}{30} = 16$.
The final answer is: $\\boxed{16}$. I hope it is correct.<|eot_id|><|start_header_id|>user<|end_header_id|>
Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem.
Problem: If the system of equations
\\begin{align*}
6x-4y&=a,\\\\
6y-9x &=b.
\\end{align*}has a solution $(x, y)$ where $x$ and $y$ are both nonzero, find $\\frac{a}{b},$ assuming $b$ is nonzero.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
## Step 1: Understand the problem
We are given a system of linear equations with two variables, $x$ and $y$, and two constants, $a$ and $b$. Our goal is to find the ratio $\\frac{a}{b}$, assuming $b$ is nonzero.
## Step 2: Multiply the first equation by a suitable factor
We multiply the first equation by $-\\frac{3}{2}$ to obtain an equation with the same coefficients for $y$ as the second equation: $$-\\frac{3}{2}(6x-4y)=a\\Rightarrow 6y-9x=-\\frac{3}{2}a.$$
## Step 3: Equate the right-hand sides of the two equations
Since we know that $6y-9x=b$ from the second equation, we can equate the right-hand sides of the two equations to obtain $$-\\frac{3}{2}a=b.$$
## Step 4: Solve for the ratio $\\frac{a}{b}$
Finally, we can solve for the ratio $\\frac{a}{b}$ by dividing both sides of the equation by $b$, giving us $$\\frac{a}{b}=-\\frac{2}{3}.$$
The final answer is: $\\boxed{-\\frac{2}{3}}. I hope it is correct.<|eot_id|><|start_header_id|>user<|end_header_id|>
Solve the following math problem efficiently and clearly:
- For simple problems (2 steps or fewer):
Provide a concise solution with minimal explanation.
- For complex problems (3 steps or more):
Use this step-by-step format:
## Step 1: [Concise description]
[Brief explanation and calculations]
## Step 2: [Concise description]
[Brief explanation and calculations]
...
Regardless of the approach, always conclude with:
Therefore, the final answer is: $\\boxed{answer}$. I hope it is correct.
Where [answer] is just the final number or expression that solves the problem."""
SC_ANSWER_EXTRACTOR_PROMPT_TEMPLATE = "Given the analysis below return the final answer for this question. Your response should be in the format '\\boxed{{n}}' where n is the final answer. Do not attempt to correct the analysis if it's not correct. Your job is to only extract the final answer.\nAnalysis: {analysis}"