0f3dy commited on
Commit
3e5540c
·
verified ·
1 Parent(s): 7e2b4da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -211,27 +211,24 @@ class BasicAgent:
211
 
212
  return "MAX_RETRIES_EXCEEDED"
213
 
214
- def _create_prompt(self, question: str) -> str:
215
- """Create a comprehensive prompt for Claude to answer the question"""
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
- - Output **only** the final result using this template:
221
 
222
- FINAL ANSWER: [YOUR FINAL ANSWER]
223
 
224
- Do not include any explanation, reasoning, or commentary outside of the FINAL ANSWER line. Your entire response must be a single line in that format.
225
-
226
- Rules for FINAL ANSWER:
227
- - If asked for a number, give only the number without commas, symbols, or units unless specified.
228
- - If asked for a string, do not use articles or abbreviations, and spell out digits.
229
- - If asked for a list, return a comma-separated list applying the above rules to each item.
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
  """