{"id":13754135,"url":"https://github.com/ysymyth/ReAct","last_synced_at":"2025-05-09T22:31:09.110Z","repository":{"id":65755592,"uuid":"565563619","full_name":"ysymyth/ReAct","owner":"ysymyth","description":"[ICLR 2023] ReAct: Synergizing Reasoning and Acting in Language Models","archived":false,"fork":false,"pushed_at":"2024-02-06T02:34:32.000Z","size":6459,"stargazers_count":1957,"open_issues_count":3,"forks_count":195,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-05T03:51:38.527Z","etag":null,"topics":["decision-making","large-language-models","llm","prompting","reasoning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysymyth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-13T19:51:09.000Z","updated_at":"2024-11-04T17:17:22.000Z","dependencies_parsed_at":"2024-08-03T09:17:17.014Z","dependency_job_id":null,"html_url":"https://github.com/ysymyth/ReAct","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysymyth%2FReAct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysymyth%2FReAct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysymyth%2FReAct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysymyth%2FReAct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysymyth","download_url":"https://codeload.github.com/ysymyth/ReAct/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224884612,"owners_count":17386121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decision-making","large-language-models","llm","prompting","reasoning"],"created_at":"2024-08-03T09:01:41.882Z","updated_at":"2024-11-16T06:31:43.502Z","avatar_url":"https://github.com/ysymyth.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","A01_文本生成_文本对话","largemodel","2. Long-CoT的能力介绍","🛠️ Libraries \u0026 Implementations","Papers","🛠 Open-Source Tools"],"sub_categories":["大语言对话模型及数据","2.2 适度反思（Feasible Reflection）","Generic Agentic Workflows"],"readme":"# 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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysymyth%2FReAct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysymyth%2FReAct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysymyth%2FReAct/lists"}