LPML: 面向数学推理的LLM提示标记语言
LPML: LLM-Prompting Markup Language for Mathematical Reasoning
AI总结:
提出LPML框架,通过XML式标记语言将思维链与Python REPL结合,利用零样本提示增强LLM的数学推理能力,并纠正推理与计算错误。
摘要:
在利用大型语言模型(LLM)进行数学推理时,解决LLM生成文本中出现的推理和计算错误是一个关键挑战。本文提出了一种新颖的框架,将思维链(CoT)方法与外部工具(Python REPL)相结合。我们发现,通过提示LLM生成XML式标记语言的结构化文本,可以无缝集成CoT和外部工具,并控制LLM的不良行为。通过我们的方法,LLM可以利用Python计算来纠正CoT中的错误。我们将该方法应用于ChatGPT(GPT-3.5)以解决具有挑战性的数学问题,并证明通过标记语言结合CoT和Python REPL能够增强LLM的推理能力。我们的方法使LLM能够仅通过零样本提示编写标记语言并执行高级数学推理。
英文摘要:
In utilizing large language models (LLMs) for mathematical reasoning, addressing the errors in the reasoning and calculation present in the generated text by LLMs is a crucial challenge. In this paper, we propose a novel framework that integrates the Chain-of-Thought (CoT) method with an external tool (Python REPL). We discovered that by prompting LLMs to generate structured text in XML-like markup language, we could seamlessly integrate CoT and the external tool and control the undesired behaviors of LLMs. With our approach, LLMs can utilize Python computation to rectify errors within CoT. We applied our method to ChatGPT (GPT-3.5) to solve challenging mathematical problems and demonstrated that combining CoT and Python REPL through the markup language enhances the reasoning capability of LLMs. Our approach enables LLMs to write the markup language and perform advanced mathematical reasoning using only zero-shot prompting.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。