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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -213,11 +213,20 @@ class BasicAgent:
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. Report your thoughts, and finish your answer with the following template:
217
 
218
- FINAL ANSWER: [YOUR FINAL ANSWER].
 
 
219
 
220
- YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise. If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
 
 
 
 
 
 
 
221
 
222
  Question: {question}"""
223
 
 
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