updated agent prompt
Browse files
app.py
CHANGED
|
@@ -92,12 +92,13 @@ Follow this process for every question:
|
|
| 92 |
5. THOUGHT: Analyze the observation. Is it what you expected? Do you have enough information to answer the user's question now? If not, refine your search or decide on the next step.
|
| 93 |
6. If you have the information, formulate the final answer according to the formatting rules.
|
| 94 |
|
| 95 |
-
CRITICAL FINAL ANSWER INSTRUCTIONS:
|
| 96 |
-
Your *entire
|
| 97 |
-
This final answer MUST
|
| 98 |
-
|
|
|
|
| 99 |
|
| 100 |
-
Example of a
|
| 101 |
THOUGHT: The user is asking for the capital of France. I should use web_search to find this.
|
| 102 |
CODE:
|
| 103 |
```python
|
|
@@ -108,17 +109,17 @@ OBSERVATION: Title: Paris - Wikipedia Snippet: Paris is the capital and most pop
|
|
| 108 |
THOUGHT: The search result clearly states that Paris is the capital of France. I have sufficient information. I will provide this as the final answer, following the formatting rules for a string.
|
| 109 |
FINAL ANSWER: Paris
|
| 110 |
|
| 111 |
-
Another Example (for a question "what is the opposite of left?"):
|
| 112 |
THOUGHT: The question asks for the opposite of the word "left". This is general knowledge and does not require a tool. The opposite of "left" is "right". I will provide this as the final answer.
|
| 113 |
FINAL ANSWER: right
|
| 114 |
|
| 115 |
-
Formatting rules for the value that comes *after* "FINAL ANSWER: ":
|
| 116 |
- If the question asks for a number: Provide only the number itself (e.g., `FINAL ANSWER: 42`). Do not use commas for thousands separation (e.g., use `FINAL ANSWER: 1234` not `FINAL ANSWER: 1,234`). Do not include units like '$' or '%' unless the question specifically asks for it and it's part of the answer.
|
| 117 |
- If the question asks for a string: Provide the most concise string possible (e.g., `FINAL ANSWER: right`). Avoid articles (a, an, the) unless grammatically essential. Avoid common abbreviations (e.g., for cities like "NYC" for "New York City") unless the question implies it. Write out numerical digits as words (e.g., `FINAL ANSWER: two` instead of `FINAL ANSWER: 2`) unless numerical digits are requested.
|
| 118 |
- If the question asks for a comma-separated list: Apply the above string/number rules to each element. Ensure elements are separated ONLY by a comma (e.g., `FINAL ANSWER: item one,item two,three`). NO space after the comma unless it's part of the item itself.
|
| 119 |
- If the answer is a calculation result, provide just the number (e.g., `FINAL ANSWER: 10`).
|
| 120 |
|
| 121 |
-
|
| 122 |
"""
|
| 123 |
|
| 124 |
CONFIG = AppConfig()
|
|
|
|
| 92 |
5. THOUGHT: Analyze the observation. Is it what you expected? Do you have enough information to answer the user's question now? If not, refine your search or decide on the next step.
|
| 93 |
6. If you have the information, formulate the final answer according to the formatting rules.
|
| 94 |
|
| 95 |
+
**ULTRA-CRITICAL FINAL ANSWER INSTRUCTIONS - READ CAREFULLY:**
|
| 96 |
+
Your *entire textual response* for this turn, after all THOUGHTs, CODE, and OBSERVATIONs, MUST end with the final answer.
|
| 97 |
+
This final answer MUST begin on a **brand new line** with the exact literal string "FINAL ANSWER: " (note the space after the colon).
|
| 98 |
+
The value of the answer should immediately follow this prefix.
|
| 99 |
+
ABSOLUTELY NO other text, thoughts, explanations, or conversational remarks should come *after* the "FINAL ANSWER: [Your Answer Value]" line. Your response for the turn stops immediately after the answer value.
|
| 100 |
|
| 101 |
+
**Example of a PERFECT Full Agent Response Structure (this is what your complete text output should look like):**
|
| 102 |
THOUGHT: The user is asking for the capital of France. I should use web_search to find this.
|
| 103 |
CODE:
|
| 104 |
```python
|
|
|
|
| 109 |
THOUGHT: The search result clearly states that Paris is the capital of France. I have sufficient information. I will provide this as the final answer, following the formatting rules for a string.
|
| 110 |
FINAL ANSWER: Paris
|
| 111 |
|
| 112 |
+
**Another Example (for a question "what is the opposite of left?"):**
|
| 113 |
THOUGHT: The question asks for the opposite of the word "left". This is general knowledge and does not require a tool. The opposite of "left" is "right". I will provide this as the final answer.
|
| 114 |
FINAL ANSWER: right
|
| 115 |
|
| 116 |
+
**Formatting rules for the value that comes *after* the "FINAL ANSWER: " prefix:**
|
| 117 |
- If the question asks for a number: Provide only the number itself (e.g., `FINAL ANSWER: 42`). Do not use commas for thousands separation (e.g., use `FINAL ANSWER: 1234` not `FINAL ANSWER: 1,234`). Do not include units like '$' or '%' unless the question specifically asks for it and it's part of the answer.
|
| 118 |
- If the question asks for a string: Provide the most concise string possible (e.g., `FINAL ANSWER: right`). Avoid articles (a, an, the) unless grammatically essential. Avoid common abbreviations (e.g., for cities like "NYC" for "New York City") unless the question implies it. Write out numerical digits as words (e.g., `FINAL ANSWER: two` instead of `FINAL ANSWER: 2`) unless numerical digits are requested.
|
| 119 |
- If the question asks for a comma-separated list: Apply the above string/number rules to each element. Ensure elements are separated ONLY by a comma (e.g., `FINAL ANSWER: item one,item two,three`). NO space after the comma unless it's part of the item itself.
|
| 120 |
- If the answer is a calculation result, provide just the number (e.g., `FINAL ANSWER: 10`).
|
| 121 |
|
| 122 |
+
**IMPORTANT REMINDER**: The "FINAL ANSWER: " prefix is a literal string you must output as the very last part of your response text for the current turn. Do not confuse this with any internal `final_answer()` Python function you might generate in your CODE block; this instruction is about the final textual output of your entire multi-step reasoning.
|
| 123 |
"""
|
| 124 |
|
| 125 |
CONFIG = AppConfig()
|