Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -213,25 +213,14 @@ 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
|
| 217 |
|
| 218 |
-
|
| 219 |
-
- Web search for current information
|
| 220 |
-
- Wikipedia search for factual information
|
| 221 |
-
- Webpage visiting for detailed content
|
| 222 |
-
- File downloading for task-specific files
|
| 223 |
|
| 224 |
-
|
| 225 |
|
| 226 |
-
|
| 227 |
|
| 228 |
-
If the question involves:
|
| 229 |
-
- Current events or recent information: Mention that you would use web search
|
| 230 |
-
- Specific factual lookups: Mention that you would use Wikipedia or web search
|
| 231 |
-
- File analysis: Mention that you would download and analyze the file
|
| 232 |
-
- Code or technical problems: Provide working solutions with explanations
|
| 233 |
-
|
| 234 |
-
Answer:"""
|
| 235 |
|
| 236 |
return prompt
|
| 237 |
|
|
|
|
| 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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
|
| 225 |
return prompt
|
| 226 |
|