Prompting to Prompt: Meta-Template Learning for Transferable Prompt Optimization

Xinyu Zhang, Deyang Li, Minjun Zhao, Meng Han, Ruifeng Shi, Zhicheng Dou


Abstract
Existing prompt optimization methods often improve prompts for a specific task or deployment setting, but their optimized prompts transfer poorly to new tasks and usually require re-optimization. We propose Prompting to Prompt (PTP), a framework that learns meta-templates as structured intermediate representations for reusable prompt construction. PTP decomposes prompts into transferable elements and optimizes them with LLM-generated textual gradients. Its inner loop refines task-specific prompts from natural-language feedback and an element list, while its outer loop abstracts structural changes across tasks to update the meta-template.The learned meta-template is then reused for task-level and query-level prompt generation, reducing the need to rerun full prompt optimization for each target setting. Experiments on six benchmarks show gains in both offline transfer and test-time deployment settings, with improvements up to 10.52 points on Arena-Hard.
Anthology ID:
2026.findings-emnlp.58
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
1187–1208
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.58/
DOI:
Bibkey:
Cite (ACL):
Xinyu Zhang, Deyang Li, Minjun Zhao, Meng Han, Ruifeng Shi, and Zhicheng Dou. 2026. Prompting to Prompt: Meta-Template Learning for Transferable Prompt Optimization. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 1187–1208, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Prompting to Prompt: Meta-Template Learning for Transferable Prompt Optimization (Zhang et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.58.pdf