基于元学习的系统提示优化
System Prompt Optimization with Meta-Learning
May 14, 2025
作者: Yumin Choi, Jinheon Baek, Sung Ju Hwang
cs.AI
摘要
大型语言模型(LLMs)展现了卓越的能力,其中优化其输入提示对于最大化性能起着关键作用。然而,尽管LLM提示包含任务无关的系统提示和任务特定的用户提示,现有的提示优化研究主要集中在针对个别查询或任务的用户提示上,而很大程度上忽视了系统提示——一旦优化,它便适用于不同任务和领域。基于此,我们提出了双层系统提示优化这一新问题,其目标是设计出对多样用户提示具有鲁棒性且可迁移至未见任务的系统提示。为解决此问题,我们进而提出了一种元学习框架,该框架通过在多个数据集上的各种用户提示中优化系统提示来进行元学习,同时以迭代方式更新用户提示,确保二者之间的协同作用。我们在涵盖5个不同领域的14个未见数据集上进行了实验,结果表明,我们的方法生成的系统提示能有效泛化至多样用户提示。此外,我们的研究发现,优化后的系统提示即便面对未见任务也能快速适应,测试时用户提示所需的优化步骤更少,同时实现了性能的提升。
English
Large Language Models (LLMs) have shown remarkable capabilities, with
optimizing their input prompts playing a pivotal role in maximizing their
performance. However, while LLM prompts consist of both the task-agnostic
system prompts and task-specific user prompts, existing work on prompt
optimization has focused on user prompts specific to individual queries or
tasks, and largely overlooked the system prompt that is, once optimized,
applicable across different tasks and domains. Motivated by this, we introduce
the novel problem of bilevel system prompt optimization, whose objective is to
design system prompts that are robust to diverse user prompts and transferable
to unseen tasks. To tackle this problem, we then propose a meta-learning
framework, which meta-learns the system prompt by optimizing it over various
user prompts across multiple datasets, while simultaneously updating the user
prompts in an iterative manner to ensure synergy between them. We conduct
experiments on 14 unseen datasets spanning 5 different domains, on which we
show that our approach produces system prompts that generalize effectively to
diverse user prompts. Also, our findings reveal that the optimized system
prompt enables rapid adaptation even to unseen tasks, requiring fewer
optimization steps for test-time user prompts while achieving improved
performance.Summary
AI-Generated Summary