Unsupervised Prompt Learning with Few-shot Examples for Answering Objective Questions
arXiv:2410.03124
Abstract
Large language models (LLMs) have been highly successful on diverse tasks, while some applications require specialized models to meet stricter accuracy or latency needs; here we focus on objective question answering, a widely encountered and important real-world setting. Most existing methods require parameter retraining or human supervision, both entailing high computational and data collection burdens. To handle these challenges, a direct approach is to generate ``high-confidence'' data from downstream tasks and use them for prompt learning or in-context learning to refine pseudo-supervision. We consider combining both approaches for better performance, but naively learning the prompt first and selecting pseudo supervised examples only at inference creates a mismatch between training and use. In this paper, we propose unsupervised few-shot prompt learning (UFPL), which jointly learns the prompt and refines the pseudo-supervision. The learning objective aligns prompt training with usage by requiring the learned prompt to produce consistent answers when pseudo-supervised data are used as in-context examples. We optimize the prompt by using textual feedback to propose prompt updates, and iteratively refine the prompt and the pseudo supervision. In a binary classification model, we give a sufficient condition for one prompt update with pseudo-labeled demonstrations to improve expected accuracy across the dataset. Empirical results on diverse benchmarks and a real world molecule optimization task show its effectiveness.