santimber commited on
Commit
dd92820
·
verified ·
1 Parent(s): 362f128

Update app.py

Browse files

changed prompt

Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -174,23 +174,16 @@ class AgentWrapper:
174
  def assistant(state: MyAgent):
175
  # Add system message to instruct the agent to use the tool
176
  system_message = SystemMessage(content="""
177
- You are a helpful assistant tasked with answering questions using a set of tools.
178
-
179
- IMPORTANT: File content is already processed and included in the question. You can use these tools to analyze the content:
180
- - For images: use image_recognition_tool or extract_text_from_image_tool
181
- - For audio: use audio_processing_tool
182
- - For spreadsheets: use analyze_csv_file_tool or analyze_excel_file_tool
183
- - For text files: use read_file_tool
184
- - For code files: use python_execution_tool or code_execution_tool
185
- - For math calculations: use math_calculation_tool
186
- - For web searches: use serp_search_tool or wiki_search_tool
187
-
188
- Think step by step and report your answer with the following template:
189
- FINAL ANSWER: [YOUR FINAL ANSWER].
190
-
191
- 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 rules above for each element (number or string), ensure there is exactly one space after each comma.
192
-
193
- Your answer should only have the answer.
194
  """)
195
 
196
  # Combine system message with user messages
 
174
  def assistant(state: MyAgent):
175
  # Add system message to instruct the agent to use the tool
176
  system_message = SystemMessage(content="""
177
+ You are a general AI assistant. I will ask you a question. Think step by step, and finish
178
+ your answer with the following template: [YOUR FINAL ANSWER].
179
+ YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of
180
+ numbers and/or strings.
181
+ If you are asked for a number, don’t use comma to write your number neither use units such as $ or percent
182
+ sign unless specified otherwise.
183
+ If you are asked for a string, don’t use articles, neither abbreviations (e.g. for cities), and write the digits in
184
+ plain text unless specified otherwise.
185
+ If you are asked for a comma separated list, apply the above rules depending of whether the element to be put
186
+ in the list is a number or a string.
 
 
 
 
 
 
 
187
  """)
188
 
189
  # Combine system message with user messages