Kackle commited on
Commit
ce74cef
·
verified ·
1 Parent(s): 6e6b5f0

prompt change

Browse files
Files changed (1) hide show
  1. app.py +18 -28
app.py CHANGED
@@ -416,39 +416,29 @@ class SlpMultiAgent:
416
  None,
417
  lambda: manager_agent.run(f"""
418
  Question: {short_question}
419
-
420
- CRITICAL INSTRUCTIONS:
421
- 1. Use tools DIRECTLY, not in code execution
422
- 2. For factual questions: Use google_search() tool immediately
423
- 3. For math: Use math_calculator() tool directly
424
- 4. DO NOT write complex code - use tools instead
425
- 5. DO NOT call ResearchAgent() or SolverAgent() in code
426
-
427
  Available tools:
428
  - google_search(query): Search the web
429
  - math_calculator(expression): Calculate math
430
  - file_processor(action, data): Handle files
431
  - knowledge_base(topic): Get knowledge
432
-
433
- SIMPLE APPROACH:
434
- - Call the appropriate tool
435
- - Get the result
436
- - Provide final_answer()
437
-
438
- Example for factual question:
439
- 1. Call google_search("your query")
440
- 2. Extract answer from results
441
- 3. Call final_answer("the answer")
442
-
443
- NO complex code execution. Use tools directly.
444
-
445
- Take your time and think every step out, be confident and precise.
446
-
447
- Google should be able to answer all these questions and you have access to it.
448
-
449
- They are simple yet tricky questions, so be careful and double check your answers. Make sure to use google_search for any factual question.
450
-
451
- always provide a final_answer in the format final_answer("your answer here") when you have the answer.
452
  """)
453
  )
454
  break # Success, exit retry loop
 
416
  None,
417
  lambda: manager_agent.run(f"""
418
  Question: {short_question}
419
+
420
+ INSTRUCTIONS:
421
+ - For every question, you MUST call the most appropriate tool to get the answer.
422
+ - After calling the tool, extract the answer from its output.
423
+ - You MUST call final_answer('...') with ONLY the answer (no explanation, no extra text).
424
+ - If you cannot answer, call final_answer("I don't know").
425
+ - Do NOT explain your reasoning, do NOT describe your process, do NOT output anything except the final_answer call.
426
+
427
  Available tools:
428
  - google_search(query): Search the web
429
  - math_calculator(expression): Calculate math
430
  - file_processor(action, data): Handle files
431
  - knowledge_base(topic): Get knowledge
432
+
433
+ EXAMPLES:
434
+ Q: What is the capital of France?
435
+ A: final_answer('Paris')
436
+ Q: 2 + 2 = ?
437
+ A: final_answer('4')
438
+ Q: Who won the 2020 Olympics 100m?
439
+ A: final_answer('Lamont Marcell Jacobs')
440
+
441
+ STRICTLY FOLLOW THIS FORMAT. DO NOT OUTPUT ANYTHING ELSE.
 
 
 
 
 
 
 
 
 
 
442
  """)
443
  )
444
  break # Success, exit retry loop