arXiv:2505.09666cs.CLcs.AI2025-05NeurIPS被引 20

用元学习优化通用系统提示,让大模型跨任务快速适应。

System Prompt Optimization with Meta-Learning

  • 通过元学习在多数据集上联合优化系统提示与用户提示
  • 在14个新数据集上实现跨领域有效泛化,测试时仅需较少调整步数
  • 适合需要快速适配新任务的部署场景,如智能客服、自动问答

大型语言模型(LLMs)表现出强大能力,而优化其输入提示是提升性能的关键。然而,现有研究多聚焦于针对具体查询或任务的用户提示优化,忽略了可跨任务复用的系统提示。为此,本文提出双层系统提示优化问题,目标是设计对多样化用户提示具有鲁棒性且可迁移至未见任务的系统提示。我们构建了一种元学习框架,通过在多个数据集上迭代优化系统提示,并同步更新用户提示以实现协同优化。在涵盖5个不同领域的14个未见过的数据集上进行实验,结果表明该方法生成的系统提示能有效泛化到多样用户提示;同时,优化后的系统提示使模型在面对未见任务时具备快速适应能力,显著减少测试阶段用户提示的优化步数并提升性能。

原文摘要 · Abstract (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.

提示优化元学习大模型跨任务

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。