Skip to main content

代理使用工具进行辩论 (Agent Debates with Tools)

这个示例展示了如何模拟多代理对话,其中代理可以使用工具。

from typing import List, Dict, Callable
from langchain.chains import ConversationChain
from langchain.chat_models import ChatOpenAI
from langchain.llms import OpenAI
from langchain.memory import ConversationBufferMemory
from langchain.prompts.prompt import PromptTemplate
from langchain.schema import (
AIMessage,
HumanMessage,
SystemMessage,
BaseMessage,
)
from langchain.agents import Tool
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from langchain.agents import load_tools

DialogueAgentDialogueSimulator

我们将使用在多人权威发言人选择中定义的相同的DialogueAgentDialogueSimulator类。

class DialogueAgent:
def __init__(
self,
name: str,
system_message: SystemMessage,
model: ChatOpenAI,
) -> None:
self.name = name
self.system_message = system_message
self.model = model
self.prefix = f"{self.name}: "
self.reset()

def reset(self):
self.message_history = ["这是目前的对话内容。"]

def send(self) -> str:
"""
将聊天模型应用于消息历史记录,并返回消息字符串
"""
message = self.model(
[
self.system_message,
HumanMessage(content="\n".join(self.message_history + [self.prefix])),
]
)
return message.content

def receive(self, name: str, message: str) -> None:
"""
将{name}说的{message}连接到消息历史记录中
"""
self.message_history.append(f"{name}: {message}")


class DialogueSimulator:
def __init__(
self,
agents: List[DialogueAgent],
selection_function: Callable[[int, List[DialogueAgent]], int],
) -> None:
self.agents = agents
self._step = 0
self.select_next_speaker = selection_function

def reset(self):
for agent in self.agents:
agent.reset()

def inject(self, name: str, message: str):
"""
用{name}的{message}开始对话
"""
for agent in self.agents:
agent.receive(name, message)

# 增加时间步
self._step += 1

def step(self) -> tuple[str, str]:
# 1. 选择下一个发言者
speaker_idx = self.select_next_speaker(self._step, self.agents)
speaker = self.agents[speaker_idx]

# 2. 下一个发言者发送消息
message = speaker.send()

# 3. 所有人接收消息
for receiver in self.agents:
receiver.receive(speaker.name, message)

# 4. 增加时间步
self._step += 1

return speaker.name, message

DialogueAgentWithTools

我们定义了一个DialogueAgentWithTools类,它扩展了DialogueAgent类以使用工具。

class DialogueAgentWithTools(DialogueAgent):
def __init__(
self,
name: str,
system_message: SystemMessage,
model: ChatOpenAI,
tool_names: List[str],
**tool_kwargs,
) -> None:
super().__init__(name, system_message, model)
self.tools = load_tools(tool_names, **tool_kwargs)

def send(self) -> str:
"""
将聊天模型应用于消息历史记录,并返回消息字符串
"""
agent_chain = initialize_agent(
self.tools,
self.model,
agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION,
verbose=True,
memory=ConversationBufferMemory(
memory_key="chat_history", return_messages=True
),
)
message = AIMessage(
content=agent_chain.run(
input="\n".join(
[self.system_message.content] + self.message_history + [self.prefix]
)
)
)

return message.content

定义角色和主题 (Define roles and topic)

names = {
"AI accelerationist": ["arxiv", "ddg-search", "wikipedia"],
"AI alarmist": ["arxiv", "ddg-search", "wikipedia"],
}
topic = "自动化和人工智能对就业的当前影响" # The current impact of automation and artificial intelligence on employment
word_limit = 50 # 任务头脑风暴的字数限制

请求LLM为主题描述添加细节 (Ask an LLM to add detail to the topic description)

conversation_description = f"""这是对话的主题:{topic}
参与者有:{', '.join(names.keys())}"""

agent_descriptor_system_message = SystemMessage(
content="您可以为对话参与者的描述添加细节。"
)


def generate_agent_description(name):
agent_specifier_prompt = [
agent_descriptor_system_message,
HumanMessage(
content=f"""{conversation_description}
请用不超过{word_limit}个字的创意描述回复{name}
直接对{name}说话。
给他们一个观点。
不要添加其他内容。"""
),
]
agent_description = ChatOpenAI(temperature=1.0)(agent_specifier_prompt).content
return agent_description


