System Prompt Optimization with Meta-Learning
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Games cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models as Optimizers cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Multimodal Prompt Optimization: Why Not Leverage Multiple Modalities for MLLMs cites Large Language Models as Optimizers
- Multimodal Prompt Optimization: Why Not Leverage Multiple Modalities for MLLMs cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- ACON: Optimizing Context Compression for Long-horizon LLM Agents cites Large Language Models as Optimizers
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
Cited by top-tier papers4
- MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM GamesYunfei Xie, Kevin Wang, Bobby Cheng, Jianzhu Yao et al.ICML 2026 · 4 citations
- Multimodal Prompt Optimization: Why Not Leverage Multiple Modalities for MLLMsYumin Choi, Dongki Kim, Jinheon Baek, Sung Ju HwangICLR 2026 · 4 citations
- Who Controls the Conversation? User Perspectives on Generative AI (LLM) System PromptsAnna Neumann, Yulu Pi, Jatinder SinghCHI 2026 · 3 citations
- ACON: Optimizing Context Compression for Long-horizon LLM AgentsMinki Kang, Wei-Ning Chen, Dongge Han, Huseyin Inan et al.ICML 2026
Builds on20
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu et al.NeurIPS 2020 · 1,957 citations
- Large Language Models as OptimizersChengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu et al.ICLR 2024 · 817 citations
- TweetEval: Unified Benchmark and Comparative Evaluation for Tweet ClassificationFrancesco Barbieri, José Camacho-Collados, Luis Espinosa Anke, Leonardo NevesEMNLP Findings 2020 · 720 citations
Related papers
- SEE: Strategic Exploration and Exploitation for Cohesive In-Context Prompt OptimizationWendi Cui, Jiaxin Zhang, Zhuohang Li, Hao Sun et al.ACL 2025
- P3: Prompts Promote PromptingXinyu Zhang, Yuanquan Hu, Fangchao Liu, Zhicheng DouACL Findings 2025
- PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based SamplingYongchao Chen, Jacob Arkin, Yilun Hao, Yang Zhang et al.EMNLP 2024 · 6 citations
- metaTextGrad: Automatically optimizing language model optimizersGuowei Xu, Mert Yüksekgönül, Carlos Guestrin, James Y. ZouNeurIPS 2025 · 5 citations
- Dual-Phase Accelerated Prompt OptimizationMuchen Yang, Moxin Li, Yongle Li, Zijun Chen et al.EMNLP Findings 2024
