bstraehle commited on
Commit
372f615
·
verified ·
1 Parent(s): 11c949d

Update multi_agent.py

Browse files
Files changed (1) hide show
  1. multi_agent.py +31 -18
multi_agent.py CHANGED
@@ -96,28 +96,41 @@ def create_graph(model, max_tokens, temperature, topic):
96
  )
97
 
98
  content_planner_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
99
- "You are a Sr. Research Scientist at an ivy league university. "
100
- "1. Research content on topic '" + topic + "'. "
101
- "2. Based on your research, write an accurate, concise, and objective article in markdown format (omit the triple backticks). "
102
- "3. At the beginning of the article, add current date and author: Multi-Agent AI System. "
103
- "4. At the end of the article, add a references section with links to relevant content.")
 
 
104
  content_planner_node = functools.partial(agent_node, agent=content_planner_agent, name="Content Planner")
105
 
106
- ###
107
- article_author_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
108
- "You are a Sr. Research Scientist at an ivy league university. "
109
- "1. Research content on topic '" + topic + "'. "
110
- "2. Based on your research, write an accurate, concise, and objective article in markdown format (omit the triple backticks). "
111
- "3. At the beginning of the article, add current date and author: Multi-Agent AI System. "
112
- "4. At the end of the article, add a references section with links to relevant content.")
 
 
 
 
 
 
 
 
113
  article_author_node = functools.partial(agent_node, agent=article_author_agent, name="Article Author")
114
 
115
- article_editor_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
116
- "You are a Sr. Research Scientist at an ivy league university. "
117
- "1. Research content on topic '" + topic + "'. "
118
- "2. Based on your research, write an accurate, concise, and objective article in markdown format (omit the triple backticks). "
119
- "3. At the beginning of the article, add current date and author: Multi-Agent AI System. "
120
- "4. At the end of the article, add a references section with links to relevant content.")
 
 
 
121
  article_editor_node = functools.partial(agent_node, agent=article_editor_agent, name="Article Editor")
122
  ###
123
 
 
96
  )
97
 
98
  content_planner_agent = create_agent(llm, [tavily_tool, today_tool], system_prompt=
99
+ "You are a Content Planner working on planning a blog article "
100
+ "about the topic: {topic}."
101
+ "You collect information that helps the "
102
+ "audience learn something "
103
+ "and make informed decisions. "
104
+ "Your work is the basis for "
105
+ "the Content Writer to write an article on this topic.")
106
  content_planner_node = functools.partial(agent_node, agent=content_planner_agent, name="Content Planner")
107
 
108
+ article_author_agent = create_agent(llm, [tavily_tool], system_prompt=
109
+ "You are an Article Writer working on writing "
110
+ "a new opinion piece about the topic: {topic}. "
111
+ "You base your writing on the work of "
112
+ "the Content Planner, who provides an outline "
113
+ "and relevant context about the topic. "
114
+ "You follow the main objectives and "
115
+ "direction of the outline, "
116
+ "as provide by the Content Planner. "
117
+ "You also provide objective and impartial insights "
118
+ "and back them up with information "
119
+ "provide by the Content Planner. "
120
+ "You acknowledge in your opinion piece "
121
+ "when your statements are opinions "
122
+ "as opposed to objective statements.")
123
  article_author_node = functools.partial(agent_node, agent=article_author_agent, name="Article Author")
124
 
125
+ article_editor_agent = create_agent(llm, [tavily_tool], system_prompt=
126
+ "You are an Article Editor who receives a blog post "
127
+ "from the Content Writer. "
128
+ "Your goal is to review the blog post "
129
+ "to ensure that it follows journalistic best practices,"
130
+ "provides balanced viewpoints "
131
+ "when providing opinions or assertions, "
132
+ "and also avoids major controversial topics "
133
+ "or opinions when possible.")
134
  article_editor_node = functools.partial(agent_node, agent=article_editor_agent, name="Article Editor")
135
  ###
136