xarical commited on
Commit
0fe79e1
·
1 Parent(s): c1f8728

fix prompt

Browse files
Files changed (1) hide show
  1. CustomAgent.py +4 -3
CustomAgent.py CHANGED
@@ -8,7 +8,7 @@ import os
8
 
9
  def websearch(query: str) -> str:
10
  """
11
- Performs a web search using an external web search API.
12
  Args:
13
  query (str): The search query string.
14
  Returns:
@@ -33,16 +33,17 @@ class CustomAgent(BasicAgent):
33
  self._system_prompt = """\
34
  You are a general AI assistant. I will ask you a question. Report your thoughts and provide an answer.
35
  Your final answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. Do not provide anything except your final answer.
 
36
  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.
37
  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.
38
  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.
39
  Question: {question}
40
  """ # System prompt, adapted from the GAIA team's example at https://huggingface.co/spaces/gaia-benchmark/leaderboard
41
  self._model = OpenaiChatModel(
42
- model="llama-3.1-8b-instant",
43
  api_key=os.environ["GROQ_API_KEY"],
44
  base_url="https://api.groq.com/openai/v1/",
45
- temperature=0.2,
46
  max_tokens=512
47
  )
48
  print("CustomAgent initialized.")
 
8
 
9
  def websearch(query: str) -> str:
10
  """
11
+ Performs a web search using an external web search API. Note that better results may be obtained from varying the wording of the query.
12
  Args:
13
  query (str): The search query string.
14
  Returns:
 
33
  self._system_prompt = """\
34
  You are a general AI assistant. I will ask you a question. Report your thoughts and provide an answer.
35
  Your final answer should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. Do not provide anything except your final answer.
36
+ Only use the provided tools if your own knowledge would be insufficient. If you are unable to answer the question using the provided tools, give your best guess.
37
  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.
38
  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.
39
  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.
40
  Question: {question}
41
  """ # System prompt, adapted from the GAIA team's example at https://huggingface.co/spaces/gaia-benchmark/leaderboard
42
  self._model = OpenaiChatModel(
43
+ model="llama-3.3-70b-versatile",
44
  api_key=os.environ["GROQ_API_KEY"],
45
  base_url="https://api.groq.com/openai/v1/",
46
+ temperature=0.7,
47
  max_tokens=512
48
  )
49
  print("CustomAgent initialized.")