Table of Contents
Fetching ...

Dual-Phase Accelerated Prompt Optimization

Muchen Yang, Moxin Li, Yongle Li, Zijun Chen, Chongming Gao, Junqi Zhang, Yangyang Li, Fuli Feng

TL;DR

This work addresses slow convergence in gradient-free prompt optimization for closed-source LLMs by introducing a dual-phase approach: first generating a high-quality initial prompt via a meta-instruction, then performing experience-tuned, sentence-level optimization that leverages past failure cases. The method uses an EXP3-inspired weighting mechanism to guide expansion and acceptance, with clear thresholds and adaptive sentence-level updates, enabling satisfactory performance in as few as four optimization steps. Extensive experiments across eight datasets and multiple LLMs show significant gains over strong baselines and competitive performance against few-shot prompting, while drastically reducing API calls. The approach promises practical impact for efficient prompt engineering in real-world, resource-constrained scenarios.

Abstract

Gradient-free prompt optimization methods have made significant strides in enhancing the performance of closed-source Large Language Models (LLMs) across a wide range of tasks. However, existing approaches make light of the importance of high-quality prompt initialization and the identification of effective optimization directions, thus resulting in substantial optimization steps to obtain satisfactory performance. In this light, we aim to accelerate prompt optimization process to tackle the challenge of low convergence rate. We propose a dual-phase approach which starts with generating high-quality initial prompts by adopting a well-designed meta-instruction to delve into task-specific information, and iteratively optimize the prompts at the sentence level, leveraging previous tuning experience to expand prompt candidates and accept effective ones. Extensive experiments on eight datasets demonstrate the effectiveness of our proposed method, achieving a consistent accuracy gain over baselines with less than five optimization steps.

Dual-Phase Accelerated Prompt Optimization

TL;DR

This work addresses slow convergence in gradient-free prompt optimization for closed-source LLMs by introducing a dual-phase approach: first generating a high-quality initial prompt via a meta-instruction, then performing experience-tuned, sentence-level optimization that leverages past failure cases. The method uses an EXP3-inspired weighting mechanism to guide expansion and acceptance, with clear thresholds and adaptive sentence-level updates, enabling satisfactory performance in as few as four optimization steps. Extensive experiments across eight datasets and multiple LLMs show significant gains over strong baselines and competitive performance against few-shot prompting, while drastically reducing API calls. The approach promises practical impact for efficient prompt engineering in real-world, resource-constrained scenarios.

Abstract

Gradient-free prompt optimization methods have made significant strides in enhancing the performance of closed-source Large Language Models (LLMs) across a wide range of tasks. However, existing approaches make light of the importance of high-quality prompt initialization and the identification of effective optimization directions, thus resulting in substantial optimization steps to obtain satisfactory performance. In this light, we aim to accelerate prompt optimization process to tackle the challenge of low convergence rate. We propose a dual-phase approach which starts with generating high-quality initial prompts by adopting a well-designed meta-instruction to delve into task-specific information, and iteratively optimize the prompts at the sentence level, leveraging previous tuning experience to expand prompt candidates and accept effective ones. Extensive experiments on eight datasets demonstrate the effectiveness of our proposed method, achieving a consistent accuracy gain over baselines with less than five optimization steps.
Paper Structure (32 sections, 9 equations, 10 figures, 3 tables, 1 algorithm)

This paper contains 32 sections, 9 equations, 10 figures, 3 tables, 1 algorithm.

Figures (10)

  • Figure 1: Average accuracy improvement on eight datasets with four optimization steps.
  • Figure 2: Illustration of the proposed method.
  • Figure 3: Meta-instruction used in our initialization phase to generate high-quality initial prompts.
  • Figure 4: Meta-instruction used in the optimization phase.
  • Figure 5: Performance (accuracy) over 4 steps across 8 tasks on GPT-3.5-Turbo.
  • ...and 5 more figures