[Paper Review] Black-Box Prompt Optimization: Aligning Large Language Models without Model Training
This paper proposes Black-Box Prompt Optimization (BPO), a method to align large language models (LLMs) with human preferences without fine-tuning or training the models. By automatically rewriting user prompts using feedback data and a sequence-to-sequence model, BPO improves response quality and alignment, achieving up to a 22% win rate increase on GPT-3.5-turbo and 10% on GPT-4, outperforming both PPO and DPO while remaining model-agnostic and interpretable.
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 user-demanded 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 BPO-aligned 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.
Motivation & Objective
- To address the challenge of aligning LLMs with human intent without fine-tuning or access to model weights.
- To develop a model-agnostic, efficient, and interpretable method for improving LLM alignment through prompt optimization.
- To enable alignment of closed-source LLMs like GPT-4 and Claude-2 via prompt rewriting, overcoming limitations of training-based methods.
- To demonstrate that prompt optimization can outperform or complement reinforcement learning-based alignment techniques like PPO and DPO.
- To provide a scalable, interpretable alternative to parameter-based alignment that works across diverse LLMs, including API-based and open-source models.
Proposed method
- BPO constructs a prompt optimization model using 14K instruction-optimization pairs derived from publicly available preference datasets.
- It leverages LLMs to analyze response pairs (favorable vs. unfavorable), identify key differences, and generate refined prompts that incorporate features improving alignment.
- The method treats the LLM as a black box, focusing solely on optimizing input prompts rather than modifying model parameters.
- A sequence-to-sequence model is trained to map original user prompts to optimized versions that better elicit human-preferred responses.
- Optimization strategies include explanation generation, prompt elaboration, hint provision, and safety enhancement, derived from feedback analysis.
- The approach is evaluated using pairwise human preference benchmarks like Vicuna Eval, Self-Instruct Eval, and Dolly Eval.

Experimental results
Research questions
- RQ1Can prompt optimization alone significantly improve LLM alignment without any model fine-tuning or parameter updates?
- RQ2How does BPO compare in performance to established alignment methods like PPO and DPO, especially on closed-source models such as GPT-4 and Claude-2?
- RQ3To what extent can BPO generalize across diverse LLM architectures, including both open-source and API-based models?
- RQ4What are the most effective prompt optimization strategies that consistently improve response quality and human preference?
- RQ5Can BPO be combined with existing alignment techniques to yield further improvements in model alignment?
Key findings
- BPO achieves a 22% increase in win rate on gpt-3.5-turbo and 10% on gpt-4 in pairwise preference evaluations, outperforming both PPO and DPO.
- BPO-aligned models surpass the performance of models aligned via PPO and DPO, even when those models are already fine-tuned.
- BPO demonstrates orthogonal improvements when combined with PPO or DPO, further boosting alignment performance.
- The method successfully improves alignment on both open-source models (e.g., Vicuna, Llama-2) and closed-source models (e.g., GPT-4, Claude-2) without model access or training.
- The prompt optimization strategies identified—explanation generation, elaboration, hinting, and safety enhancement—significantly improve response quality and controllability.
- Error analysis reveals limitations in handling long-context and math-related prompts due to data imbalance in training data, suggesting room for improvement with more diverse datasets.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.