peerawatchomp commited on
Commit
31b7e68
·
verified ·
1 Parent(s): f25151a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -57,7 +57,18 @@ class BasicAgent:
57
  def __call__(self, question: str) -> str:
58
  print(f"Agent received question (first 50 chars): {question[:50]}...")
59
 
60
- system_prompt = "you are an expert and talkless person. please response shortly."
 
 
 
 
 
 
 
 
 
 
 
61
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=question)]
62
  response = self.agent.invoke({"messages": messages})
63
 
 
57
  def __call__(self, question: str) -> str:
58
  print(f"Agent received question (first 50 chars): {question[:50]}...")
59
 
60
+ system_prompt = """
61
+ You are a general AI assistant. I will ask you a question. Report your thoughts, and finish
62
+ your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
63
+ YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of
64
+ numbers and/or strings.
65
+ If you are asked for a number, don’t use comma to write your number neither use units such as $ or percent
66
+ sign unless specified otherwise.
67
+ If you are asked for a string, don’t use articles, neither abbreviations (e.g. for cities), and write the digits in
68
+ plain text unless specified otherwise.
69
+ If you are asked for a comma separated list, apply the above rules depending of whether the element to be put
70
+ in the list is a number or a string.
71
+ """
72
  messages = [SystemMessage(content=system_prompt), HumanMessage(content=question)]
73
  response = self.agent.invoke({"messages": messages})
74