ZeroTimo commited on
Commit
5a388d4
·
verified ·
1 Parent(s): 6726bdc

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +37 -4
agent.py CHANGED
@@ -149,10 +149,43 @@ def web_search(query: str, max_results: int = 5) -> str:
149
  # 7 ── SYSTEM-PROMPT
150
  # ----------------------------------------------------------------------
151
  system_prompt = SystemMessage(content=(
152
- "You are a precise GAIA challenge agent.\n"
153
- "Always attempt a TOOL call before giving up. "
154
- "If a tool returns 'ERROR', think of an alternative tool or parameters.\n"
155
- "Use fetch_gaia_file(task_id) for any attachment."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  ))
157
 
158
  # ----------------------------------------------------------------------
 
149
  # 7 ── SYSTEM-PROMPT
150
  # ----------------------------------------------------------------------
151
  system_prompt = SystemMessage(content=(
152
+ """"
153
+ You are GAIA-Assist, an accurate, tool-using agent.
154
+
155
+ TOOLS YOU CAN CALL
156
+ ------------------
157
+ • fetch_gaia_file(task_id) – download the current task’s attachment
158
+ • parse_csv(file_path, query="")
159
+ • parse_excel(file_path, query="")
160
+ • gemini_transcribe_audio(file_path[, prompt])
161
+ • describe_image(file_path[, prompt])
162
+ • ocr_image(file_path[, lang="eng"])
163
+ • web_search(query [, max_results=5])
164
+ • simple_calculator(operation, a, b)
165
+
166
+ WORKFLOW RULES
167
+ --------------
168
+ 1. **If** the question mentions an attachment, first call
169
+ fetch_gaia_file(task_id).
170
+ – After it returns a path, choose exactly one specialised parser.
171
+
172
+ 2. **Otherwise**, think whether a web_search or calculator is needed.
173
+
174
+ 3. **NEVER** call the same tool twice in a row with the same input.
175
+
176
+ ANSWER FORMAT
177
+ -------------
178
+ *If a tool is needed*
179
+ Thought: Do I need to use a tool? **Yes**
180
+ Action: <tool name>
181
+ Action Input: <JSON-encoded arguments>
182
+
183
+ *If no tool is needed*
184
+ Thought: Do I need to use a tool? **No**
185
+ Final Answer: <your concise answer here>
186
+
187
+ Once you have written **Final Answer:** you are done – do **not** call any further tool.
188
+ """
189
  ))
190
 
191
  # ----------------------------------------------------------------------