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-cot.
翻译:大语言模型(LLMs)规模的持续增长使其在算术推理、常识推理等各类复杂推理任务中展现出涌现能力。研究表明,任务特定提示的有效设计对于LLMs生成高质量答案至关重要。其中,基于示例的思维链(CoT)推理提示方法是处理复杂问答任务的有效途径,可显著提升LLMs的性能。然而,现有CoT方法依赖固定的人工标注示例集,这些示例未必是不同任务中最有效的样例。本文提出名为Active-Prompt的新方法,通过任务特定的示例提示(附带人工设计的CoT推理标注)使LLMs适应不同任务。为此,我们需解决关键问题:如何从任务特定查询池中确定最值得且最有帮助的待标注问题。借鉴基于不确定性的主动学习相关问题的思路,我们引入多种不确定性度量指标,从而选择最不确定的问题进行标注。实验结果表明,所提方法在八个复杂推理任务上均达到最优性能。进一步分析不同不确定性度量、查询池规模、零样本学习及准确率-不确定性关系,验证了方法的有效性。我们的代码将开源至https://github.com/shizhediao/active-cot。