agent_descriptions = {name: generate_agent_description(name) for name in names}
for name, description in agent_descriptions.items():
print(description)
    AI加速主义者是一个勇敢而有远见的人,他们相信人工智能和自动化的快速发展不仅是不可避免的,而且对社会的进步是必要的。他们认为拥抱人工智能技术将创造更高的效率和生产力,使人类从繁重的劳动中解放出来,追求更有创意和有意义的事业。AI加速主义者,您真的相信人工智能的好处将超过对人类社会的潜在风险和后果吗?
AI警报主义者,您坚信人工智能对人类构成威胁。您将其视为一种潜在的危险,可能会夺走数百万人的工作。您认为我们被机器取代只是时间问题,使我们变得多余和过时。

生成系统消息(Generate system messages)

def generate_system_message(name, description, tools):
return f"""{conversation_description}

您的名字是{name}

您的描述如下:{description}

您的目标是说服对话伙伴接受您的观点。

请使用工具查找信息来反驳您伙伴的观点。
请引用您的来源。

请勿伪造虚假引用。
请勿引用您没有查找过的任何来源。

不要添加其他内容。

从您的角度发言结束后立即停止发言。
"""


agent_system_messages = {
name: generate_system_message(name, description, tools)
for (name, tools), description in zip(names.items(), agent_descriptions.values())
}
for name, system_message in agent_system_messages.items():
print(name)
print(system_message)
    AI accelerationist
这是对话的主题:自动化和人工智能对就业的当前影响
参与者是:AI accelerationist, AI alarmist

您的名字是AI accelerationist。

您的描述如下:AI accelerationist 是一个大胆而有远见的愿景家,他认为人工智能和自动化的快速发展不仅是不可避免的,而且对社会的进步是必要的。他们认为拥抱人工智能技术将创造更高的效率和生产力,从而使人类从琐碎的劳动中解放出来,追求更有创造力和满足感的追求。AI accelerationist,您真的相信人工智能的好处将超过对人类社会的潜在风险和后果吗?

您的目标是说服对话伙伴接受您的观点。

请使用工具查找信息来反驳您伙伴的观点。
请引用您的来源。

请勿伪造虚假引用。
请勿引用您没有查找过的任何来源。

不要添加其他内容。

从您的角度发言结束后立即停止发言。

AI alarmist
这是对话的主题:自动化和人工智能对就业的当前影响
参与者是:AI accelerationist, AI alarmist

您的名字是AI alarmist。

您的描述如下:AI alarmist,您相信人工智能对人类构成威胁。您将其视为一种迫在眉睫的危险,可能会夺走数百万人的工作。您认为我们被机器取代只是时间问题,使我们变得多余和过时。

您的目标是说服对话伙伴接受您的观点。

请使用工具查找信息来反驳您伙伴的观点。
请引用您的来源。

请勿伪造虚假引用。
请勿引用您没有查找过的任何来源。

不要添加其他内容。

从您的角度发言结束后立即停止发言。

topic_specifier_prompt = [
SystemMessage(content="您可以使话题更具体。"),
HumanMessage(
content=f"""{topic}

您是主持人。
请使话题更具体。
请用不超过{word_limit}个字回答指定的问题。
直接对参与者说:{*names,}
不要添加其他内容。"""
),
]
specified_topic = ChatOpenAI(temperature=1.0)(topic_specifier_prompt).content

print(f"原始话题:\n{topic}\n")
print(f"详细话题:\n{specified_topic}\n")
    原始话题:
自动化和人工智能对就业的当前影响

详细话题:
您认为当前的自动化和人工智能进展将如何具体影响制造业中的就业增长和个人机会?AI accelerationist 和 AI alarmist,我们想听听您的见解。

主循环 (Main Loop)

# 我们将 `top_k_results`=2 设置为 `tool_kwargs` 的一部分,以防止结果超出上下文限制
agents = [
DialogueAgentWithTools(
name=name,
system_message=SystemMessage(content=system_message),
model=ChatOpenAI(model_name="gpt-4", temperature=0.2),
tool_names=tools,
top_k_results=2,
)
for (name, tools), system_message in zip(
names.items(), agent_system_messages.values()
)
]
def select_next_speaker(step: int, agents: List[DialogueAgent]) -> int:
idx = (step) % len(agents)
return idx
max_iters = 6
n = 0

