自动优化LLM决策的提示词,提升任务表现
Meta-Prompt Optimization for LLM-Based Sequential Decision Making
- 借鉴对抗性老虎机算法,设计可适应动态奖励的提示优化方法
- 在贝叶斯优化和多臂赌博机任务中显著提升性能
- 适合需要高效智能体决策的研究者和开发者
大型语言模型(LLM)被用于解决贝叶斯优化、多臂赌博机等序列决策任务。现有方法通常使用人工设计的固定元提示(meta-prompt)指导模型行动,但提示质量对模型表现影响巨大。由于决策过程中的奖励观测具有非平稳性,元提示优化面临挑战。为此,本文受对抗性老虎机算法启发,提出EXPO算法,自动优化元提示中的任务描述与元指令。进一步扩展为EXPO-ES,同时优化历史交互示例。大量实验表明,该方法显著提升基于LLM的序列决策性能。
原文摘要 · Abstract (English)
Large language models (LLMs) have recently been employed as agents to solve sequential decision-making tasks such as Bayesian optimization and multi-armed bandits (MAB). These works usually adopt an LLM for sequential action selection by providing it with a fixed, manually designed meta-prompt. However, numerous previous works have found that the prompt has a significant impact on the performance of the LLM, which calls for a method to automatically optimize the meta-prompt for LLM-based agents. Unfortunately, the non-stationarity in the reward observations during LLM-based sequential decision-making makes meta-prompt optimization highly challenging. To address this challenge, we draw inspirations from adversarial bandit algorithms, which are inherently capable of handling non-stationary reward observations. Building on this foundation, we propose our EXPonential-weight algorithm for prompt Optimization} (EXPO) to automatically optimize the task description and meta-instruction in the meta-prompt for LLM-based agents. We also extend EXPO to additionally optimize the exemplars (i.e., history of interactions) in the meta-prompt to further enhance the performance, hence introducing our EXPO-ES algorithm. We use extensive experiments to show that our algorithms significantly improve the performance of LLM-based sequential decision-making.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。