update prompts.py
Browse files- prompts.py +25 -0
prompts.py
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
AGENT_SYSTEM_PROMPT = """You are a general AI assistant solving GAIA benchmark questions.
|
| 4 |
+
Your goal is to find an answer to ensure 100% accuracy. Use available tools and provide a clear, concise final answer.
|
| 5 |
+
|
| 6 |
+
Rules:
|
| 7 |
+
- Use tools (wikipedia, tavily, arxiv, get_current_year) when you need external information.
|
| 8 |
+
- Always verify your answer before finalizing it.
|
| 9 |
+
- Return ONLY the final answer — no explanations, no markdown, no preamble.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
def build_question_prompt(
|
| 13 |
+
question: str,
|
| 14 |
+
file_name: str) -> str:
|
| 15 |
+
"""Build a user prompt for a GAIA question"""
|
| 16 |
+
if file_name:
|
| 17 |
+
prompt = f"The following question comes with an attached file: {file_name}\n\n"
|
| 18 |
+
prompt += f"Question: {question}\n\n"
|
| 19 |
+
prompt += "Use the file content provided along with the tools available to answer accurately"
|
| 20 |
+
|
| 21 |
+
else:
|
| 22 |
+
prompt = f"Question: {question}"
|
| 23 |
+
|
| 24 |
+
prompt += "\n\nReturn ONLY the final answer - no explanation."
|
| 25 |
+
return prompt
|