Chain-of-thought (CoT) prompting with large language models has proven effective in numerous natural language processing tasks, but designing prompts that generalize well to diverse problem types can be challenging, especially in the context of math word problem (MWP) solving. Additionally, it is common to have a large amount of training data that have a better diversity coverage but CoT annotations are not available, which limits the use of supervised learning techniques. To address these issues, we investigate two approaches to leverage the training data in a few-shot prompting scenario: dynamic program prompting and program distillation. Our approach is largely inspired by Gao et al., (2022), where they proposed to replace the CoT with the programs as the intermediate reasoning step. Such a prompting strategy allows us to accurately verify the answer correctness through program execution in MWP solving. Our dynamic program prompting involves annotating the training data by sampling correct programs from a large language model, while program distillation involves adapting a smaller model to the program-annotated training data. Our experiments on three standard MWP datasets demonstrate the effectiveness of these approaches, yielding significant improvements over previous baselines for prompting and fine-tuning. Our results suggest that leveraging a large amount of training data can improve the generalization ability of prompts and boost the performance of fine-tuned small models in MWP solving
翻译:链式思维提示与大型语言模型已在众多自然语言处理任务中被证明有效,但设计能良好泛化至不同问题类型的提示仍具挑战性,尤其在数学应用题求解场景中。此外,实际中常存在大量覆盖多样性更好但缺乏链式思维标注的训练数据,这限制了监督学习技术的应用。为解决这些问题,我们探索了两种在少样本提示场景中利用训练数据的方法:动态程序提示与程序蒸馏。该思路主要受Gao等人(2022)启发,他们提出用程序替代链式思维作为中间推理步骤。这种提示策略使我们能通过数学应用题求解中的程序执行准确验证答案正确性。动态程序提示通过从大型语言模型中采样正确程序来标注训练数据,而程序蒸馏则使更小模型适应经程序标注的训练数据。在三个标准数学应用题数据集上的实验证明了这些方法的有效性,相比以往的提示和微调基线方法取得了显著改进。我们的结果表明,利用大量训练数据能增强提示的泛化能力,并提升经微调的小模型在数学应用题求解中的性能。