AgenticMath: Enhancing LLM Reasoning via Agentic-based Math Data Generation
Xianyang Liu, Yilin Liu, Shuai Wang, Hao Cheng, Andrew Estornell, Yuzhi Zhao, Jiaheng Wei · 2025
Read AgenticMath: Enhancing LLM Reasoning via Agentic-based Math Data Generation by Xianyang Liu, Yilin Liu, Shuai Wang, Hao Cheng, Andrew Estornell, Yuzhi Zhao, Jiaheng Wei (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2510-19361.txt.
Introduction
Xianyang Liu and seven co-authors introduce AgenticMath, a multi-agent method for generating high-quality math question and answer data to train language models. Better reasoning needs better training sets, but current pipelines often produce wrong answers or thin, repetitive questions drawn from limited sources.
AgenticMath runs in stages: it filters seed questions for richness and clarity, uses several agents to rephrase them into diverse, consistent variants, and augments answers with step-by-step reasoning. The resulting pairs are meant for supervised fine-tuning. Cleaner synthetic math data could lift reasoning without the cost of hand-writing every training problem.
Catalog record
| CREATOR | Xianyang Liu, Yilin Liu, Shuai Wang, Hao Cheng, Andrew Estornell, Yuzhi Zhao, Jiaheng Wei |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 61 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2510-19361
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
AgenticMath: Enhancing LLM Reasoning via Agentic-based Math Data Generation Xianyang Liu, Yilin Liu, Shuai Wang, Hao Cheng, Andrew Estornell, Yuzhi Zhao, Jiaheng Wei Abstract The creation of high-quality datasets to improve Large Language Model (LLM) reasoning remains a significant challenge, as current methods often suffer from generating low-quality/incorrect answers and limited information richness from available data sources. To address this, we propose AgenticMath , a novel agentic pipeline for generating high-quality mathematical question-answer pairs to enhance the supervised fine-tuning of LLMs. Our method operates through four stages: (1) Seed Question Filter that selects questions with high information richness, complexity, and clarity; (2) an Agentic Question Rephrase step that employs a multi-agent system to generate diverse, logically consistent paraphrases; (3) an Answer Augment step where rewrite answers using chain-of-thought reasoning to enhance numerical and logical correctness, without reliance on human-provided labels; and (4) a final Question and Answer Evaluation that retains only the most superior pairs. Extensive experiments demonstrate that, fine-tuning 3B-8B parameter LLMs on AgenticMath generated datasets (comprising only 30-60K math samples) achieves competitive or superior performance on diverse in domain and out-of-domain mathematical reasoning benchmarks compared to baselines trained on much more data (e.g., 400K or 2.3M samples). Our work demonstrates that targeted, high-quality data generation is a more efficient path to improving mathematical reasoning in LLMs than large-scale, low-quality alternatives. 1 Introduction Large language models (LLMs) ( Brown et al. 2020 ; Achiam et al. 2023 ; Chowdhery et al. 2023 ; Touvron et al. 2023a ) have achieved strong results across many domains, showing impressive general reasoning and knowledge transfer. However, when applied to mathematical reasoning, open models ( Touvron et al. 2023a ; Bai et al. 2023 ; Bi et al. 2024 ) still perform far below human levels, struggling with the precision and consistency required. Mathematical problems demand long chains of logic that combine symbolic manipulation, cross-domain knowledge, and step-by-step numerical accuracy ( Ahn et al. 2024 ; Long et al. 2024 ) . These requirements make math reasoning more complex and error-prone than typical natural language tasks. Limitations in Existing Math Reasoning Methods. To improve the mathematical proficiency of LLMs, research has mainly followed two paths. The first uses prompt engineering ( Fu et al. 2022 ) , such as Chain-of-Thought ( Wei et al. 2022 ) and Self-Consistency ( Wang et al. 2022 ) , which guide models to produce reasoning chains at test time. This method is simple and training-free but its gains are limited by model capacity and often unstable across problem types. The second path relies on powerful base models to synthesize large numbers of question–solution pairs for supervised fine-tuning (SFT) ( Yu et al. 2023 ; Li et al. 2024a ; Yue et al. 2023 ; Gou et al. 2023 ) . This reduces annotation costs and boosts benchmark scores, yet performance is capped by the quality of the synthetic data. When generated problems lack clarity, rigor, or diversity, the resulting models remain far below the performance attainable with expert-annotated corpora. The core challenge is not just producing solutions but enforcing strict quality control during problem synthesis, since the problem statement shapes both the reasoning process and the useful information in the dataset. Limitations in Multi-Agent Data Generation for Mathematics. Recent work has introduced LLM-based multi-agent frameworks to improve synthetic corpora ( Abdullin et al. 2024 ; Chen et al. 2024a ; Mitra et al. 2024a ; Ge et al. 2024 ; Chen et al. 2024b ; Ye et al. 2024 ) . Most of these methods target general-purpose instruction data, where task formulation is relatively shallow. In mathematics, the quality of the problem itself is decisive: precise formulation, logical coherence, and sufficient variability not only ensure solvability but also drive the generation of rigorous solutions. Without careful problem design, even advanced solution-generation strategies cannot compensate for poorly posed questions, keeping the dataset far from its upper bound. Existing multi-agent methods rarely enforce such domain-specific constraints, and prior attempts in mathematical data generation ( Mitra et al. 2024b ; Motwani et al. 2024 ) still lack systematic control at the problem construction stage. How AgenticMath Tackles the Challenges. To address these challenges, we propose AgenticMath , an automated multi-agent framework that enforces quality control at every stage of mathematical data generation. The framework leverages LLMs for generation, evaluation, and coordinated decision-making. It proceeds in four stages: (1) Seed filtering extracts high-value problems from human-authored corpora; (2) Problem synthesis engages cooperative agents to rephrase and diversify questions under explicit quality-control criteria; (3) Solution generation employs a solver agent to produce complete reasoning chains with rigor and correctness; and (4) Quality evaluation aggregates multi-dimensional scores to assess each problem–solution pair. By retaining only top-scoring samples, AgenticMath resolves the data quality bottleneck and follows the “Less Is More” principle. The result is a data-efficient, high-quality dataset that directly addresses the challenges of clarity, rigor, and diversity in mathematical reasoning tasks. Empirical Results and Contributions. We evaluate AgenticMath on six mathematical reasoning benchmarks, including in-domain tasks (GSM8K ( Cobbe et al. 2021 ) , MATH ( Hendrycks et al. 2021 ) ) and out-of-domain settings (CollegeMath ( Tang et al. 2024 ) , DeepMind Mathematics ( Saxton et al. 2019 ) , OlympiadBench ( He et al. 2024 ) , TheoremQA ( Chen et al. 2023 ) ). AgenticMath matches or surpasses previous methods that rely on hundreds of thousands or even millions of samples (e.g., 400K or 2.3M), while using far fewer data. With only 30K–60K samples, performance improves by over 10 points on average, showing clear data efficiency and strong generalization to out-of-domain tasks. These results establish AgenticMath as an efficient and competitive approach to advancing mathematical reasoning. The main contributions of this work are as follows: • Agentic Math Data Generation: We propose AgenticMath , an effective multi-agent framework for synthesizing, evaluating, and refining mathematical problems and solutions, offering a systematic and scalable paradigm for building high-quality reasoning corpora. • High-Quality Math Data: We release AgenticMathQA , a curated dataset in 30K, 60K, and 90K versions. Unlike prior approaches that rely on scale, our dataset emphasizes clarity, correctness, and diversity, providing higher-quality supervision for mathematical reasoning. • Comprehensive Empirical Validation and Insights: Extensive experiments show that with only 5%–15% of the data size, AgenticMath matches or even surpasses methods trained on 400K–2M samples. This result demonstrates that data quality, rather than dataset scaling alone, is the main factor behind improvements in mathematical reasoning. 2 Related Work LLM for Math Reasoning. Large language models ( Brown et al. 2020 ; Achiam et al. 2023 ; Touvron et al. 2023a ; Touvron et al. 2023b ; Chowdhery et al. 2023 ; Bi et al. 2024 ; Team et al. 2023 ; Team et al. 2024 ; Grattafiori et al. 2024 ) show strong general ability and are increasingly applied to mathematical problem solving ( Cobbe et al. 2021 ; Hendrycks et al. 2021 ; Zhang et al. 2024a ; Xia et al. 2025 ) . Prompt-based approaches ( Wei et al. 2022 ; Wang et al. 2022 ; Fu et al. 2022 ) extend reasoning paths but yield limited improvements. Recent work thus emphasizes synthesizing math reasoning data for supervised fine-tuning (