Abstract
Math word problems are critical K-8 educational tools, but writing them is time consuming and requires extensive expertise. To be educational, problems must be solvable, have accurate answers, and, most importantly, be educationally appropriate. We propose that language models have potential to support K-8 math education by automatically generating word problems. However, evaluating educational appropriateness is hard to quantify. We fill this gap by having teachers evaluate problems generated by LLMs, who find existing models and data often fail to be educationally appropriate. We then explore automatically generating educational word problems, ultimately using our expert annotations to finetune a 70B language model. Our model, MATHWELL, is the first K-8 word problem generator targeted at educational appropriateness. Further expert studies find MATHWELL generates problems far more solvable, accurate, and appropriate than public models. MATHWELL also matches GPT-4’s problem quality while attaining more appropriate reading levels for K-8 students and avoiding generating harmful questions.
Introduction
Large Language Models (LLMs) have demonstrated remarkable proficiency in solving mathematical problems. However, generating high-quality, educationally appropriate math word problems (MWPs) for K-8 students remains a significant challenge. Teachers often spend considerable time crafting problems that align with student interests and grade-level requirements. When time is scarce, they frequently resort to generic problem sets that may not be engaging or perfectly suited to their classroom's needs.
Existing datasets used for training AI models, such as GSM8K, are typically crowd-sourced rather than educator-sourced. This leads to several critical issues:
- Inappropriate Content: Problems may feature themes unsuitable for young learners, such as medication, violence, or highly unrealistic scenarios.
- Solvability and Accuracy: AI-generated problems are often unsolvable or provided with incorrect answers.
- Reading Level Discrepancies: Models frequently generate text at reading levels far above the K-8 target, frustrating students who are still developing literacy skills.
Methodology
To address these challenges, we developed MATHWELL, a 70B parameter language model specifically designed for educational MWP generation. Our approach involves a multi-stage pipeline:
Data Collection and Annotation
We introduced the EGSM (Educational Grade School Math) dataset, which contains 2,093 teacher-verified MWPs. We recruited seasoned K-12 teachers to evaluate thousands of synthetic problems based on three key criteria: Solvability, Accuracy, and Appropriateness. Problems meeting all three criteria are designated as MaC (Meets all Criteria).
Model Training
MATHWELL was developed through a two-stage finetuning process using QLoRA. The model was first trained on public datasets like MathInstruct and GSM8K, then finetuned specifically on the teacher-verified MaC problems from the EGSM dataset. To ensure mathematical rigor, MATHWELL utilizes Program of Thought (PoT) prompting, generating solutions as executable Python functions rather than plain text.
Key Results and Insights
Our evaluations demonstrate that MATHWELL significantly outperforms existing open-source models and rivals proprietary models like GPT-4 Turbo in educational quality.
Performance Metrics
- MaC Rate: MATHWELL generates problems meeting all educational criteria 74.8% of the time, a substantial improvement over the base Llama-2 70B model (62.4%) and approaching GPT-4 Turbo (78.8%).
- Accuracy: MATHWELL achieved a 96.9% accuracy rate in its generated answers, the highest among all tested models.
- Readability: MATHWELL produced the most accessible content, with a mean Flesch-Kincaid Grade Level (FKGL) of 2.5, making it ideal for the K-8 demographic.
- Safety: In expert reviews, MATHWELL was the only model to produce zero "harmful" or "too difficult" errors during the final testing phase.
The Value of Teacher Expertise
A key finding is the "appropriateness gap." Even powerful models trained on standard math datasets often fail to produce classroom-safe content. By incorporating teacher intuition through the EGSM dataset, we bridged this gap. The significant performance jump after the second stage of finetuning underscores that high-quality, expert-annotated data is more impactful than sheer data volume.
Limitations and Future Work
While MATHWELL represents a significant step forward, several areas for improvement remain:
- Multimodality: The current model is text-only. Future iterations could incorporate visual elements like charts and tables common in math education.
- Granular Grade Targeting: While targeting K-8 generally, further refinement could allow for more specific targeting of individual grade levels.
- Subjectivity of Appropriateness: Standards for appropriateness can vary. Future work could explore adapting the model to different cultural or regional educational guidelines.
Conclusion
MATHWELL demonstrates the power of combining large-scale language modeling with domain-specific expert knowledge. By prioritizing educational appropriateness alongside mathematical accuracy, we have created a tool that can meaningfully support teachers in generating high-quality, safe, and engaging learning materials for students.
Summary updated