Learning from Contrastive Prompts: An Automated Prompt Optimization Framework
Mingqi Li, Karan Aggarwal, Yong Xie, Aitzaz Ahmad, Stephen Lau
Abstract
As large language models (LLMs) continue to advance, significant effort is spent on manually crafting prompts to unlock their full potential. While existing prompt optimization methods automate this process, they often underperform due to their reliance on learning exclusively from incorrect samples. We propose the Learning from Contrastive Prompts (LCP) framework, which leverages contrastive prompts to distinguish between high- and low-performing cases. By identifying and amplifying the differences that make prompts effective, LCP systematically extracts principles underlying successful prompt design. On the Big-Bench Hard benchmark, LCP achieves an 87.5% win rate on Claude-3-Sonnet and 75.7% on Claude-4-Sonnet. Experiments on DeepSeek-R1 (88.2% win rate) and SuperGLUE further confirm that LCP generalizes across both proprietary and open-source models and diverse NLU benchmarks.The framework offers a principled and scalable foundation for automated prompt engineering, reducing manual intervention in adapting LLMs to diverse applications.- Anthology ID:
- 2026.findings-acl.9
- Volume:
- Findings of the Association for Computational Linguistics: ACL 2026
- Month:
- July
- Year:
- 2026
- Address:
- San Diego, California, United States
- Editors:
- Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
- Venue:
- Findings
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 163–188
- Language:
- URL:
- https://preview.aclanthology.org/ingest-acl/2026.findings-acl.9/
- DOI:
- Cite (ACL):
- Mingqi Li, Karan Aggarwal, Yong Xie, Aitzaz Ahmad, and Stephen Lau. 2026. Learning from Contrastive Prompts: An Automated Prompt Optimization Framework. In Findings of the Association for Computational Linguistics: ACL 2026, pages 163–188, San Diego, California, United States. Association for Computational Linguistics.
- Cite (Informal):
- Learning from Contrastive Prompts: An Automated Prompt Optimization Framework (Li et al., Findings 2026)
- PDF:
- https://preview.aclanthology.org/ingest-acl/2026.findings-acl.9.pdf