{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/empowering-large-language-model-agents","title":"Empowering Large Language Model Agents through Action Learning","arxiv_id":"2402.15809","date":"2024-02-24","proceeding":null,"authors":["Haiteng Zhao","Chang Ma","Guoyin Wang","Jing Su","Lingpeng Kong","Jingjing Xu","Zhi-Hong Deng","Hongxia Yang"],"abstract":"Large Language Model (LLM) Agents have recently garnered increasing interest yet they are limited in their ability to learn from trial and error, a key element of intelligent behavior. In this work, we argue that the capacity to learn new actions from experience is fundamental to the advancement of learning in LLM agents. While humans naturally expand their action spaces and develop skills through experiential learning, LLM agents typically operate within fixed action spaces, limiting their potential for growth. To address these challenges, our study explores open-action learning for language agents. We introduce a framework LearnAct with an iterative learning strategy to create and improve actions in the form of Python functions. In each iteration, LLM revises and updates the currently available actions based on the errors identified in unsuccessful training tasks, thereby enhancing action effectiveness. Our experimental evaluations across Robotic Planning and Alfworld environments reveal that after learning on a few training task instances, our approach to open-action learning markedly improves agent performance for the type of task (by 32 percent in AlfWorld compared to ReAct+Reflexion, for instance) highlighting the importance of experiential action learning in the development of more intelligent LLM agents.","url_abs":"https://arxiv.org/abs/2402.15809v2","url_pdf":"https://arxiv.org/pdf/2402.15809v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"empowering-large-language-model-agents","repo_url":"https://github.com/zhao-ht/learnact","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.15809","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.15809"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhao-ht/learnact","reach":{"status":"ok"}}],"summary":{"ran":12,"unverified":5},"by_repo_kind":{"official":{"samples":17,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":17,"samples":[{"code_sha256_prefix":"be016c6de5f601d7","entry":"add_api_agent_args","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/model_arguments.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/model_arguments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"be016c6de5f601d7"}},{"code_sha256_prefix":"7caf0b02e41211df","entry":"add_learnact_agent_args","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/model_arguments.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/model_arguments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7caf0b02e41211df"}},{"code_sha256_prefix":"6859a11371fed89f","entry":"add_py_agent_args","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/model_arguments.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/model_arguments.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6859a11371fed89f"}},{"code_sha256_prefix":"b7f08cfff2002157","entry":"answer_eval","repo":"zhao-ht/learnact","repo_kind":"official","path":"pipelines.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/pipelines.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b7f08cfff2002157"}},{"code_sha256_prefix":"9dfdb5e4175893d8","entry":"copy","repo":"zhao-ht/learnact","repo_kind":"official","path":"aux_func/copy.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/aux_func/copy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9dfdb5e4175893d8"}},{"code_sha256_prefix":"a9ab3708c00ae21a","entry":"execute","repo":"zhao-ht/learnact","repo_kind":"official","path":"aux_func/aux_func.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/aux_func/aux_func.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a9ab3708c00ae21a"}},{"code_sha256_prefix":"5cc44cb6d5cddbbc","entry":"get_max_context_length","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/get_model.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/get_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5cc44cb6d5cddbbc"}},{"code_sha256_prefix":"d12c286b918664d5","entry":"get_tool_improve_prompt_format_description","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/learnact_agent/learnact_learner.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/learnact_agent/learnact_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d12c286b918664d5"}},{"code_sha256_prefix":"65a2191cc48b12b8","entry":"get_tool_maker_decompose_combination_prompt","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/learnact_agent/learnact_learner.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/learnact_agent/learnact_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"65a2191cc48b12b8"}},{"code_sha256_prefix":"24c0689eb0fad494","entry":"result_is_plan","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/learnact_agent/learnact_learner.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/learnact_agent/learnact_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"24c0689eb0fad494"}},{"code_sha256_prefix":"53e3f2d42a930b19","entry":"resume_result_pd","repo":"zhao-ht/learnact","repo_kind":"official","path":"pipelines.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/pipelines.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"53e3f2d42a930b19"}},{"code_sha256_prefix":"f8a4de0b6faeff3a","entry":"run_with_timeout","repo":"zhao-ht/learnact","repo_kind":"official","path":"aux_func/aux_func.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/aux_func/aux_func.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f8a4de0b6faeff3a"}},{"code_sha256_prefix":"96896b883b68a043","entry":"call_chat_gpt","repo":"zhao-ht/learnact","repo_kind":"official","path":"backbone/gpt.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/backbone/gpt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96896b883b68a043"}},{"code_sha256_prefix":"8b1dcbddb6017e53","entry":"execute_basic","repo":"zhao-ht/learnact","repo_kind":"official","path":"aux_func/aux_func.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/aux_func/aux_func.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8b1dcbddb6017e53"}},{"code_sha256_prefix":"6c4aba17c8429917","entry":"load_backbone","repo":"zhao-ht/learnact","repo_kind":"official","path":"model/get_model.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/model/get_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6c4aba17c8429917"}},{"code_sha256_prefix":"f17d8dea2f3b9842","entry":"num_tokens_from_messages","repo":"zhao-ht/learnact","repo_kind":"official","path":"backbone/gpt.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/backbone/gpt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f17d8dea2f3b9842"}},{"code_sha256_prefix":"996a26fe0469527e","entry":"resume_result_jsonl","repo":"zhao-ht/learnact","repo_kind":"official","path":"pipelines.py","file_url":"https://github.com/zhao-ht/learnact/blob/HEAD/pipelines.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"996a26fe0469527e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}