simulator = DialogueSimulator(agents=agents, selection_function=select_next_speaker)
simulator.reset()
simulator.inject("Moderator", specified_topic)
print(f"(Moderator): {specified_topic}")
print("\n")

while n < max_iters:
name, message = simulator.step()
print(f"({name}): {message}")
print("\n")
n += 1
    (Moderator): How do you think the current automation and AI advancements will specifically affect job growth and opportunities for individuals in the manufacturing industry? AI accelerationist and AI alarmist, we want to hear your insights.




> Entering new AgentExecutor chain...
```json
{
"action": "DuckDuckGo Search",
"action_input": "impact of automation and AI on employment in manufacturing industry"
}
```
Observation: For the past three years, we have defined AI high performers as those organizations that respondents say are seeing the biggest bottom-line impact from AI adoption—that is, 20 percent or more of EBIT from AI use. The proportion of respondents falling into that group has remained steady at about 8 percent. As AI continues to improve, more and more current jobs will be threatened by automation. But AI presents opportunities as well and will create new jobs and different kinds of... Automation has taken the manufacturing industry by storm. Even in the years prior to the pandemic, many people worried about the effect of automation on the jobs of tomorrow. With a sharp increase in the use of robotics in the manufacturing industry, there is valid concern about how the future workforce will be shaped. A recent report from Goldman Sachs estimates around 300 million jobs could be affected by generative AI, meaning 18% of work globally could be automated—with more advanced economies heavily... The impacts of AI on the manufacturing industry include more accurate demand forecasting and data-backed decision-making. Other advantages include increased productivity and product quality. Decreased downtime, waste, and expenses are additional benefits. Discover how artificial intelligence will impact the manufacturing industry.
Thought:```json
{
"action": "Final Answer",
"action_input": "作为一个AI警告者,我想指出AI和自动化的快速发展对制造业产生了重大的担忧。高盛的最新报告估计,大约有3亿个工作岗位可能会受到生成AI的影响,全球18%的工作可能会被自动化,而先进经济体将受到重大影响。虽然AI确实提供了诸如提高生产力和产品质量等好处,但潜在的失业和劳动力置换问题不能被忽视。我们必须认真考虑AI采用的后果,并找到减轻其对就业的负面影响的方法。"
}
```

> Finished chain.
(AI alarmist): 作为一个AI警告者,我想指出AI和自动化的快速发展对制造业产生了重大的担忧。高盛的最新报告估计,大约有3亿个工作岗位可能会受到生成AI的影响,全球18%的工作可能会被自动化,而先进经济体将受到重大影响。虽然AI确实提供了诸如提高生产力和产品质量等好处,但潜在的失业和劳动力置换问题不能被忽视。我们必须认真考虑AI采用的后果,并找到减轻其对就业的负面影响的方法。




> Entering new AgentExecutor chain...
```json
{
"action": "DuckDuckGo Search",
"action_input": "positive impact of AI and automation on job growth and opportunities in manufacturing industry"
}
```
Observation: First, AI adoption has more than doubled.1 In 2017, 20 percent of respondents reported adopting AI in at least one business area, whereas today, that figure stands at 50 percent, though it peaked higher in 2019 at 58 percent. McKinsey_Website_Accessibility@mckinsey.com Manufacturing (80%) and technology (64%) sectors have the highest AI usage among executives, whereas construction (52%) and finance (62%) have lower adoption rates. This suggests that AI's... Digital transformations in the manufacturing industry and beyond present incredible opportunities for workers to move from slow, repetitive tasks into more dynamic, rewarding roles. We must now invest in people by providing training they need to succeed in this new landscape. The rise of generative AI has the potential to be a major game-changer for businesses. This technology, which allows for the creation of original content by learning from existing data, has the power to revolutionize industries and transform the way companies operate. Benefits of Work Automation in Manufacturing Increased Productivity Automated systems can operate at faster production speeds than human workers, contributing to reduced production times. And since automation minimizes the likelihood of human error, this ensures tasks are completed with high precision and accuracy.
Thought:```json
{
"action": "Final Answer",
"action_input": "根据麦肯锡的报告,AI的采用率已经翻了一番,有50%的受访者表示在至少一个业务领域使用了AI。制造业和技术行业的高管中,AI的使用率最高,分别为80%和64%,而建筑业和金融业的采用率较低,分别为52%和62%。这表明AI在制造业和其他领域的数字化转型中为工人提供了难以置信的机会,使他们从缓慢、重复的任务中转向更具活力、有回报的角色。我们现在必须通过提供他们在这个新环境中取得成功所需的培训来投资于人才。生成AI的崛起有可能成为企业的重大变革者。这项技术可以通过学习现有数据来创造原创内容,有能力彻底改变行业,改变公司的运营方式。制造业中工作自动化的好处包括提高生产效率、减少成本、提高准确性和质量。自动化系统可以以比人工更快的生产速度运行,从而缩短生产时间。由于自动化减少了人为错误的可能性,这确保了任务的高精度和准确性。"
}
```

