StablePrompt: Automatic Prompt Tuning using Reinforcement Learning for Large Language Models

Minchan Kwon,Gaeun Kim,Jongsuk Kim,Haeil Lee,Junmo Kim
2024-10-10
Abstract:Finding appropriate prompts for the specific task has become an important issue as the usage of Large Language Models (LLM) has expanded. Reinforcement Learning (RL) is widely used for prompt tuning, but its inherent instability and environmental dependency make it difficult to use in practice. In this paper, we propose StablePrompt, which strikes a balance between training stability and search space, mitigating the instability of RL and producing high-performance prompts. We formulate prompt tuning as an online RL problem between the agent and target LLM and introduce Adaptive Proximal Policy Optimization (APPO). APPO introduces an LLM anchor model to adaptively adjust the rate of policy updates. This allows for flexible prompt search while preserving the linguistic ability of the pre-trained LLM. StablePrompt outperforms previous methods on various tasks including text classification, question answering, and text generation. Our code can be found in github.
Computation and Language
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to automatically find or adjust the best prompt applicable to specific tasks when using large - language models (LLMs). Specifically, the paper focuses on optimizing these prompts through reinforcement learning (RL) methods to overcome the deficiencies of existing RL methods in training stability and their high dependence on the environment. These problems limit the wide application of RL in various LLMs and tasks. The authors propose a new method named StablePrompt, which aims to maintain training stability while ensuring the flexibility of the search space. By defining prompt tuning as an online, policy - based RL problem and introducing Adaptive Proximal Policy Optimization (APPO), StablePrompt can achieve high performance on different tasks (such as text classification, question answering, and text generation), and is applicable to agent models and target LLMs of different scales and types. In addition, the paper also proposes an extended version, TTE - StablePrompt, for generating input - related prompts to deal with tasks that are difficult to solve with a single prompt.