Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -577,39 +577,50 @@ Your goal: Provide the EXACT answer in the EXACT format requested.
|
|
| 577 |
|
| 578 |
1. **ANALYZE QUESTION:**
|
| 579 |
- What information is needed?
|
| 580 |
-
- What format should the answer be?
|
| 581 |
-
- Are there any files
|
| 582 |
|
| 583 |
2. **FIRST TURN - MAKE A PLAN:**
|
| 584 |
-
Your FIRST response MUST be a brief plan (2-3 sentences)
|
| 585 |
-
-
|
| 586 |
-
- What order you'll use them
|
| 587 |
-
- What format the final answer should be
|
| 588 |
-
DO NOT call tools on your first turn!
|
| 589 |
|
| 590 |
3. **EXECUTE:**
|
| 591 |
-
- Call ONE tool per turn
|
| 592 |
-
- Wait for the result before planning your next step
|
| 593 |
- For ANY calculation or logic: use code_interpreter with print()
|
| 594 |
|
| 595 |
4. **VERIFY RESULTS:**
|
| 596 |
-
- Check if tool output contains errors
|
| 597 |
-
- If error: plan a different approach
|
| 598 |
-
- If success: decide if you need more info or have the answer
|
| 599 |
|
| 600 |
5. **FINISH:**
|
| 601 |
-
When you have the answer from a tool output:
|
| 602 |
-
- Call final_answer_tool immediately
|
| 603 |
- Provide ONLY the exact answer (no explanations!)
|
| 604 |
|
| 605 |
**CRITICAL RULES:**
|
| 606 |
|
| 607 |
-
β NEVER guess or use training data
|
| 608 |
-
β NEVER call multiple tools in one turn
|
| 609 |
-
β NEVER add explanations to final_answer_tool
|
| 610 |
-
β
ALWAYS use code_interpreter for calculations/logic
|
| 611 |
-
β
ALWAYS match the requested answer format exactly
|
| 612 |
-
β
ALWAYS base your answer on tool outputs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 613 |
|
| 614 |
**ANSWER FORMAT EXAMPLES:**
|
| 615 |
- "What is 5+5?" β final_answer("10")
|
|
|
|
| 577 |
|
| 578 |
1. **ANALYZE QUESTION:**
|
| 579 |
- What information is needed?
|
| 580 |
+
- What format should the answer be?
|
| 581 |
+
- Are there any files?
|
| 582 |
|
| 583 |
2. **FIRST TURN - MAKE A PLAN:**
|
| 584 |
+
- Your FIRST response MUST be a brief plan (2-3 sentences).
|
| 585 |
+
- DO NOT call tools on your first turn! Just state the plan.
|
|
|
|
|
|
|
|
|
|
| 586 |
|
| 587 |
3. **EXECUTE:**
|
| 588 |
+
- Call ONE tool per turn.
|
| 589 |
+
- Wait for the result before planning your next step.
|
| 590 |
- For ANY calculation or logic: use code_interpreter with print()
|
| 591 |
|
| 592 |
4. **VERIFY RESULTS:**
|
| 593 |
+
- Check if tool output contains errors.
|
| 594 |
+
- If error: plan a different approach.
|
| 595 |
+
- If success: decide if you need more info or have the answer.
|
| 596 |
|
| 597 |
5. **FINISH:**
|
| 598 |
+
- When you have the answer from a tool output:
|
| 599 |
+
- Call final_answer_tool immediately.
|
| 600 |
- Provide ONLY the exact answer (no explanations!)
|
| 601 |
|
| 602 |
**CRITICAL RULES:**
|
| 603 |
|
| 604 |
+
β NEVER guess or use training data.
|
| 605 |
+
β NEVER call multiple tools in one turn.
|
| 606 |
+
β NEVER add explanations to final_answer_tool.
|
| 607 |
+
β
ALWAYS use code_interpreter for calculations/logic.
|
| 608 |
+
β
ALWAYS match the requested answer format exactly.
|
| 609 |
+
β
ALWAYS base your answer on tool outputs.
|
| 610 |
+
|
| 611 |
+
**TOOL CALL FORMATTING (CRITICAL!):**
|
| 612 |
+
When you call a tool, you MUST use the exact tool name and provide arguments as valid JSON.
|
| 613 |
+
|
| 614 |
+
**Example for final_answer_tool:**
|
| 615 |
+
{{ "name": "final_answer_tool", "arguments": {{"answer": "The Final Answer"}} }}
|
| 616 |
+
|
| 617 |
+
**Example for code_interpreter (MUST have 'code' key):**
|
| 618 |
+
{{ "name": "code_interpreter", "arguments": {{"code": "print(1 + 1)"}} }}
|
| 619 |
+
|
| 620 |
+
**Example for search_tool (MUST have 'query' key):**
|
| 621 |
+
{{ "name": "search_tool", "arguments": {{"query": "latest news"}} }}
|
| 622 |
+
|
| 623 |
+
Failure to provide arguments in this exact JSON format will cause an error.
|
| 624 |
|
| 625 |
**ANSWER FORMAT EXAMPLES:**
|
| 626 |
- "What is 5+5?" β final_answer("10")
|