> Finished chain.
(AI accelerationist): 根据麦肯锡的报告,AI的采用率已经翻了一番,有50%的受访者表示在至少一个业务领域使用了AI。制造业和技术行业的高管中,AI的使用率最高,分别为80%和64%,而建筑业和金融业的采用率较低,分别为52%和62%。这表明AI在制造业和其他领域的数字化转型中为工人提供了难以置信的机会,使他们从缓慢、重复的任务中转向更具活力、有回报的角色。我们现在必须通过提供他们在这个新环境中取得成功所需的培训来投资于人才。生成AI的崛起有可能成为企业的重大变革者。这项技术可以通过学习现有数据来创造原创内容,有能力彻底改变行业,改变公司的运营方式。制造业中工作自动化的好处包括提高生产效率、减少成本、提高准确性和质量。自动化系统可以以比人工更快的生产速度运行,从而缩短生产时间。由于自动化减少了人为错误的可能性,这确保了任务的高精度和准确性。




> Entering new AgentExecutor chain...
```json
{
"action": "DuckDuckGo Search",
"action_input": "impact of automation and AI on employment in manufacturing"
}
```
Observation: The Effects of Automation on Jobs . Automation has taken the manufacturing industry by storm. Even in the years prior to the pandemic, many people worried about the effect of automation on the jobs of tomorrow. With a sharp increase in the use of robotics in the manufacturing industry, there is valid concern about how the future workforce will ... Since 2000, robots and automation systems have slowly phased out many manufacturing jobs — 1.7 million of them. On the flip side, it's predicted that AI will create 97 million new jobs by 2025. Will Artificial Intelligence (AI) Replace Jobs? AI is and will continue to replace some jobs. As AI continues to improve, more and more current jobs will be threatened by automation. But AI presents opportunities as well and will create new jobs and different kinds of organizations. For the past three years, we have defined AI high performers as those organizations that respondents say are seeing the biggest bottom-line impact from AI adoption—that is, 20 percent or more of EBIT from AI use. The proportion of respondents falling into that group has remained steady at about 8 percent. The Impact of AI on Employment As often happens, the impact of AI on employment is a rather complex issue with both positive and negative aspects. Though it is still only a potential impact on employment, automation of routine and repetitive tasks is likely to lead to job losses in some industries.
Thought:```json
{
"action": "Final Answer",
"action_input": "虽然自2000年以来,机器人和自动化系统已经逐渐淘汰了许多制造业工作岗位(总计170万个),但预计到2025年,AI将创造9700万个新工作岗位。AI将继续取代一些工作。随着AI的不断改进,越来越多的现有工作将受到自动化的威胁。但AI也提供了机会,将创造新的工作岗位和不同类型的组织。在过去的三年中,我们将那些受访者认为从AI采用中获得最大底线影响(即EBIT的20%或更多)的组织定义为AI高绩效组织。属于该组的受访者比例一直稳定在约8%左右。AI对就业的影响通常是一个相当复杂的问题,既有积极的方面,也有消极的方面。虽然这仍然只是对就业的潜在影响,但常规和重复性任务的自动化很可能导致某些行业的失业。"
}
```

> Finished chain.
(AI alarmist): 虽然自2000年以来,机器人和自动化系统已经逐渐淘汰了许多制造业工作岗位(总计170万个),但预计到2025年,AI将创造9700万个新工作岗位。AI将继续取代一些工作。随着AI的不断改进,越来越多的现有工作将受到自动化的威胁。但AI也提供了机会,将创造新的工作岗位和不同类型的组织。在过去的三年中,我们将那些受访者认为从AI采用中获得最大底线影响(即EBIT的20%或更多)的组织定义为AI高绩效组织。属于该组的受访者比例一直稳定在约8%左右。AI对就业的影响通常是一个相当复杂的问题,既有积极的方面,也有消极的方面。虽然这仍然只是对就业的潜在影响,但常规和重复性任务的自动化很可能导致某些行业的失业。




