Happy Open Access Week from arXiv!

YOU make open access possible! Tell us why you support #openaccess and give to arXiv this week to help keep science open for all.

We gratefully acknowledge support from the Simons Foundation, member institutions , and all contributors. Donate [Submitted on 6 Oct 2022 ( v1 ), last revised 10 Mar 2023 (this version, v3)]

Title: ReAct: Synergizing Reasoning and Acting in Language Models

View PDF Abstract: While large language models (LLMs) have demonstrated impressive capabilities across tasks in language understanding and interactive decision making, their abilities for reasoning (e.g. chain-of-thought prompting) and acting (e.g. action plan generation) have primarily been studied as separate topics. In this paper, we explore the use of LLMs to generate both reasoning traces and task-specific actions in an interleaved manner, allowing for greater synergy between the two: reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information. We apply our approach, named ReAct, to a diverse set of language and decision making tasks and demonstrate its effectiveness over state-of-the-art baselines, as well as improved human interpretability and trustworthiness over methods without reasoning or acting components. Concretely, on question answering (HotpotQA) and fact verification (Fever), ReAct overcomes issues of hallucination and error propagation prevalent in chain-of-thought reasoning by interacting with a simple Wikipedia API, and generates human-like task-solving trajectories that are more interpretable than baselines without reasoning traces. On two interactive decision making benchmarks (ALFWorld and WebShop), ReAct outperforms imitation and reinforcement learning methods by an absolute success rate of 34% and 10% respectively, while being prompted with only one or two in-context examples. Project site with code: this https URL Comments: v3 is the ICLR camera ready version with some typos fixed. Project site with code: this https URL Subjects: Computation and Language (cs.CL) ; Artificial Intelligence (cs.AI); Machine Learning (cs.LG) Cite as: arXiv:2210.03629 [cs.CL] arXiv:2210.03629v3 [cs.CL] for this version)

Submission history

From: Shunyu Yao [ view email ]
[v1] Thu, 6 Oct 2022 01:00:32 UTC (538 KB)
Sun, 27 Nov 2022 22:55:54 UTC (538 KB)
Fri, 10 Mar 2023 01:00:17 UTC (1,256 KB)

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .