HackerPapers

arXiv:2210.03629cs.CL

ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao

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: https://react-lm.github.io

arXiv comments
v3 is the ICLR camera ready version with some typos fixed. Project site with code: https://react-lm.github.io
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 19 identifiable commenters in 22 comments across 21 threads, from Mar 2023 to Sep 2026. Found in 6 HN submissions from Jan 2023 to Feb 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments21 threads

    • he's just talking about going from ReAct [1] to Ratchet [2]. It's largely understood in all tooling (langraph, workflows/goal, honcho, bot mode etc.). [1] https://arxiv.org/abs/2210.03629 [2] https://arxiv.org/abs/2605.22148

      elijView on HNParent context

    • I'd credit tool calling to the ReAct paper, which was Princeton CA and Google DeepMind: https://arxiv.org/abs/2210.03629

      simonwView on HNParent context

  1. Hierarchical Reasoning Model 1 comment
    • Is this not a variation of ReAct + Chain-of-Thought + Structured Planning? Or is that too unfair to the authors work? [1] - https://arxiv.org/abs/2210.03629

      belterView on HNParent context

    • The LLM is what decides which endpoint/tool to call (or none at all) in response to the user input. The original 2022 ReACT paper is still best explainer: https://arxiv.org/abs/2210.03629

      minimaxirView on HNParent context

    • For anyone like me that wondered if "ReAct webapp" was a weird way of capitalizing the React webapp Javascript framework, it appears to be about a Reasoning and Acting methodology[0] with LLMs. Maybe obvious for anyone with more of a pulse on the latest in the LLM space, but it…

      brianshalerView on HNParent context

    • I think you're 100% on the right track here. The key is memory, loops, and maybe a few other things like external interfaces which are just plain code and not deep learning voodoo. Many things do indeed run LLM's in a loop and attach external sources. See for example AutoGPT…

      unotiView on HNParent context

    • I've been frustrated by the fact that people still believe that python is some sort of magical default to build LLM apps. It's not. English is the new programming language. White paper for reference: https://arxiv.org/abs/2210.03629 Notice how the prompt used in Langchain…

      thedayisntgrayView on HNParent context

  2. Langchain Is Pointless 1 comment
    • Chain of thought: https://arxiv.org/abs/2201.11903 ReAct: https://arxiv.org/abs/2210.03629 Reflexion: https://arxiv.org/abs/2303.11366 Tree of thoughts: https://arxiv.org/abs/2305.10601 Good video on "Tree of thoughts" which also reviews / puts it in the context of other…

      krychuView on HNParent context

    • >GPT cannot function in any environment on its own. Except in response to a direct instruction it cannot plan, it cannot take action, it cannot learn, it cannot adjust to changing circumstance. Sure it can. It's not default behavior sure but it's fairly trivial to set up, just…

      famouswafflesView on HNParent context

  3. Tree of Thoughts 1 comment
    • Note that the repo author != the paper author. The research itself [1] seems legit. The paper author also wrote a paper called ReAct [2], which is one of the core components of the langchain framework. * [1] https://arxiv.org/abs/2305.10601 * [2] https://arxiv.org/abs/2210.03629

      flakinessView on HNParent context

    • It's problematic for the same reason other injection attacks are. It allows an attacker to get their "code" running in what should be a privileged environment you control. In this case, the "code" is a natural language prompt, but the principle applies. Think about what would…

      VeenView on HNParent context

    • Yes- being able to reflect on its own thoughts. You could argue being able to observe and think about what was just said aligns with ReAct (https://arxiv.org/pdf/2210.03629.pdf) - maybe a tweak to directly assessing a previous thought, and modifying output / thought process…

      jasonjmcgheeView on HNParent context

    • A lot of this can be solved by using clever prompting and allowing the LLM to use external tools - see the ReAct paper https://arxiv.org/abs/2210.03629 I believe OpenAI is going to introduce this to ChatGPT soon as they launch the plugin system.

      1023bytesView on HNParent context

    • There is ongoing promising work that shows this can be improved a lot: https://arxiv.org/abs/2210.03629

      senkoView on HNParent context

    • Cool stuff. I think agents are the most promising and potentially revolutionary part of the current LLM developments. Moreover, they're quite easy to write yourself, you don't need something like Langchain, the prompt structure is simple and it's a bit of text templating (it's…

      cube2222View on HNParent context

    • Hey HN! My brother Arctic_fly and I spent the last two weeks since the GPT-4 launch building Taxy, an open source Chrome extension that lets you automate arbitrary tasks in your browser using GPT-4. You can see a few demos in the Github README, but basically it works like this…

      kcorbittView on HNParent context

  4. GPT-4 1 comment
    • LLMs will eventually make a lot of simpler machine-learning models obsolete. Imagine feeding a prompt akin to the one below to GPT5, GPT6, etc.: prompt = f"The guidelines for recommending products are: {guidelines}. The following recommendations led to incremental sales…

      cs702View on HNParent context

    • > Is there any evidence or reason to suspect that this would result in the desired effect? Yes. There's evidence that you can get these models to write chain-of-thought explanations that are consistent with the instructions in the given text. For example, take a look at the…

      cs702View on HNParent context

    • There's evidence that you can get LLMs to write chain-of-thought explanations that are consistent with the instructions in the given text, including quantitative data, cohort performance, governance imperatives, qualitative considerations, etc. The models can even be given…

      cs702View on HNParent context

  5. Visual ChatGPT 1 comment
    • This feels like it owes more to LangChain than a link at the bottom of the page. Compare their prompt: https://github.com/microsoft/visual-chatgpt/blob/main/visual... With that of the LangChain ReAct conversational agent…

      iandanforthView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.