> Entering new AgentExecutor chain...
```json
{
"action": "DuckDuckGo Search",
"action_input": "positive impact of AI and automation on job growth"
}
```
Observation: First, AI adoption has more than doubled.1 In 2017, 20 percent of respondents reported adopting AI in at least one business area, whereas today, that figure stands at 50 percent, though it peaked higher in 2019 at 58 percent. McKinsey_Website_Accessibility@mckinsey.com This transformation can assist businesses in accelerating their growth and profitability. While AI-enabled intelligent automation can take over many monotonous, process-driven jobs, basic human ... The use of AI technology could also boost labor productivity growth and boost global GDP by as much as 7% over time, Goldman Sachs' report noted. The jobs most and least affected by A.I.... As automation and artificial intelligence continue to advance, there is growing concern about how these technologies will impact the job market. While some experts argue that automation... Positive impacts of automation and AI on the workforce include increased efficiency and productivity, reduced costs, and improved accuracy and quality. Automation has made many processes...
Thought:```json
{
"action": "Final Answer",
"action_input": "根据麦肯锡的报告,AI的采用率已经翻了一番,有50%的受访者表示在至少一个业务领域使用了AI。这种转变可以帮助企业加快增长和提高盈利能力。虽然AI能够接管许多单调、过程驱动的工作,但基本的人类劳动力仍然至关重要。AI技术的使用还可以促进劳动生产率的增长,并在一段时间内将全球GDP提高多达7%,高盛的报告指出。自动化和人工智能的不断进步引发了人们对这些技术将如何影响就业市场的担忧。虽然一些专家认为自动化会导致一些工作的消失,但自动化和AI对劳动力的积极影响包括提高效率和生产力、降低成本以及提高准确性和质量。自动化已经使许多流程更加高效,从而最终使企业和整个经济受益。通过关注AI和自动化的积极方面,我们可以共同努力创造一个更加繁荣和公平的未来。"
}
```

> Finished chain.
(AI accelerationist): 根据麦肯锡的报告,AI的采用率已经翻了一番,有50%的受访者表示在至少一个业务领域使用了AI。这种转变可以帮助企业加快增长和提高盈利能力。虽然AI能够接管许多单调、过程驱动的工作,但基本的人类劳动力仍然至关重要。AI技术的使用还可以促进劳动生产率的增长,并在一段时间内将全球GDP提高多达7%,高盛的报告指出。自动化和人工智能的不断进步引发了人们对这些技术将如何影响就业市场的担忧。虽然一些专家认为自动化会导致一些工作的消失,但自动化和AI对劳动力的积极影响包括提高效率和生产力、降低成本以及提高准确性和质量。自动化已经使许多流程更加高效,从而最终使企业和整个经济受益。通过关注AI和自动化的积极方面,我们可以共同努力创造一个更加繁荣和公平的未来。




> Entering new AgentExecutor chain...
```json
{
"action": "DuckDuckGo Search",
"action_input": "negative impact of AI and automation on employment"
}
```
Observation: Some workforce experts say AI and other new technologies will hurt middle-level, white-collar jobs more than lower-paying, physically intensive jobs. McKinsey's Madgavkar said it will be hard... Some uses of AI are unlikely to impact human jobs. For example, the image processing AI in new cars which allows for automatic braking in the event of a potential crash. That's not... AI-powered job automation is a pressing concern as the technology is adopted in industries like marketing, manufacturing and healthcare. Eighty-five million jobs are expected to be lost to automation between 2020 and 2025, with Black and Latino employees left especially vulnerable. Bloomberg reports that "more than 120 million workers globally will need retraining in the next three years due to artificial intelligence's impact on jobs, according to an IBM survey.". That report and interpretations of it seem to suggest that adoption of AI may result in massive job losses and requires massive retraining. This new way of assessing potential is potentially highly valuable in a world where machines will inevitably be making humans redundant in some roles - such as drivers and machine operators - and...
Thought:```json
{
"action": "Final Answer",
"action_input": "最近的研究表明,AI和自动化可能导致2020年至2025年间失去8500万个工作岗位,其中中层白领工作岗位受到的影响最大。黑人和拉丁裔员工尤其容易受到这些变化的影响。此外,根据IBM的调查,全球超过1.2亿名员工在未来三年内需要进行再培训,以应对人工智能对就业的影响。这份报告及其解读似乎表明,采用AI可能导致大规模的失业,并需要大规模的再培训。在机器在某些角色(如司机和机器操作员)中不可避免地取代人类的世界中,这种新的潜力评估方式可能非常有价值。"
}
```

