Training and Evaluating Language Models with Template-based Data Generation
Not on the map. Why?
Abstract (arXiv)
The rapid advancement of large language models (LLMs) such as GPT-3, PaLM, and Llama has significantly transformed natural language processing, showcasing remarkable capabilities in understanding and generating language. However, a fundamental bottleneck persists: these models often struggle with tasks requiring complex, multi-step reasoning, particularly in mathematical problem-solving. This deficiency stems from the critical scarcity of large-scale, high-quality, domain-specific datasets necessary for cultivating sophisticated reasoning abilities. To overcome this challenge, we introduce Template-based Data Generation (TDG), a novel and scalable paradigm that harnesses frontier LLMs (GPT-4) to automatically generate parameterized meta-templates, which in turn synthesize a virtually infinite stream of high-quality problems and solutions. Using this paradigm, we create TemplateMath Part I: TemplateGSM, a foundational dataset of over 7 million synthetically generated grade school math problems. Each problem is accompanied by a programmatically verifiable solution, offering an unprecedented level of quality at scale. This resource not only resolves the data scarcity issue for supervised fine-tuning but also provides a robust mechanism for model alignment through Reinforcement Learning with Verifiable Rewards (RLVR). Our approach elevates data augmentation by leveraging GPT-4 to generate meta-templates, ensuring diverse and complex problem structures. By providing a scalable solution to the data and verification bottleneck, TDG and TemplateGSM pave the way for a new generation of LLMs with powerful, reliable reasoning skills.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 16 of its 18 references that are in the map. First posted on arXiv 27 Nov 2024.
Builds on
16 of 18 references.
References · 16
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,392
- 2023MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Modelscited by 735
- 2017Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problemscited by 650
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 487
- 2021A Survey of Data Augmentation Approaches for NLPcited by 409
- 2022Large Language Models are Better Reasoners with Self-Verificationcited by 307
4 more
- 2023ProofNet: Autoformalizing and Formally Proving Undergraduate-Level Mathematicscited by 192
- 2023OpenWebMath: An Open Dataset of High-Quality Mathematical Web Textcited by 155
- 2024Autonomous Data Selection with Zero-shot Generative Classifiers for Mathematical Textscited by 27
- 2023Meta Prompting for AI Systemscited by 16
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2026Triplets Better Than Pairs: Towards Stable and Effective Self-Play Fine-Tuning for LLMscited by 9
- 2025ASyMOB: Algebraic Symbolic Mathematical Operations Benchmarkcited by 5
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshapingcited by 1
- 2026Synthetic Data for Veterinary EHR De-identification: Benefits, Limits, and Safety Trade-offs Under Fixed Computecited by 0
- 2026XLGoBench: Detecting cross-lingual skill gaps with algorithmic taskscited by 0
- 2026Atom Learning Model (ALM): how a real classroom got tokenisedcited by 0
- 2026Atom Learning Model (ALM): how a real classroom got tokenised21 Aug 2026
- 2026XLGoBench: Detecting cross-lingual skill gaps with algorithmic tasks29 May 2026
- 2026Reforming the Mechanism: Editing Reasoning Patterns in LLMs with Circuit Reshaping6 Mar 2026
- 2026Synthetic Data for Veterinary EHR De-identification: Benefits, Limits, and Safety Trade-offs Under Fixed Compute13 Jan 2026
- 2026Triplets Better Than Pairs: Towards Stable and Effective Self-Play Fine-Tuning for LLMs13 Jan 2026
- 2025ASyMOB: Algebraic Symbolic Mathematical Operations Benchmark28 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024Template-Driven LLM-Paraphrased Framework for Tabular Math Word Problem Generation
- 2024MathGenie: Generating Synthetic Data with Question Back-translation for Enhancing Mathematical Reasoning of LLMs
- 2025Arrows of Math Reasoning Data Synthesis for Large Language Models: Diversity, Complexity and Correctness
- 2024Neuro-Symbolic Data Generation for Math Reasoning
- 2025Can Structured Templates Facilitate LLMs in Tackling Harder Tasks? : An Exploration of Scaling Laws by Difficulty
- 2024Exploring Mathematical Extrapolation of Large Language Models with Synthetic Data
- 2025SPARQ: Synthetic Problem Generation for Reasoning via Quality-Diversity Algorithms
- 2025Advancing Mathematical Reasoning in Language Models: The Impact of Problem-Solving Data, Data Synthesis Methods, and Training Stages