LPML: LLM-Prompting Markup Language for Mathematical Reasoning
Ryutaro Yamauchi, Sho Sonoda, Akiyoshi Sannai, Wataru Kumagai

TL;DR
This paper introduces LPML, a markup language that enables large language models to improve mathematical reasoning by integrating structured prompts, external Python computation, and chain-of-thought methods, enhancing accuracy in problem-solving.
Contribution
The paper presents a novel framework that combines a markup language with external Python tools and chain-of-thought prompting to improve LLMs' mathematical reasoning capabilities.
Findings
LPML improves reasoning accuracy in LLMs.
Combining CoT with external tools reduces errors.
Zero-shot prompting achieves effective mathematical reasoning.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsScientific Computing and Data Management · Topic Modeling · Explainable Artificial Intelligence (XAI)
