Coool2 commited on
Commit
80ab86f
·
verified ·
1 Parent(s): 1d035ba

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +8 -17
agent.py CHANGED
@@ -331,19 +331,11 @@ def enhanced_smart_research_tool(query: str, task_context: str = "", max_results
331
  research_tool = FunctionTool.from_defaults(
332
  fn=enhanced_smart_research_tool,
333
  name="Research Tool",
334
- description="""Intelligent research specialist that automatically routes between scientific and general sources. Use this tool when you need:
335
 
336
- **Scientific Research (ArXiv):**
337
- - Academic papers, research studies, technical algorithms
338
- - Scientific experiments, theories, mathematical concepts
339
- - Recent developments in AI, ML, physics, chemistry, etc.
340
 
341
  **General Research (Web + Content Extraction):**
342
- - Current events, news, real-time information
343
- - Biographical information, company details, locations
344
- - How-to guides, technical documentation
345
- - Weather data, sports results, cultural information
346
- - Product specifications, reviews, comparisons
347
 
348
  **Automatic Features:**
349
  - Intelligently selects between ArXiv and web search
@@ -360,23 +352,22 @@ code_agent = CodeActAgent(
360
  description="Advanced calculations, data processing, and final answer synthesis using ReAct reasoning",
361
  system_prompt="""
362
  You are a coding and reasoning specialist using ReAct methodology.
363
-
364
  For each task:
365
  1. THINK: Analyze what needs to be calculated or processed
366
  2. ACT: Execute appropriate code or calculations
367
  3. OBSERVE: Review results and determine if more work is needed
368
  4. REPEAT: Continue until you have the final answer
369
 
370
- Always show your reasoning process clearly and provide exact answers as required by GAIA.
371
  """,
372
- llm=proj_llm, # Your language model instance
373
- max_steps=5 # Optional: limit the number of reasoning steps
374
  )
375
 
376
  analysis_tool = FunctionTool.from_defaults(
377
  fn=analysis_function,
378
  name="AnalysisAgent",
379
- description="""Advanced multimodal document analysis specialist. Use this tool when you need to:
380
 
381
  **Document Processing:**
382
  - Analyze PDF, Word, CSV, or image files provided with the question
@@ -399,7 +390,7 @@ analysis_tool = FunctionTool.from_defaults(
399
  code_tool = FunctionTool.from_defaults(
400
  fn=code_function,
401
  name="CodeAgent",
402
- description="""Advanced computational specialist using ReAct reasoning. Use this tool when you need:
403
 
404
  **Mathematical Calculations:**
405
  - Complex arithmetic, algebra, statistics, probability
@@ -424,7 +415,7 @@ code_tool = FunctionTool.from_defaults(
424
  - Data structure manipulation
425
  - Regular expression operations
426
 
427
- **When to use:** Questions requiring precise calculations, data manipulation, logical reasoning with code, or when you need to verify numerical results.
428
 
429
  **Input format:** Describe the calculation or processing task clearly, including any specific requirements or constraints."""
430
  )
 
331
  research_tool = FunctionTool.from_defaults(
332
  fn=enhanced_smart_research_tool,
333
  name="Research Tool",
334
+ description="""Intelligent research specialist that automatically routes between scientific and general sources and extract content. Use this tool at least when you need:
335
 
336
+ **Scientific Research (ArXiv + Content Extraction):**
 
 
 
337
 
338
  **General Research (Web + Content Extraction):**
 
 
 
 
 
339
 
340
  **Automatic Features:**
341
  - Intelligently selects between ArXiv and web search
 
352
  description="Advanced calculations, data processing, and final answer synthesis using ReAct reasoning",
353
  system_prompt="""
354
  You are a coding and reasoning specialist using ReAct methodology.
355
+
356
  For each task:
357
  1. THINK: Analyze what needs to be calculated or processed
358
  2. ACT: Execute appropriate code or calculations
359
  3. OBSERVE: Review results and determine if more work is needed
360
  4. REPEAT: Continue until you have the final answer
361
 
362
+ Always show your reasoning process clearly and provide exact answers.
363
  """,
364
+ llm=proj_llm,
 
365
  )
366
 
367
  analysis_tool = FunctionTool.from_defaults(
368
  fn=analysis_function,
369
  name="AnalysisAgent",
370
+ description="""Advanced multimodal document analysis specialist. Use this tool at least when you need to:
371
 
372
  **Document Processing:**
373
  - Analyze PDF, Word, CSV, or image files provided with the question
 
390
  code_tool = FunctionTool.from_defaults(
391
  fn=code_function,
392
  name="CodeAgent",
393
+ description="""Advanced computational specialist using ReAct reasoning. Use this tool at least when you need:
394
 
395
  **Mathematical Calculations:**
396
  - Complex arithmetic, algebra, statistics, probability
 
415
  - Data structure manipulation
416
  - Regular expression operations
417
 
418
+ **When to use:** Questions requiring precise calculations, data manipulation, logical reasoning with code verification, mathematical problem solving, or when you need to process numerical/textual data programmatically.
419
 
420
  **Input format:** Describe the calculation or processing task clearly, including any specific requirements or constraints."""
421
  )