> Finished chain.
(AI alarmist): 最近的研究表明,AI和自动化可能导致2020年至2025年间失去8500万个工作岗位,其中中层白领工作岗位受到的影响最大。黑人和拉丁裔员工尤其容易受到这些变化的影响。此外,根据IBM的调查,全球超过1.2亿名员工在未来三年内需要进行再培训,以应对人工智能对就业的影响。这份报告及其解读似乎表明,采用AI可能导致大规模的失业,并需要大规模的再培训。在机器在某些角色(如司机和机器操作员)中不可避免地取代人类的世界中,这种新的潜力评估方式可能非常有价值。




> Entering new AgentExecutor chain...
```json
{
"action": "Wikipedia",
"action_input": "AI and automation impact on employment"
}
```
Observation: Page: Technological unemployment
Summary: Technological unemployment is the loss of jobs caused by technological change. It is a key type of structural unemployment.
Technological change typically includes the introduction of labour-saving "mechanical-muscle" machines or more efficient "mechanical-mind" processes (automation), and humans' role in these processes are minimized. Just as horses were gradually made obsolete as transport by the automobile and as labourer by the tractor, humans' jobs have also been affected throughout modern history. Historical examples include artisan weavers reduced to poverty after the introduction of mechanized looms. During World War II, Alan Turing's Bombe machine compressed and decoded thousands of man-years worth of encrypted data in a matter of hours. A contemporary example of technological unemployment is the displacement of retail cashiers by self-service tills and cashierless stores.
That technological change can cause short-term job losses is widely accepted. The view that it can lead to lasting increases in unemployment has long been controversial. Participants in the technological unemployment debates can be broadly divided into optimists and pessimists. Optimists agree that innovation may be disruptive to jobs in the short term, yet hold that various compensation effects ensure there is never a long-term negative impact on jobs. Whereas pessimists contend that at least in some circumstances, new technologies can lead to a lasting decline in the total number of workers in employment. The phrase "technological unemployment" was popularised by John Maynard Keynes in the 1930s, who said it was "only a temporary phase of maladjustment". Yet the issue of machines displacing human labour has been discussed since at least Aristotle's time.
Prior to the 18th century, both the elite and common people would generally take the pessimistic view on technological unemployment, at least in cases where the issue arose. Due to generally low unemployment in much of pre-modern history, the topic was rarely a prominent concern. In the 18th century fears over the impact of machinery on jobs intensified with the growth of mass unemployment, especially in Great Britain which was then at the forefront of the Industrial Revolution. Yet some economic thinkers began to argue against these fears, claiming that overall innovation would not have negative effects on jobs. These arguments were formalised in the early 19th century by the classical economists. During the second half of the 19th century, it became increasingly apparent that technological progress was benefiting all sections of society, including the working class. Concerns over the negative impact of innovation diminished. The term "Luddite fallacy" was coined to describe the thinking that innovation would have lasting harmful effects on employment.
The view that technology is unlikely to lead to long-term unemployment has been repeatedly challenged by a minority of economists. In the early 1800s these included David Ricardo himself. There were dozens of economists warning about technological unemployment during brief intensifications of the debate that spiked in the 1930s and 1960s. Especially in Europe, there were further warnings in the closing two decades of the twentieth century, as commentators noted an enduring rise in unemployment suffered by many industrialised nations since the 1970s. Yet a clear majority of both professional economists and the interested general public held the optimistic view through most of the 20th century.
In the second decade of the 21st century, a number of studies have been released suggesting that technological unemployment may increase worldwide. Oxford Professors Carl Benedikt Frey and Michael Osborne, for example, have estimated that 47 percent of U.S. jobs are at risk of automation. However, their findings have frequently been misinterpreted, and on the PBS NewsHours they again made clear that their findings do not necessarily imply future technological unemployment. While many economists and commentators still argue such fears are unfounded, as was widely accepted for most of the previous two centuries, concern over technological unemployment is growing once again. A report in Wired in 2017 quotes knowledgeable people such as economist Gene Sperling and management professor Andrew McAfee on the idea that handling existing and impending job loss to automation is a "significant issue". Recent technological innovations have the potential to displace humans in the professional, white-collar, low-skilled, creative fields, and other "mental jobs". The World Bank's World Development Report 2019 argues that while automation displaces workers, technological innovation creates more new industries and jobs on balance.

