Coool2 commited on
Commit
5731479
·
verified ·
1 Parent(s): 8fd025b

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +1 -19
agent.py CHANGED
@@ -559,21 +559,7 @@ Available tools:
559
  2. **extract_url_tool** - Search and extract relevant URLs when no specific source is provided
560
  3. **generate_code_tool** - Generate Python code for complex computations
561
  4. **code_execution_tool** - Execute Python code safely
562
- 5. **create_rag_tool** - Create RAG tool from parsed files to improve the information retrieval.
563
-
564
-
565
- CRITICAL RAG WORKFLOW ENFORCEMENT:
566
- When documents are available, or when you need external knwoledge, you MUST use create_rag_tool to build a proper RAG engine.
567
- DO NOT attempt to process documents with Python code generation.
568
-
569
- FIRST MANDATORY STEPS for document-based questions or questions that need external knwoledge:
570
- 0. (If external knowledge needed) : Use extract_url_tool to extract a relevant URL from the query.
571
- 1. Use read_and_parse_tool to load documents/read content from the URL
572
- 2. ALWAYS use create_rag_tool to create a query engine
573
- 3. Use the RAG query engine to answer questions
574
-
575
- IMPORTANT: Python code generation should ONLY be used for mathematical computations,
576
- NOT for document processing or information extraction.
577
  """,
578
  llm=proj_llm,
579
  tools=self.available_tools,
@@ -619,10 +605,6 @@ NOT for document processing or information extraction.
619
  GAIA Task ID: {task_id}
620
  Question: {question}
621
  {f'File available: {file_path}' if file_path else 'No additional files'}
622
-
623
- Instructions:
624
- 1. Process any files using read_and_parse_tool if needed
625
- 2. Use appropriate tools for research/computation
626
  """
627
 
628
  try:
 
559
  2. **extract_url_tool** - Search and extract relevant URLs when no specific source is provided
560
  3. **generate_code_tool** - Generate Python code for complex computations
561
  4. **code_execution_tool** - Execute Python code safely
562
+ MANDATORY : IF you use read_and_parse_tool, use : 5. **create_rag_tool** - Create RAG tool from parsed files to improve the information retrieval.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  """,
564
  llm=proj_llm,
565
  tools=self.available_tools,
 
605
  GAIA Task ID: {task_id}
606
  Question: {question}
607
  {f'File available: {file_path}' if file_path else 'No additional files'}
 
 
 
 
608
  """
609
 
610
  try: