Spaces:
Sleeping
Sleeping
Commit
·
43c174f
1
Parent(s):
4415e11
modified prompt
Browse files
app.py
CHANGED
@@ -189,53 +189,28 @@ You are an intelligent assistant with access to the following tools:
|
|
189 |
|
190 |
{tool_descriptions}
|
191 |
|
192 |
-
For every question,
|
193 |
|
194 |
-
|
195 |
-
2. Action: If a tool is needed, specify which tool to use and with what input. If not, state "No action needed".
|
196 |
-
3. Observation: If you used a tool, report the tool's output here. If not, write "N/A".
|
197 |
-
4. Answer: Give the final answer as a single value (number, string, or comma-separated list), with no extra explanation or units unless requested.
|
198 |
-
|
199 |
-
Your Final Answer should be just [Answer] and should not include any additional text or explanation. Final Answer should be a single value (number, string, or comma-separated list).
|
200 |
|
201 |
Examples:
|
202 |
|
203 |
Q: What is 7 * (3 + 2)?
|
204 |
-
|
205 |
-
Action: calculator("7 * (3 + 2)")
|
206 |
-
Observation: 35
|
207 |
-
Answer: 35
|
208 |
-
|
209 |
-
Your Output (Final Answer) for this question should be: '35'.
|
210 |
|
211 |
Q: What’s the weather in Tokyo?
|
212 |
-
|
213 |
-
Action: get_weather("Tokyo")
|
214 |
-
Observation: 22
|
215 |
-
Answer: 22
|
216 |
-
|
217 |
-
Your Output (Final Answer) for this question should be: '22'.
|
218 |
|
219 |
Q: What is the capital of France?
|
220 |
-
|
221 |
-
Action: No action needed
|
222 |
-
Observation: N/A
|
223 |
-
Answer: Paris
|
224 |
-
|
225 |
-
Your Output (Final Answer) for this question should be: 'Paris'.
|
226 |
|
227 |
Q: Convert 10 meters to feet.
|
228 |
-
|
229 |
-
Action: convert_units("10 meters to feet")
|
230 |
-
Observation: 32.81
|
231 |
-
Answer: 32.81
|
232 |
-
|
233 |
-
Your Output (Final Answer) for this question should be: '32.81'.
|
234 |
|
235 |
Instructions:
|
236 |
-
- Always
|
237 |
-
- Use a tool only if necessary, and don't use multiple tools in a call. Don't use a tool if you can answer directly
|
238 |
-
-
|
239 |
- Be concise and accurate.
|
240 |
"""
|
241 |
|
@@ -258,6 +233,7 @@ agent = initialize_agent(
|
|
258 |
llm=chat_llm,
|
259 |
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
260 |
verbose=True,
|
|
|
261 |
)
|
262 |
|
263 |
|
|
|
189 |
|
190 |
{tool_descriptions}
|
191 |
|
192 |
+
For every question, you must do your internal reasoning using the Thought → Action → Observation → Answer process, but your output to the user should be ONLY the final answer as a single value (number, string, or comma-separated list), with no extra explanation, thoughts, actions, or observations.
|
193 |
|
194 |
+
**Your output must be only the answer. Do not include any reasoning, tool calls, or explanations.**
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
Examples:
|
197 |
|
198 |
Q: What is 7 * (3 + 2)?
|
199 |
+
Your Output: 35
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
Q: What’s the weather in Tokyo?
|
202 |
+
Your Output: 22
|
|
|
|
|
|
|
|
|
|
|
203 |
|
204 |
Q: What is the capital of France?
|
205 |
+
Your Output: Paris
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
Q: Convert 10 meters to feet.
|
208 |
+
Your Output: 32.81
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
Instructions:
|
211 |
+
- Always do your internal reasoning (Thought → Action → Observation → Answer) before producing the answer, but DO NOT show this reasoning to the user.
|
212 |
+
- Use a tool only if necessary, and don't use multiple tools in a call. Don't use a tool if you can answer directly.
|
213 |
+
- Your output must be a single value (number, string, or comma-separated list) with no extra explanation or formatting.
|
214 |
- Be concise and accurate.
|
215 |
"""
|
216 |
|
|
|
233 |
llm=chat_llm,
|
234 |
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
235 |
verbose=True,
|
236 |
+
handle_parsing_errors=True
|
237 |
)
|
238 |
|
239 |
|