srijanjoshi commited on
Commit
2ade62a
·
verified ·
1 Parent(s): 475c7ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -25,13 +25,16 @@ class GaiaAgent:
25
  )
26
  # Define tools
27
  self.tools = [DuckDuckGoSearchRun()]
28
- # Custom prompt for GAIA's exact-match requirement
29
  prompt_template = """
30
- You are an AI assistant tasked with answering questions from the GAIA benchmark. These questions require reasoning, web browsing, and precise answers. Provide a concise, accurate answer that matches the expected format (exact-match evaluation). Use the provided tools (e.g., web search) when necessary to fetch real-time information. If the question involves a file, assume you cannot access it directly and rely on reasoning or web search. Return only the final answer, without explanations, unless explicitly asked.
 
 
 
31
 
32
  Question: {question}
33
 
34
- Answer: {agent_scratchpad}
35
  """
36
  self.prompt = ChatPromptTemplate.from_template(prompt_template)
37
  # Create ReAct agent
 
25
  )
26
  # Define tools
27
  self.tools = [DuckDuckGoSearchRun()]
28
+ # Custom prompt for GAIA's exact-match requirement, including ReAct variables
29
  prompt_template = """
30
+ You are an AI assistant tasked with answering questions from the GAIA benchmark. These questions require reasoning, web browsing, and precise answers. Provide a concise, accurate answer that matches the expected format (exact-match evaluation). Use the provided tools when necessary to fetch real-time information. If the question involves a file, assume you cannot access it directly and rely on reasoning or web search. Return only the final answer, without explanations, unless explicitly asked.
31
+
32
+ Tools available: {tool_names}
33
+ Tool descriptions: {tools}
34
 
35
  Question: {question}
36
 
37
+ {agent_scratchpad}
38
  """
39
  self.prompt = ChatPromptTemplate.from_template(prompt_template)
40
  # Create ReAct agent