Modeling Complex Mathematical Reasoning via Large Language Model based MathAgent

Haoran Liao, Qinyi Du, Shaohua Hu, Hao He, Yanyan Xu +2 more
12/14/2023
3 citations
cs.AIcs.CL

Official code: oashua/MathAgent (21 stars, Jupyter Notebook, MIT, last commit 2023-12-15).

Abstract

Large language models (LLMs) face challenges in solving complex mathematical problems that require comprehensive capacities to parse the statements, associate domain knowledge, perform compound logical reasoning, and integrate the intermediate rationales. Tackling all these problems once could be arduous for LLMs, thus leading to confusion in generation.

Show full abstract

In this work, we explore the potential of enhancing LLMs with agents by meticulous decomposition and modeling of mathematical reasoning process. Specifically, we propose a formal description of the mathematical solving and extend LLMs with an agent-based zero-shot framework named $\bf{P}$lanner-$\bf{R}$easoner-$\bf{E}$xecutor-$\bf{R}$eflector (PRER). We further provide and implement two MathAgents that define the logical forms and inherent relations via a pool of actions in different grains and orientations: MathAgent-M adapts its actions to LLMs, while MathAgent-H aligns with humankind. Experiments on miniF2F and MATH have demonstrated the effectiveness of PRER and proposed MathAgents, achieving an increase of $12.3\%$($53.9\%\xrightarrow{}66.2\%$) on the MiniF2F, $9.2\%$ ($49.8\%\xrightarrow{}59.0\%$) on MATH, and $13.2\%$($23.2\%\xrightarrow{}35.4\%$) for level-5 problems of MATH against GPT-4. Further analytical results provide more insightful perspectives on exploiting the behaviors of LLMs as agents.

View on arXivView PDF

Code Implementations(1)

oashua/MathAgentOfficial100%
MIT

Code repo for MathAgent

216Jupyter Notebook, PythonDec 14, 20232 years agoMIT

Similar Papers

Cite this paper

@article{liao2023modeling,
  title  = {Modeling Complex Mathematical Reasoning via Large Language Model based MathAgent},
  author = {Haoran Liao and Qinyi Du and Shaohua Hu and Hao He and Yanyan Xu and Jidong Tian and Yaohui Jin},
  year   = {2023},
  eprint = {2312.08926},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.08926v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.08926.svg)](https://codeofpaper.com/paper/2312.08926)

Discussion