mlsanityData to 13 Oct 2026

LPML: LLM-Prompting Markup Language for Mathematical Reasoning

arXiv 2309.13078 ↗First posted 21 Sep 2023cs.AI cs.LG cs.PLcited by 15

On the map: LLM reasoning → Mathematical reasoning

Abstract (arXiv)

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.

Key facts. Cited by 15 papers in the map (data through 13 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 13 of its 14 references that are in the map. First posted on arXiv 21 Sep 2023.

Builds on

13 of 14 references.

Closest ancestors · 1

Same direction, newest first

  1. 2022Solving Quantitative Reasoning Problems with Language Models29 Jun

Other references · 12

  1. 2020Language Models are Few-Shot Learnerscited by 32,320
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,376
  3. 2021Training Verifiers to Solve Math Word Problemscited by 9,916
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,502
  5. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,657
  6. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,270
  7. 2022Large Language Models are Zero-Shot Reasonerscited by 4,348
  8. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,117
  9. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,404
  10. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,066
  11. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 878
  12. 2022PAL: Program-aided Language Modelscited by 647

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 8; 2025: 6.

15 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2024Gap-Filling Prompting Enhances Code-Assisted Mathematical Reasoning
  2. 2025Thinking Machines: Mathematical Reasoning in the Age of LLMs
  3. 2025Can LLMs textitunderstand Math? -- Exploring the Pitfalls in Mathematical Reasoning
  4. 2024Arithmetic Reasoning with LLM: Prolog Generation & Permutation
  5. 2025Premise-Augmented Reasoning Chains Improve Error Identification in Math reasoning with LLMs
  6. 2024MARIO: MAth Reasoning with code Interpreter Output -- A Reproducible Pipeline
  7. 2024LLM Reasoning Engine: Specialized Training for Enhanced Mathematical Reasoning
  8. 2025Do LLMs Overthink Basic Math Reasoning? Benchmarking the Accuracy-Efficiency Tradeoff in Language Models