The increasing scale of large language models (LLMs) brings emergent abilities to various complex tasks requiring reasoning, such as arithmetic and commonsense reasoning. It is known that the effective design of task-specific prompts is critical for LLMs' ability to produce high-quality answers. In particular, an effective approach for complex question-and-answer tasks is example-based prompting with chain-of-thought (CoT) reasoning, which significantly improves the performance of LLMs. However, current CoT methods rely on a fixed set of human-annotated exemplars, which are not necessarily the most effective examples for different tasks. This paper proposes a new method, Active-Prompt, to adapt LLMs to different tasks with task-specific example prompts (annotated with human-designed CoT reasoning). For this purpose, we propose a solution to the key problem of determining which questions are the most important and helpful ones to annotate from a pool of task-specific queries. By borrowing ideas from the related problem of uncertainty-based active learning, we introduce several metrics to characterize the uncertainty so as to select the most uncertain questions for annotation. Experimental results demonstrate the superiority of our proposed method, achieving state-of-the-art on eight complex reasoning tasks. Further analyses of different uncertainty metrics, pool sizes, zero-shot learning, and accuracy-uncertainty relationship demonstrate the effectiveness of our method. Our code will be available at https://github.com/shizhediao/active-prompt.
翻译:大规模语言模型(LLM)规模的持续增长,使其在算术推理和常识推理等需要复杂推理的任务中展现出涌现能力。已知任务特定提示的有效设计对于LLM生成高质量答案的能力至关重要。特别地,针对复杂问答任务,基于示例的链式思维(CoT)推理提示方法能显著提升LLM的性能。然而,现有的CoT方法依赖于固定的人工标注示例集,这些示例对于不同任务未必是最有效的。本文提出一种新方法——主动提示(Active-Prompt),通过任务特定的示例提示(标注有人工设计的CoT推理)使LLM适配不同任务。为此,我们针对如何从任务特定查询池中确定哪些问题是最重要且最具标注价值的关键问题提出了解决方案。借鉴基于不确定性的主动学习相关思想,我们引入多种度量指标来刻画不确定性,从而筛选出最不确定的问题进行标注。实验结果表明,我们提出的方法在八个复杂推理任务上达到了最先进的性能,具有显著优越性。对不同不确定性度量、池规模、零样本学习以及准确率-不确定性关系的进一步分析,验证了本方法的有效性。相关代码将在 https://github.com/shizhediao/active-prompt 公开。