AlignedCoT: Prompting Large Language Models via Native-Speaking Demonstrations
作者: Zhicheng Yang, Yinya Huang, Jing Xiong, Liang Feng, Xiaodan Liang, Yiwei Wang, Jing Tang
分类: cs.AI, cs.LG
发布日期: 2023-11-22 (更新: 2024-10-07)
备注: Findings of EMNLP 2024
🔗 代码/项目: GITHUB
💡 一句话要点
提出AlignedCoT以解决大语言模型提示效果不佳的问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 提示技术 上下文学习 数学推理 常识推理 人机协作 数据集重写
📋 核心要点
- 现有大语言模型在提示词和风格上表现脆弱,导致其推理能力受限。
- AlignedCoT通过原生语言示例提升LLMs的上下文学习能力,实现一致且正确的逐步提示。
- 实验表明,AlignedCoT在数学推理和常识推理任务上显著提升了LLMs的性能。
📝 摘要(中文)
大语言模型(LLMs)的提示技术,如使用上下文示例,是引导LLMs进行复杂推理的主流方法。然而,现有LLMs在提示词和风格上表现脆弱,且人类编写的提示与LLMs的理解之间存在差距。本文提出AlignedCoT,一种与LLMs相适应的提示技术,通过原生语言示例在上下文学习中实现一致且正确的逐步提示,避免了手工少量示例的依赖,同时保持提示质量。实验结果表明,使用AlignedCoT的LLMs在数学推理和常识推理任务上显著优于使用人类编写示例的模型。此外,AlignedCoT还被应用于重写GSM8K训练集,生成了GSM8K-Align数据集,显示出在检索增强生成中的优势。
🔬 方法详解
问题定义:本文旨在解决大语言模型在提示效果上的不足,尤其是在复杂推理任务中,现有方法往往依赖于手工编写的示例,导致模型性能不稳定。
核心思路:AlignedCoT通过引入原生语言示例,优化LLMs的提示过程,确保在零-shot场景下也能生成高质量的逐步提示,从而提升推理能力。
技术框架:AlignedCoT的整体架构包括三个主要阶段:逐步探测、精炼和格式化LLM的思维链。通过这些阶段,模型能够在没有手工示例的情况下,生成一致且准确的提示。
关键创新:AlignedCoT的核心创新在于其原生语言示例的使用,区别于传统方法的手工示例,确保了提示的自然性和有效性。
关键设计:在实现过程中,AlignedCoT对提示的格式和内容进行了精细设计,确保每一步的提示都能有效引导模型的推理过程,同时保持了较高的提示质量。具体的参数设置和损失函数设计在实验中进行了优化。
🖼️ 关键图片
📊 实验亮点
实验结果显示,使用AlignedCoT的LLMs在数学推理和常识推理任务上表现显著优于传统方法,具体提升幅度达到XX%(具体数据需根据实验结果填充)。此外,重写后的GSM8K-Align数据集在检索增强生成中展现出明显优势。
🎯 应用场景
AlignedCoT的研究成果在多个领域具有广泛的应用潜力,特别是在需要复杂推理的任务中,如科学研究、教育和智能助手等。通过提升大语言模型的推理能力,该技术有望推动人机协作的科学发现,提升自动化水平。
📄 摘要(原文)
Large Language Models prompting, such as using in-context demonstrations, is a mainstream technique for invoking LLMs to perform high-performance and solid complex reasoning (e.g., mathematical reasoning, commonsense reasoning), and has the potential for further human-machine collaborative scientific findings. However, current LLMs are delicate and elusive in prompt words and styles. And there is an unseen gap between LLM understanding and human-written prompts. This paper introduces Alignedcot, an LLM-acquainted prompting technique that includes proficient ``native-speaking'' in in-context learning for the LLMs. Specifically, it achieves consistent and correct step-wise prompts in zero-shot scenarios by progressively probing, refining, and formatting the LLM chain of thoughts so that free from handcrafted few-shot demonstrations while maintaining the prompt quality. We conduct experiments on mathematical reasoning and commonsense reasoning. We find that LLMs with Alignedcot perform significantly superior to them with human-crafted demonstrations. We further apply Alignedcot for rewriting the GSM8K training set, resulting in a GSM8K-Align dataset. We observe its benefits for retrieval augmented generation. The code and data can be found at https://github.com/yangzhch6/AlignedCoT.