Spaces:
Configuration error
Configuration error
oremaz
commited on
Commit
·
eada944
1
Parent(s):
fff0aa5
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -561,15 +561,19 @@ Available tools:
|
|
| 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 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 573 |
""",
|
| 574 |
llm=proj_llm,
|
| 575 |
tools=self.available_tools,
|
|
|
|
| 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,
|