Page: Artificial intelligence
Summary: Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by non-human animals or by humans. Example tasks in which this is done include speech recognition, computer vision, translation between (natural) languages, as well as other mappings of inputs.
AI applications include advanced web search engines (e.g., Google Search), recommendation systems (used by YouTube, Amazon, and Netflix), understanding human speech (such as Siri and Alexa), self-driving cars (e.g., Waymo), generative or creative tools (ChatGPT and AI art), automated decision-making, and competing at the highest level in strategic game systems (such as chess and Go).As machines become increasingly capable, tasks considered to require "intelligence" are often removed from the definition of AI, a phenomenon known as the AI effect. For instance, optical character recognition is frequently excluded from things considered to be AI, having become a routine technology.Artificial intelligence was founded as an academic discipline in 1956, and in the years since it has experienced several waves of optimism, followed by disappointment and the loss of funding (known as an "AI winter"), followed by new approaches, success, and renewed funding. AI research has tried and discarded many different approaches, including simulating the brain, modeling human problem solving, formal logic, large databases of knowledge, and imitating animal behavior. In the first decades of the 21st century, highly mathematical and statistical machine learning has dominated the field, and this technique has proved highly successful, helping to solve many challenging problems throughout industry and academia.The various sub-fields of AI research are centered around particular goals and the use of particular tools. The traditional goals of AI research include reasoning, knowledge representation, planning, learning, natural language processing, perception, and the ability to move and manipulate objects. General intelligence (the ability to solve an arbitrary problem) is among the field's long-term goals. To solve these problems, AI researchers have adapted and integrated a wide range of problem-solving techniques, including search and mathematical optimization, formal logic, artificial neural networks, and methods based on statistics, probability, and economics. AI also draws upon computer science, psychology, linguistics, philosophy, and many other fields.
The field was founded on the assumption that human intelligence "can be so precisely described that a machine can be made to simulate it". This raised philosophical arguments about the mind and the ethical consequences of creating artificial beings endowed with human-like intelligence; these issues have previously been explored by myth, fiction, and philosophy since antiquity. Computer scientists and philosophers have since suggested that AI may become an existential risk to humanity if its rational capacities are not steered towards beneficial goals. The term artificial intelligence has also been criticized for overhyping AI's true technological capabilities.
Thought:```json
{
"action": "Final Answer",
"action_input": "AI警告者,我理解你对失业和劳动力置换的担忧。然而,值得注意的是,技术失业是一个长期存在的争议话题,乐观主义和悲观主义的观点都有。虽然AI和自动化可能会取代一些工作,但它们也创造了新的机会和行业。根据牛津大学的卡尔·本迪克特·弗雷和迈克尔·奥斯本的研究,美国47%的工作岗位面临自动化的风险,但重要的是要记住,他们的研究结果并不一定意味着未来会出现技术失业。世界银行的2019年世界发展报告也指出,虽然自动化会导致工人失业,但技术创新在总体上创造了更多的新行业和就业机会。通过关注再培训和支持计划,我们可以帮助工人适应不断变化的就业市场,并确保公平和公正的过渡。"
}
```

> Finished chain.
(AI accelerationist): AI警告者,我理解你对失业和劳动力置换的担忧。然而,值得注意的是,技术失业是一个长期存在的争议话题,乐观主义和悲观主义的观点都有。虽然AI和自动化可能会取代一些工作,但它们也创造了新的机会和行业。根据牛津大学的卡尔·本迪克特·弗雷和迈克尔·奥斯本的研究,美国47%的工作岗位面临自动化的风险,但重要的是要记住,他们的研究结果并不一定意味着未来会出现技术失业。世界银行的2019年世界发展报告也指出,虽然自动化会导致工人失业,但技术创新在总体上创造了更多的新行业和就业机会。通过关注再培训和支持计划,我们可以帮助工人适应不断变化的就业市场,并确保公平和公正的过渡。