Spaces:
Build error
Build error
Update main_v2.py to format task instructions in GAIA-style, ensuring responses are concise and follow specific guidelines. Modify the task parameter to utilize the new formatted instructions for improved clarity and response accuracy.
Browse files- main_v2.py +16 -1
main_v2.py
CHANGED
@@ -83,13 +83,28 @@ agent.visualize()
|
|
83 |
|
84 |
|
85 |
def main(task: str):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
result = agent.run(
|
87 |
additional_args=None,
|
88 |
images=None,
|
89 |
max_steps=5,
|
90 |
reset=True,
|
91 |
stream=False,
|
92 |
-
task=
|
93 |
)
|
94 |
|
95 |
logger.info(f"Result: {result}")
|
|
|
83 |
|
84 |
|
85 |
def main(task: str):
|
86 |
+
# Format the task with GAIA-style instructions
|
87 |
+
gaia_task = f"""Instructions:
|
88 |
+
1. Your response must contain ONLY the answer to the question, nothing else
|
89 |
+
2. Do not repeat the question or any part of it
|
90 |
+
3. Do not include any explanations, reasoning, or context
|
91 |
+
4. Do not include source attribution or references
|
92 |
+
5. Do not use phrases like "The answer is" or "I found that"
|
93 |
+
6. Do not include any formatting, bullet points, or line breaks
|
94 |
+
7. If the answer is a number, return only the number
|
95 |
+
8. If the answer requires multiple items, separate them with commas
|
96 |
+
9. If the answer requires ordering, maintain the specified order
|
97 |
+
10. Use the most direct and succinct form possible
|
98 |
+
|
99 |
+
{task}"""
|
100 |
+
|
101 |
result = agent.run(
|
102 |
additional_args=None,
|
103 |
images=None,
|
104 |
max_steps=5,
|
105 |
reset=True,
|
106 |
stream=False,
|
107 |
+
task=gaia_task,
|
108 |
)
|
109 |
|
110 |
logger.info(f"Result: {result}")
|