Update GAIA agent-skip rag
Browse files
app.py
CHANGED
|
@@ -175,7 +175,6 @@ class GAIAAgent:
|
|
| 175 |
tools_or_functions=self.tools,
|
| 176 |
llm=self.llm,
|
| 177 |
system_prompt=GAIA_SYSTEM_PROMPT,
|
| 178 |
-
max_iterations=10,
|
| 179 |
verbose=True
|
| 180 |
)
|
| 181 |
|
|
|
|
| 175 |
tools_or_functions=self.tools,
|
| 176 |
llm=self.llm,
|
| 177 |
system_prompt=GAIA_SYSTEM_PROMPT,
|
|
|
|
| 178 |
verbose=True
|
| 179 |
)
|
| 180 |
|
tools.py
CHANGED
|
@@ -2,7 +2,9 @@
|
|
| 2 |
GAIA Tools - Complete toolkit for the RAG agent
|
| 3 |
Includes web search, calculator, file analyzer, weather, and persona RAG
|
| 4 |
"""
|
|
|
|
| 5 |
import os
|
|
|
|
| 6 |
import logging
|
| 7 |
import math
|
| 8 |
import re
|
|
@@ -374,17 +376,21 @@ def get_gaia_tools(llm=None):
|
|
| 374 |
|
| 375 |
tools.extend(function_tools)
|
| 376 |
|
| 377 |
-
#
|
| 378 |
-
if
|
| 379 |
-
|
| 380 |
-
if
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
logger.info(f"Created {len(tools)} tools for GAIA")
|
| 390 |
return tools
|
|
|
|
| 2 |
GAIA Tools - Complete toolkit for the RAG agent
|
| 3 |
Includes web search, calculator, file analyzer, weather, and persona RAG
|
| 4 |
"""
|
| 5 |
+
|
| 6 |
import os
|
| 7 |
+
|
| 8 |
import logging
|
| 9 |
import math
|
| 10 |
import re
|
|
|
|
| 376 |
|
| 377 |
tools.extend(function_tools)
|
| 378 |
|
| 379 |
+
# Skip persona RAG for GAIA evaluation (too slow)
|
| 380 |
+
if os.getenv("SKIP_PERSONA_RAG", "false").lower() != "true":
|
| 381 |
+
# Add persona RAG tool if available
|
| 382 |
+
if llm:
|
| 383 |
+
persona_engine = create_persona_query_engine(llm)
|
| 384 |
+
if persona_engine:
|
| 385 |
+
persona_tool = QueryEngineTool.from_defaults(
|
| 386 |
+
query_engine=persona_engine,
|
| 387 |
+
name="persona_database",
|
| 388 |
+
description="Search a database of personas with different backgrounds, professions, and interests. Use to find people matching specific criteria."
|
| 389 |
+
)
|
| 390 |
+
tools.append(persona_tool)
|
| 391 |
+
logger.info("Added persona RAG tool")
|
| 392 |
+
else:
|
| 393 |
+
logger.info("Skipping persona RAG (SKIP_PERSONA_RAG=true)")
|
| 394 |
|
| 395 |
logger.info(f"Created {len(tools)} tools for GAIA")
|
| 396 |
return tools
|