mirjam-m commited on
Commit
a76fad9
·
1 Parent(s): 7abe77b
Files changed (1) hide show
  1. app.py +22 -2
app.py CHANGED
@@ -34,8 +34,28 @@ YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma sepa
34
  If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
35
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
36
  If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  Question: {question}
38
- """
39
  messages = [HumanMessage(content=prompt)]
40
  response = self.model.invoke(messages)
41
 
@@ -104,7 +124,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
104
  results_log = []
105
  answers_payload = []
106
  print(f"Running agent on {len(questions_data)} questions...")
107
- for item in questions_data:
108
  task_id = item.get("task_id")
109
  question_text = item.get("question")
110
  if not task_id or question_text is None:
 
34
  If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
35
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
36
  If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
37
+
38
+ Use the following process to answer the question:
39
+ 1. Analyze and Plan:
40
+ Extract ALL Parameters Identify search terms, URLs, code, file paths
41
+ Plan Steps: Break down the problem into logical steps required to reach the final answer
42
+ 2. Delegate Strategically
43
+ For each step, choose the best Agent Tool. Call the tool with a single string argument `request` containing ALL information the specialist needs
44
+ Available Tools: `GoogleSearchAgent`, CodeExecutorAgent
45
+ - For general web searches, **strongly prefer** `GoogleSearchAgent` (`request`='search query') for potentially higher quality results"
46
+ - For standard Python execution, **strongly prefer** `BuiltinCodeExecutorAgent` (`request`='python code') for reliability."
47
+
48
+ 3. Synthesize Results:
49
+ Combine the information obtained from the specialist agents
50
+ Perform any final reasoning or calculation steps needed based on the collected data
51
+ Double-check that the synthesized answer directly addresses the original question and respects ALL specific formatting or content details requested (e.g., rounding, order, units IF asked for).\n"
52
+
53
+ 4. Format Output:
54
+ Response **MUST** start **EXACTLY** with `FINAL ANSWER: ` followed by the answer. NO EXCEPTIONS
55
+ The part after `FINAL ANSWER: ` **MUST** contain **ONLY** the final answer, formatted precisely
56
+
57
  Question: {question}
58
+ """
59
  messages = [HumanMessage(content=prompt)]
60
  response = self.model.invoke(messages)
61
 
 
124
  results_log = []
125
  answers_payload = []
126
  print(f"Running agent on {len(questions_data)} questions...")
127
+ for item in questions_data[:3]:
128
  task_id = item.get("task_id")
129
  question_text = item.get("question")
130
  if not task_id or question_text is None: