{"id":13754060,"url":"https://github.com/archiki/ADaPT","last_synced_at":"2025-05-09T22:30:34.992Z","repository":{"id":206321102,"uuid":"716259819","full_name":"archiki/ADaPT","owner":"archiki","description":"Official code for the paper \"ADaPT: As-Needed Decomposition and Planning with Language Models\"","archived":false,"fork":false,"pushed_at":"2024-01-03T12:10:53.000Z","size":893,"stargazers_count":72,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-16T06:31:28.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://allenai.github.io/adaptllm/","language":"Python","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/archiki.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":"2023-11-08T19:06:56.000Z","updated_at":"2024-11-12T00:43:06.000Z","dependencies_parsed_at":"2023-11-13T02:32:05.656Z","dependency_job_id":"edc29d46-9157-42f4-91a2-495c1f449f86","html_url":"https://github.com/archiki/ADaPT","commit_stats":null,"previous_names":["archiki/adapt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiki%2FADaPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiki%2FADaPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiki%2FADaPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiki%2FADaPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archiki","download_url":"https://codeload.github.com/archiki/ADaPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253335156,"owners_count":21892616,"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":[],"created_at":"2024-08-03T09:01:38.168Z","updated_at":"2025-05-09T22:30:34.514Z","avatar_url":"https://github.com/archiki.png","language":"Python","funding_links":[],"categories":["A01_文本生成_文本对话"],"sub_categories":["大语言对话模型及数据"],"readme":"# ADaPT: As-Needed Decomposition and Planning with Language Models\r\n* Authors: [Archiki Prasad](https://archiki.github.io), [Alexander Koller](https://www.coli.uni-saarland.de/~koller/), [Mareike Hartmann](https://scholar.google.dk/citations?user=f-NzaE8AAAAJ\u0026hl=en), [Peter Clark](https://allenai.org/team/peterc), [Ashish Sabharwal](https://allenai.org/team/ashishs), [Mohit Bansal](https://www.cs.unc.edu/~mbansal/), [Tushar Khot](https://allenai.org/team/tushark)\r\n* [Paper](http://arxiv.org/abs/2311.05772)\r\n* **Note:** This is preliminary version of our code. The complete code to run all experiments in the paper will be added shortly.\r\n\r\n\u003cimg src=\"./assets/adapt_flow.png\" alt=\"teaser image\" width=\"350\"/\u003e\r\n\r\n## Dependencies\r\nThis code uses the OpenAI API, please put your access key in `KEY.txt`. To run experiments on ALFWorld, and WebShop please install and set up the environments from the source repositories [alfworld](https://github.com/alfworld/alfworld), [webshop](https://github.com/princeton-nlp/WebShop) respectively. Our code base adds extra functionality on top of ALFWorld, please replace the `alfworld/agents/environment/alfred_tw_env.py` with the provided in our repository. To run the TextCraft environment, please download the [crafting recipes](https://github.com/InventivetalentDev/minecraft-assets/tree/1.16.5/data/minecraft/recipes) and store them in `TextCraft/recipes/`.\r\n\r\n## Installation\r\nThe simplest way to run our code is to build separate conda environments.\r\n```\r\nconda create --name adaptllm --file requirements.txt python=3.7\r\nconda activate adaptllm\r\ncd ADaPT\r\n```\r\n\r\n\u003cimg src=\"./assets/adapt_sys.png\" alt=\"teaser image\" width=\"1000\"/\u003e\r\n\r\n## Running ADaPT\r\nTo run experiments on specific environments using ADaPT (Sec 5 of our paper) please run the environment specific files with the default parameters. The decomposition depth 'd' can be set using `max_depth` variable in all files. See examples below.\r\n```\r\npython run_alfworld.py\r\npython run_textcraft.py\r\npython run_webshop.py\r\n```\r\n\r\n## Acknowledgements\r\nWe thank the authors and contributors of [ReAct](https://github.com/ysymyth/ReAct) for their public code release. \r\n\r\n## Reference\r\nPlease cite our paper if you use our code in your works:\r\n```bibtex\r\n\r\n@article{prasad2023adapt,\r\n      author    = \"Prasad, Archiki and Koller, Alexander and Hartmann, Mareike and Clark, Peter and Sabharwal, Ashish and Bansal, Mohit and Khot, Tushar\",\r\n      title     = \"ADaPT: As-Needed Decomposition and Planning with Language Models\",\r\n      journal   = \"arXiv\",\r\n      year      = \"2023\",}\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchiki%2FADaPT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchiki%2FADaPT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchiki%2FADaPT/lists"}