arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.15359cs.CLcs.AIcs.LG
收藏

留意你的步骤:可观察且模块化的思维链

Watch Your Steps: Observable and Modular Chains of Thought

Carnegie Mellon University(卡内基梅隆大学)

Cassandra A. Cohen, William W. Cohen

AI总结:

本文提出 Program Trace Prompting,用基于 Python 的形式化步骤链替代 CoT 自然语言解释,在 BIG-Bench Hard 的 23 项任务上表现强劲,并支持错误分析与模块化验证。

摘要:

我们提出了一种称为 Program Trace Prompting 的思维链(CoT)提示变体,它使解释更具可观察性,同时保留了 CoT 的能力、通用性和灵活性。在我们的方法中,少样本 CoT 示范被封装在基于 Python 的形式化语法中,并且每个提示:识别并命名步骤;定义步骤的输入/输出行为;并用这些形式化步骤在相同示例上构成的链,替换上下文示例中的 CoT 解释。Program Trace Prompting 适用于许多任务,在 BIG-Bench Hard 基准的 23 个多样化任务上取得了强劲结果。更重要的是,通过以这种方式插桩解释,我们支持了新型分析。特别是,我们将“非局部错误”(对应于错误地学习示范中阐明的推理方法)识别为 CoT 学习中一个尚未解决的问题,并提出了用于验证 CoT 解释中步骤模块化的方法。

英文摘要:

We propose a variant of chain of thought (CoT) prompting called Program Trace Prompting that makes explanations more observable while preserving the power, generality and flexibility of CoT. In our approach, few-shot CoT demonstrations are wrapped in a formal syntax based on Python, and each prompt: identifies and names steps; defines the input/output behavior of steps; and replaces CoT explanations of in-context examples with chains of these formalized steps on the same examples. Program Trace Prompting is applicable to many tasks, achieving strong results on the 23 diverse tasks in the BIG-Bench Hard benchmark. More importantly, by instrumenting explanations in this way, we enable new types of analysis. In particular, we identify "non-local errors" (which correspond to incorrectly learning the reasoning method illustrated in the demonstrations) as an unaddressed issue in CoT learning, and we present methods for verifying the modularity of steps in a CoT explanation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