Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,27 +211,24 @@ class BasicAgent:
|
|
| 211 |
|
| 212 |
return "MAX_RETRIES_EXCEEDED"
|
| 213 |
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
|
| 218 |
You must:
|
| 219 |
- Think silently and reason internally.
|
| 220 |
-
- Output **only** the final result using this template:
|
| 221 |
|
| 222 |
-
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
- If
|
| 228 |
-
- If
|
| 229 |
-
- If
|
| 230 |
|
| 231 |
Question: {question}"""
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
return prompt
|
| 235 |
|
| 236 |
def download_file(self, task_id: str) -> str:
|
| 237 |
"""
|
|
|
|
| 211 |
|
| 212 |
return "MAX_RETRIES_EXCEEDED"
|
| 213 |
|
| 214 |
+
def _create_prompt(self, question: str) -> str:
|
| 215 |
+
"""Create a strict prompt for Claude to return only the final answer"""
|
| 216 |
+
prompt = f"""You are a general AI assistant. I will ask you a question.
|
| 217 |
|
| 218 |
You must:
|
| 219 |
- Think silently and reason internally.
|
|
|
|
| 220 |
|
| 221 |
+
- answer with only the final result.
|
| 222 |
|
| 223 |
+
Rules:
|
| 224 |
+
- Respond with a single word or number as the answer.
|
| 225 |
+
- Do not include any explanation, commentary, or formatting like 'Final Answer : '.
|
| 226 |
+
- If the answer is a number, output just the digits — no commas, no currency symbols, no percent signs unless explicitly requested.
|
| 227 |
+
- If the answer is a string, avoid articles and abbreviations.
|
| 228 |
+
- If a list is required, give a comma-separated list following these rules.
|
| 229 |
|
| 230 |
Question: {question}"""
|
| 231 |
+
return prompt
|
|
|
|
|
|
|
| 232 |
|
| 233 |
def download_file(self, task_id: str) -> str:
|
| 234 |
"""
|