---
title: "ReAct"
type: "tool"
slug: "ysymyth-react"
canonical_url: "https://www.graphcanon.com/tools/ysymyth-react"
github_url: "https://github.com/ysymyth/ReAct"
homepage_url: null
stars: 4032
forks: 385
primary_language: "Jupyter Notebook"
license: "MIT"
categories: ["llm-frameworks", "ai-agents"]
tags: ["llm", "reasoning", "large-language-models", "decision-making", "prompting"]
updated_at: "2026-07-07T20:00:39.992068+00:00"
---

# ReAct

> [ICRL 2023] Repository for ReAct: Synergizing Reasoning and Acting in Language Models

Jupyter Notebook-based project that explores the integration of reasoning and acting capabilities within large language models, particularly GPT-3. It involves experimenting with specific tasks from datasets like HotpotQA, FEVER, AlfWorld, and WebShop.

## Facts

- Repository: https://github.com/ysymyth/ReAct
- Stars: 4,032 · Forks: 385 · Open issues: 5 · Watchers: 20
- Primary language: Jupyter Notebook
- License: MIT
- Last pushed: 2024-02-06T02:34:32+00:00

## Categories

- [LLM Frameworks](/categories/llm-frameworks.md)
- [AI Agents](/categories/ai-agents.md)

## Tags

llm, reasoning, large-language-models, decision-making, prompting

## Related tools

- [ECC](/tools/affaan-m-ecc.md) - The agent harness performance optimization system (★ 226,991)
- [hermes-agent](/tools/nousresearch-hermes-agent.md) - The self-improving AI agent built by Nous Research (★ 210,911)
- [AutoGPT](/tools/significant-gravitas-autogpt.md) - AutoGPT: Build, Deploy, and Run AI Agents (★ 185,420)
- [ollama](/tools/ollama-ollama.md) - Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models. (★ 175,664)
- [prompts.chat](/tools/f-prompts-chat.md) - The world's largest open-source prompt library for AI (★ 165,025)
- [transformers](/tools/huggingface-transformers.md) - 🤗 Transformers: the model-definition framework for state-of-the-art machine learning models (★ 162,350)
- [langflow](/tools/langflow-ai-langflow.md) - Langflow is a powerful platform for building and deploying AI-powered agents and workflows. (★ 151,311)
- [dify](/tools/langgenius-dify.md) - Production-ready platform for agentic workflow development (★ 148,074)

## README (excerpt)

```text
# ReAct Prompting

GPT-3 prompting code for ICLR 2023 paper [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629).

To use ReAct for more tasks, consider trying [LangChain's zero-shot ReAct Agent](https://python.langchain.com/docs/modules/agents/agent_types/react.html).

## Setup
You need to first have an OpenAI API key and store it in the environment variable ``OPENAI_API_KEY`` (see [here](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety)).

Package requirement: ``openai``, and install ``alfworld`` following instructions [here](https://github.com/alfworld/alfworld).

## Experiments
Run ``{hotpotqa,fever,alfworld,webshop}.ipynb``. As HotpotQA and FEVER have large validation sets, we only run 500 random examples (see notebooks). We find PaLM and GPT-3 are better at different tasks.


|                    | HotpotQA (500 random dev, EM) | FEVER (500 random dev, EM) | AlfWorld (success rate) | WebShop  (success rate) |
|--------------------|-------------------------------|----------------------------|-------------------------|-------------------------|
| PaLM-540B (paper)  | 29.4                          | 62.2                       | 70.9                    | 40                      |
| GPT-3 (davinci-002) | 30.4                          | 54                         | 78.4                    | 35.8                    |

## Citation

```bibtex
@inproceedings{yao2023react,
  title = {{ReAct}: Synergizing Reasoning and Acting in Language Models},
  author = {Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},
  booktitle = {International Conference on Learning Representations (ICLR) },
  year = {2023},
  html = {https://arxiv.org/abs/2210.03629},
}
```
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/ysymyth-react`](/api/graphcanon/tools/ysymyth-react)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
