通过补全问题空白,提升小模型解数学题能力
Gap-Filling Prompting Enhances Code-Assisted Mathematical Reasoning
- 两步提示法:先找问题缺失信息,再补全生成代码
- 在两个基准数据集上显著提升小模型数学推理准确率
- 适合资源受限场景下增强小模型的逻辑求解能力
尽管大语言模型在数学推理任务中表现优异,但其实际应用受限于高计算成本和专有模型限制。链式思维(CoT)和程序思维(PoT)微调是将大模型知识迁移至小语言模型(SLMs)的常用方法。然而,CoT常导致小模型出现计算错误,而PoT更具潜力。现有大多数基于PoT的方法仅关注问题到代码的直接转换,或仅提取问题关键信息后生成代码,忽视了问题中隐含逻辑空白对小模型理解的障碍。本文提出一种新型两步提示策略——缺口填充提示(Gap-Filling Prompting, GFP),首先识别问题中的逻辑缺口并提供提示,再将提示补入原问题,生成最终代码解决方案。实验结果表明,在两个基准数据集上,GFP显著提升了小模型的数学推理能力。
原文摘要 · Abstract (English)
Despite the strong performance of large language models (LLMs) in tasks like mathematical reasoning, their practical use is limited by high computational demands and proprietary restrictions. Chain-of-thought (CoT) and program-of-thought (PoT) fine-tuning are common methods to transfer LLM knowledge to small language models (SLMs). However, CoT often leads to calculation errors in SLMs, while PoT has shown more promise. While most PoT-based approaches focus on direct problem-to-code conversion or extracting only the key information from questions and then providing code solution for it, this work emphasizes filling the gaps in the question to clearly illustrate the solution path, which can be challenging for an SLM to understand when such information is not explicitly provided. Therefore, this paper introduces Gap-Filling Prompting (GFP), a novel two-step prompting strategy designed to enhance the problem-solving process for SLMs. The first step identifies these gaps and provides hints for filling them, while the second step adds the hints to the question to generate a final code solution. Experimental results on two benchmark datasets demonstrate that GFP significantly improves the mathematical reasoning abilities of SLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。