{"data":{"slug":"ysymyth-react","name":"ReAct","tagline":"ReAct Prompting for decision-making with language models","github_url":"https://github.com/ysymyth/ReAct","owner":"ysymyth","repo":"ReAct","owner_avatar_url":"https://avatars.githubusercontent.com/u/4877252?v=4","primary_language":"Jupyter Notebook","stars":4109,"forks":396,"topics":["decision-making","large-language-models","llm","prompting","reasoning"],"archived":false,"github_pushed_at":"2024-02-06T02:34:32+00:00","maintenance_label":"Dormant","stars_delta_30d":50,"url":"https://www.graphcanon.com/tools/ysymyth-react","markdown_url":"https://www.graphcanon.com/tools/ysymyth-react.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/ysymyth-react","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=ysymyth-react","description":"[ICLR 2023] ReAct: Synergizing Reasoning and Acting in Language Models","homepage_url":null,"license":"MIT","open_issues":5,"watchers":20,"ai_summary":"A repository containing GPT-3 prompting code for the ReAct method that enhances reasoning and action in large language models through specified tasks such as HotpotQA, FEVER, AlfWorld, and WebShop.","readme_excerpt":"# ReAct Prompting\n\nGPT-3 prompting code for ICLR 2023 paper [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629).\n\nTo use ReAct for more tasks, consider trying [LangChain's zero-shot ReAct Agent](https://python.langchain.com/docs/modules/agents/agent_types/react.html).\n\n## Setup\nYou 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)).\n\nPackage requirement: ``openai``, and install ``alfworld`` following instructions [here](https://github.com/alfworld/alfworld).\n\n## Experiments\nRun ``{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.\n\n\n|                    | HotpotQA (500 random dev, EM) | FEVER (500 random dev, EM) | AlfWorld (success rate) | WebShop  (success rate) |\n|--------------------|-------------------------------|----------------------------|-------------------------|-------------------------|\n| PaLM-540B (paper)  | 29.4                          | 62.2                       | 70.9                    | 40                      |\n| GPT-3 (davinci-002) | 30.4                          | 54                         | 78.4                    | 35.8                    |\n\n## Citation\n\n```bibtex\n@inproceedings{yao2023react,\n  title = {{ReAct}: Synergizing Reasoning and Acting in Language Models},\n  author = {Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},\n  booktitle = {International Conference on Learning Representations (ICLR) },\n  year = {2023},\n  html = {https://arxiv.org/abs/2210.03629},\n}\n```","github_created_at":"2022-11-13T19:51:09+00:00","created_at":"2026-07-07T17:35:35.272162+00:00","updated_at":"2026-08-17T18:01:41.659486+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"decision-making","name":"decision-making"},{"slug":"large-language-models","name":"large language models"},{"slug":"llm","name":"llm"},{"slug":"prompting","name":"prompting"},{"slug":"reasoning","name":"reasoning"}],"trust":{"provenance":{"is_fork":false,"github_id":565563619,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-17T18:01:39.204Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":923,"last_release_at":null,"stars_delta_30d":50,"open_issues_delta_30d":0},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:05:43.356Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-08-17T18:01:40.603Z"},"languages":{"value":["jupyter notebook"],"source":"github.language","observed_at":"2026-08-17T18:01:40.603Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-17T18:01:40.603Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["When aiming for better decision-making in HotpotQA, alfworld environments, or WebShop scenarios with GPT-3","For projects that benefit from detailed action-reasoning sequences as seen in AlfWorld success rates"],"when_not_to_use":["If requiring extensive custom task integration beyond provided notebooks, LangChain's zero-shot ReAct agent may be more preferable","When PaLM outperforms GPT-3 on specific tasks or if an alternative model is preferred"],"source":"enrich:decision_facts","observed_at":"2026-07-14T19:08:07.467Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"ReAct enhances large language models by improving reasoning and executing actions through specific tasks using GPT-3."}]}}