Black-Box Prompt Optimization: Aligning Large Language Models without Model Training
Jiale Cheng, Xiao Liu, Kehan Zheng, Pei Ke, Hongning Wang, Yuxiao Dong, Jie Tang, Minlie Huang
Abstract
Large language models (LLMs) have shown impressive success in various applications. However, these models are often not well aligned with human intents, which calls for additional treatments on them; that is, the alignment problem. To make LLMs better follow user instructions, existing alignment methods primarily focus on further training them. However, the extra training of LLMs is usually expensive in terms of GPU computing; even worse, some LLMs are not accessible for userdemanded training, such as GPTs. In this work, we take a different perspective-Black-Box Prompt Optimization (BPO)-to perform alignments. The idea is to optimize user prompts to suit LLMs' input understanding, so as to best realize users' intents without updating LLMs' parameters. BPO leverages human preferences to optimize prompts, thus making it superior to LLM (e.g., ChatGPT) as a prompt engineer. Moreover, BPO is model-agnostic, and the empirical results demonstrate that the BPOaligned ChatGPT yields a 22% increase in the win rate against its original version and 10% for GPT-4. Notably, the BPO-aligned LLMs can outperform the same models aligned by PPO and DPO, and it also brings additional performance gains when combining BPO with PPO or DPO. Code and datasets are released at https://github.com/thu-coai/BPO .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
39 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
- ReST-MCTS: LLM Self-Training via Process Reward Guided Tree Search cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- ReST-MCTS: LLM Self-Training via Process Reward Guided Tree Search cites Language Models are Few-Shot Learners
- ReST-MCTS: LLM Self-Training via Process Reward Guided Tree Search cites Training language models to follow instructions with human feedback
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts cites Language Models are Few-Shot Learners
- Large Language Models as Optimizers cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- GASP: Efficient Black-Box Generation of Adversarial Suffixes for Jailbreaking LLMs cites AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- GASP: Efficient Black-Box Generation of Adversarial Suffixes for Jailbreaking LLMs cites Language Models are Few-Shot Learners
- GASP: Efficient Black-Box Generation of Adversarial Suffixes for Jailbreaking LLMs cites Training language models to follow instructions with human feedback
- HonestLLM: Toward an Honest and Helpful Large Language Model cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- HonestLLM: Toward an Honest and Helpful Large Language Model cites Language Models are Few-Shot Learners
- Aligner: Efficient Alignment by Learning to Correct cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Aligner: Efficient Alignment by Learning to Correct cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Cited by top-tier papers39
- ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree SearchDan Zhang, Sining Zhoubian, Ziniu Hu, Yisong Yue et al.NeurIPS 2024 · 527 citations
- Aligner: Efficient Alignment by Learning to CorrectJiaming Ji, Boyuan Chen, Hantao Lou, Donghai Hong et al.NeurIPS 2024 · 115 citations
- HonestLLM: Toward an Honest and Helpful Large Language ModelChujie Gao, Siyuan Wu, Yue Huang, Dongping Chen et al.NeurIPS 2024 · 30 citations
- Failure-Driven Workflow RefinementJusheng Zhang, Jing Yang, Kaitong Cai, Ziliang Chen et al.ICML 2026 · 17 citations
- GASP: Efficient Black-Box Generation of Adversarial Suffixes for Jailbreaking LLMsAdvik Raj Basani, Xiao ZhangNeurIPS 2025 · 16 citations
Builds on15
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu et al.ICLR 2024 · 817 citations
Related papers
- Self-Renewal Prompt Optimizing with Implicit ReasoningZihan Liang, Ben Chen, Zhuoran Ran, Zihan Wang et al.EMNLP Findings 2024 · 2 citations
- Dynamic Rewarding with Prompt Optimization Enables Tuning-free Self-Alignment of Language ModelsSomanshu Singla, Zhen Wang, Tianyang Liu, Abdullah Ashfaq et al.EMNLP 2024 · 1 citation
- Self-Instructed Derived Prompt Generation Meets In-Context Learning: Unlocking New Potential of Black-Box LLMsZhuo Li, Yuhao Du, Jinpeng Hu, Xiang Wan et al.ACL 2025
- Inference-Aware Prompt Optimization for Aligning Black-Box Large Language ModelsSaaduddin Mahmud, Mason Nakamura, Kyle Hollins Wray, Shlomo ZilbersteinAAAI 2026
- Unleashing the Potential of Large Language Models as Prompt Optimizers: Analogical Analysis with Gradient-based Model OptimizersXinyu Tang, Xiaolei Wang, Wayne Xin Zhao, Siyuan Lu et al.AAAI 2025 · 36 citations
