arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.05407cs.CL

填补空白提示增强代码辅助数学推理

Gap-Filling Prompting Enhances Code-Assisted Mathematical Reasoning

Amirkabir University of Technology(阿米尔卡比尔理工大学)

Mohammad Ghiasvand Mohammadkhani

AI总结:

本文提出填补空白提示(GFP)两步策略,通过识别并填补问题中的信息空白来增强小型语言模型的代码辅助数学推理能力,在两个基准上显著提升性能。

摘要:

尽管大型语言模型(LLMs)在数学推理等任务中表现出色,但其实际应用受到高计算需求和专有限制的制约。思维链(CoT)和程序思维(PoT)微调是将LLM知识迁移到小型语言模型(SLMs)的常用方法。然而,CoT常导致SLM出现计算错误,而PoT则显示出更大的潜力。虽然大多数基于PoT的方法侧重于直接的问题到代码转换,或仅从问题中提取关键信息然后提供代码解决方案,但本工作强调填补问题中的空白以清晰展示解题路径,因为当此类信息未明确提供时,SLM可能难以理解。因此,本文引入了填补空白提示(GFP),一种新颖的两步提示策略,旨在增强SLM的问题解决过程。第一步识别这些空白并提供填补提示,第二步将提示添加到问题中以生成最终代码解决方案。在两个基准数据集上的实验结果表明,GFP显著提升了SLM的数学推理能力。

英文摘要:

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.

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

↑