Large Language Models (LLMs) have demonstrated remarkable performance across diverse tasks and exhibited impressive reasoning abilities by applying zero-shot Chain-of-Thought (CoT) prompting. However, due to the evolving nature of sentence prefixes during the pre-training phase, existing zero-shot CoT prompting methods that employ identical CoT prompting across all task instances may not be optimal. In this paper, we introduce a novel zero-shot prompting method that leverages evolutionary algorithms to generate diverse promptings for LLMs dynamically. Our approach involves initializing two CoT promptings, performing evolutionary operations based on LLMs to create a varied set, and utilizing the LLMs to select a suitable CoT prompting for a given problem. Additionally, a rewriting operation, guided by the selected CoT prompting, enhances the understanding of the LLMs about the problem. Extensive experiments conducted across ten reasoning datasets demonstrate the superior performance of our proposed method compared to current zero-shot CoT prompting methods on GPT-3.5-turbo and GPT-4. Moreover, in-depth analytical experiments underscore the adaptability and effectiveness of our method in various reasoning tasks.
翻译:大语言模型(LLMs)在各类任务中展现出卓越性能,并通过应用零样本思维链(Chain-of-Thought, CoT)提示表现出令人印象深刻的推理能力。然而,由于预训练阶段句子前缀的演化特性,现有对所有任务实例采用相同CoT提示的零样本CoT方法可能并非最优。本文提出一种新颖的零样本提示方法,利用进化算法为LLMs动态生成多样化提示。我们的方法包括:初始化两个CoT提示,基于LLMs执行进化操作以生成变异集,并借助LLMs为给定问题选择合适CoT提示。此外,基于所选CoT提示引导的重写操作,可增强LLMs对问题的理解。在十个推理数据集上的大量实验表明,相较于当前零样本CoT提示方法,我们提出的方法在GPT-3.5-turbo和GPT-4上均展现出更优性能。进一步的深度分析实验也验证了该方法在各类推理任务中的适应性与有效性。