{"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/prompt-optimization-in-multi-step-tasks","title":"PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based Sampling","arxiv_id":"2402.08702","date":"2024-02-13","proceeding":null,"authors":["Yongchao Chen","Jacob Arkin","Yilun Hao","Yang Zhang","Nicholas Roy","Chuchu Fan"],"abstract":"Prompt optimization aims to find the best prompt to a large language model (LLM) for a given task. LLMs have been successfully used to help find and improve prompt candidates for single-step tasks. However, realistic tasks for agents are multi-step and introduce new challenges: (1) Prompt content is likely to be more extensive and complex, making it more difficult for LLMs to analyze errors, (2) the impact of an individual step is difficult to evaluate, and (3) different people may have varied preferences about task execution. While humans struggle to optimize prompts, they are good at providing feedback about LLM outputs; we therefore introduce a new LLM-driven discrete prompt optimization framework PRompt Optimization in Multi-Step Tasks (PROMST) that incorporates human-designed feedback rules to automatically offer direct suggestions for improvement. We also use an extra learned heuristic model that predicts prompt performance to efficiently sample from prompt candidates. This approach significantly outperforms both human-engineered prompts and several other prompt optimization methods across 11 representative multi-step tasks (an average 10.6\\%-29.3\\% improvement to current best methods on five LLMs respectively). We believe our work can serve as a benchmark for automatic prompt optimization for LLM-driven multi-step tasks. Datasets and Codes are available at https://github.com/yongchao98/PROMST. Project Page is available at https://yongchao98.github.io/MIT-REALM-PROMST.","url_abs":"https://arxiv.org/abs/2402.08702v4","url_pdf":"https://arxiv.org/pdf/2402.08702v4.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":"prompt-optimization-in-multi-step-tasks","repo_url":"https://github.com/yongchao98/promst","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-3","method_name":"GPT-3"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.08702","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.08702"}},"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/yongchao98/promst","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":3},"by_repo_kind":{"official":{"samples":12,"ran":9,"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":0,"samples":[{"code_sha256_prefix":"7436a57078e7696c","entry":"action_from_response","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/env1_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/env1_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7436a57078e7696c"}},{"code_sha256_prefix":"f697b88d2cfd7249","entry":"corner_position","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet2/env2_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet2/env2_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f697b88d2cfd7249"}},{"code_sha256_prefix":"c42105f069a2cdbd","entry":"error_string_func_APO","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/prompt_env1.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/prompt_env1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c42105f069a2cdbd"}},{"code_sha256_prefix":"53a8de84b6bc929e","entry":"judge_move_box2pos_box2target_func","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet2/env2_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet2/env2_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"53a8de84b6bc929e"}},{"code_sha256_prefix":"d45869657d4415b9","entry":"prompt_to_promptLLM_func_total_APE","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/prompt_env1.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/prompt_env1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d45869657d4415b9"}},{"code_sha256_prefix":"6c1cdb58b0bb57ab","entry":"read_file_content","repo":"yongchao98/promst","repo_kind":"official","path":"BlocksWorld/env7-blocksworld-list-score.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BlocksWorld/env7-blocksworld-list-score.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c1cdb58b0bb57ab"}},{"code_sha256_prefix":"cebcc1ecc15d62ae","entry":"state_update_func","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/env1_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/env1_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cebcc1ecc15d62ae"}},{"code_sha256_prefix":"a683c02bc4f7bac7","entry":"state_update_func","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet2/env2_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet2/env2_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a683c02bc4f7bac7"}},{"code_sha256_prefix":"6a024a82611e53a1","entry":"surround_index_func","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/env1_create.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/env1_create.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a024a82611e53a1"}},{"code_sha256_prefix":"7f59d2db424b7b8d","entry":"GPT_response","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/LLM.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/LLM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f59d2db424b7b8d"}},{"code_sha256_prefix":"02b8bef5328aa45d","entry":"score_in_training_set","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/env1_func.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/env1_func.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"02b8bef5328aa45d"}},{"code_sha256_prefix":"c87152fe97b7d199","entry":"total_score_in_training_set","repo":"yongchao98/promst","repo_kind":"official","path":"BoxNet1/env1_func.py","file_url":"https://github.com/yongchao98/promst/blob/HEAD/BoxNet1/env1_func.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c87152fe97b7d199"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}