基於元學習的系統提示優化
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