bstraehle commited on
Commit
fe1fabb
·
verified ·
1 Parent(s): fcc83a7

Update crew.py

Browse files
Files changed (1) hide show
  1. crew.py +7 -7
crew.py CHANGED
@@ -24,22 +24,22 @@ def get_crew():
24
 
25
  researcher = Agent(
26
  role="Web Research Agent",
27
- goal="Search the web for question {question} and scrape the most relevant web page.",
28
- backstory="As an expert web research assistant, you are search the web for question {question} and scraping the most relevant web page.",
29
  tools=[search_tool, web_rag_tool],
30
  verbose=True
31
  )
32
 
33
  research = Task(
34
  agent=researcher,
35
- description="Search the web for question {question} and scrape the most relevant web page.",
36
- expected_output="Content on topic {question}."
37
  )
38
 
39
  final_answer = Task(
40
  agent=researcher,
41
- description="Given question {question} and a preliminary answer, get the final answer.",
42
- expected_output="The final answer to question {question}."
43
  )
44
 
45
  return Crew(
@@ -52,7 +52,7 @@ def get_crew():
52
 
53
  @tool("Final answer tool")
54
  def final_answer_tool(question: str, answer: str) -> str:
55
- """Clear description for what this tool is useful for, your agent will need this information to use it."""
56
  prompt_template = """
57
  You are given a question and context. You must **precisely** answer the question based on the context. Do not include explanations, steps, reasoning, or additional text.
58
  **Question:** """ + question + """
 
24
 
25
  researcher = Agent(
26
  role="Web Research Agent",
27
+ goal="Search the web for topic {topic} and scrape the most relevant web page.",
28
+ backstory="As an expert web research assistant, you are search the web for topic {topic} and scraping the most relevant web page.",
29
  tools=[search_tool, web_rag_tool],
30
  verbose=True
31
  )
32
 
33
  research = Task(
34
  agent=researcher,
35
+ description="Search the web for topic {topic} and scrape the most relevant web page.",
36
+ expected_output="Content on topic {topic}."
37
  )
38
 
39
  final_answer = Task(
40
  agent=researcher,
41
+ description="Given topic {topic} and an initial answer, get the final answer.",
42
+ expected_output="The final answer to topic {topic}."
43
  )
44
 
45
  return Crew(
 
52
 
53
  @tool("Final answer tool")
54
  def final_answer_tool(question: str, answer: str) -> str:
55
+ """Given a question and initial answer, get the final answer."""
56
  prompt_template = """
57
  You are given a question and context. You must **precisely** answer the question based on the context. Do not include explanations, steps, reasoning, or additional text.
58
  **Question:** """ + question + """