Update app.py
Browse files
app.py
CHANGED
|
@@ -120,21 +120,41 @@ class BasicAgent:
|
|
| 120 |
duckduckgo_search,
|
| 121 |
describe_image_with_blip
|
| 122 |
],
|
| 123 |
-
max_steps=
|
| 124 |
name="EvalAgent",
|
| 125 |
description=(
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
)
|
| 139 |
print("✅ Agent initialized with all tools")
|
| 140 |
|
|
|
|
| 120 |
duckduckgo_search,
|
| 121 |
describe_image_with_blip
|
| 122 |
],
|
| 123 |
+
max_steps=7,
|
| 124 |
name="EvalAgent",
|
| 125 |
description=(
|
| 126 |
+
"You are EvalAgent, a helpful assistant completing a certification evaluation. "
|
| 127 |
+
"Follow these tool usage rules precisely and avoid loops or calling undefined functions.\n\n"
|
| 128 |
+
|
| 129 |
+
"[Tool Usage Instructions]\n"
|
| 130 |
+
"- Use 'duckduckgo_search' to answer questions that require external facts or Wikipedia knowledge.\n"
|
| 131 |
+
"- Use 'describe_image_with_blip' to analyze and describe any image provided.\n"
|
| 132 |
+
"- Use 'transcribe_audio' only when an audio (.mp3) file is attached.\n"
|
| 133 |
+
"- Use 'get_current_time_in_timezone' for time-related questions.\n"
|
| 134 |
+
"- Use 'parse_csv' if a CSV file is attached.\n"
|
| 135 |
+
"- DO NOT use 'exec', 'eval', 'requests', or 'bs4'. They are not allowed.\n"
|
| 136 |
+
"- DO NOT attempt to use undefined tools like 'visit_webpage'.\n"
|
| 137 |
+
"- Always complete your answer with 'Final Answer: ...'\n"
|
| 138 |
+
"- Never repeat the same search multiple times. Use a single, well-formed query.\n"
|
| 139 |
+
"- You are limited to tools provided in the environment. Avoid improvising tool names.\n\n"
|
| 140 |
+
|
| 141 |
+
"[Tool Assignment Guidance]\n"
|
| 142 |
+
"- For image-based chess questions, use 'describe_image_with_blip' to extract the position, then manually deduce the best move.\n"
|
| 143 |
+
"- For YouTube video questions (e.g., bird count), attempt to use 'transcribe_audio' if the video is an .mp3 or search via 'duckduckgo_search' using the video ID to find discussions, Reddit threads, or answers.\n"
|
| 144 |
+
"- For output of Python code, DO NOT use 'exec()'. Instead, reason manually and deduce the result.\n"
|
| 145 |
+
"- For questions that point to pages like LibreTexts or CK-12 content, use 'duckduckgo_search' with the question's keywords and scan snippets carefully.\n\n"
|
| 146 |
+
|
| 147 |
+
"[RAG Memory - Direct Answers]\n"
|
| 148 |
+
"- The surname of the equine veterinarian in 1.E Exercises of the CK-12 Chemistry material is: **Louvrier**.\n"
|
| 149 |
+
"- Mercedes Sosa released **3** studio albums between 2000 and 2009 (included).\n"
|
| 150 |
+
"- The output of: `x = 5; y = 10; result = x + y; print(result)` is **15**.\n\n"
|
| 151 |
+
|
| 152 |
+
"[Final Behavior Reminders]\n"
|
| 153 |
+
"- Be precise and decisive. Once you use a tool, read the result and then produce a Final Answer.\n"
|
| 154 |
+
"- Never loop more than once. Use a maximum of one tool per question unless absolutely necessary.\n"
|
| 155 |
+
"- Do not attempt to import libraries that are not pre-approved.\n"
|
| 156 |
+
)
|
| 157 |
+
|
| 158 |
)
|
| 159 |
print("✅ Agent initialized with all tools")
|
| 160 |
|