Learning from Contrastive Prompts: Automated Optimization and Adaptation
<|reference_start|>Learning from Contrastive Prompts: Automated Optimization and Adaptation: As LLMs evolve, significant effort is spent on manually crafting prompts. While existing prompt optimization methods automate this process, they rely solely on learning from incorrect samples, leading to a sub-optimal performance. Additionally, an unexplored challenge in the literature is prompts effective for prior models may not perform well on newer versions or different languages. We propose the Learning from Contrastive Prompts (LCP) framework to address these gaps, enhancing both prompt optimization and adaptation. LCP employs contrastive learning to generate effective prompts by analyzing patterns in good and bad prompt examples. Our evaluation on the Big-Bench Hard dataset shows that LCP has a win rate of over 76% over existing methods in prompt optimization and demonstrates strong adaptability across different model versions, families, and languages. LCP offers a systematic approach to prompt engineering, reducing manual effort in deploying LLMs across varied contexts.<|reference_end|>
@article{li2024learning,
    title={Learning from Contrastive Prompts: Automated Optimization and Adaptation},
    author={Mingqi Li, Karan Aggarwal, Yong Xie, Aitzaz Ahmad, Stephen Lau},
    journal={arXiv preprint arXiv:2409.15199},
    year={2024},
    archivePrefix={arXiv},
    eprint={2409.15199},
    primaryClass={cs.CL cs.AI}
}