← Latest papers
💬 NLP

Elementary Math Word Problem Generation using Large Language Models

This paper introduces MathWiz, a Large Language Model-based system that generates elementary math word problems using only minimal inputs (quantity, grade, and type), demonstrating high grammatical quality through extensive experiments while acknowledging current limitations in strictly adhering to specified grade levels and question types.

Original authors: Nimesh Ariyarathne, Harshani Bandara, Yasith Heshan, Omega Gamage, Surangika Ranathunga, Dilan Nayanajith, Yutharsan Sivapalan, Gayathri Lihinikaduarachchi, Tharoosha Vihidun, Meenambika Chandirakumar
Published 2026-03-27
📖 5 min read🧠 Deep dive

Original authors: Nimesh Ariyarathne, Harshani Bandara, Yasith Heshan, Omega Gamage, Surangika Ranathunga, Dilan Nayanajith, Yutharsan Sivapalan, Gayathri Lihinikaduarachchi, Tharoosha Vihidun, Meenambika Chandirakumar, Sanujen Premakumar, Sanjula Gathsara

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a teacher trying to create a stack of math homework problems for your students. You need them to be just right: not too hard, not too easy, and covering specific topics like "adding single digits" or "subtracting two-digit numbers."

Doing this by hand is like baking a cake from scratch every single time. You have to measure the flour (the numbers), mix the batter (the story), and make sure the spelling is perfect. It takes forever, and if you get tired, you might accidentally write "apples" as "aples" or create a problem that doesn't actually make sense.

This paper introduces MathWiz, a new tool designed to be your super-chef assistant. It uses a type of Artificial Intelligence called a "Large Language Model" (LLM) to bake these math problems for you instantly.

Here is how the researchers built and tested this assistant, explained in simple terms:

1. The Problem with Early Assistants

Before MathWiz, other AI tools were like robots that needed a recipe card. If you wanted a math problem, you had to give the AI the equation first (e.g., "5 + 3 = ?") or the first sentence of the story. The AI would just finish the sentence. This was limiting because the teacher still had to do the hard work of coming up with the idea.

MathWiz is different. You don't need to give it a recipe. You just tell it: "I need 5 problems for 1st graders about adding numbers." The AI then creates the whole story from scratch, like a chef who knows how to cook without a recipe book.

2. The Training Process (Teaching the Assistant)

The researchers didn't just turn the AI on and hope for the best. They treated it like a student teacher going through a rigorous training program:

  • Choosing the Right Brain: They tested different AI models (like Llama-2, Mistral, and Zephyr) to see which one was the smartest baker. They picked Llama-2 because it was the most reliable.
  • Finding the Right Voice (Prompting): They tried different ways of asking the AI. Some were like giving a command ("Do this"), others were like role-playing ("Pretend you are a math teacher"). They found that giving clear, structured instructions worked best.
  • Adding Variety (Diversity): Sometimes, AI gets bored and repeats itself, like a robot saying "The cat sat on the mat" over and over. The researchers tweaked the AI's settings (like turning a "randomness dial") to make sure every problem was unique, just like a real teacher wouldn't give the exact same question twice.
  • The "Human Touch" (Fine-Tuning): The AI was then shown thousands of examples of good math problems that the researchers wrote by hand. This is like showing the student teacher a stack of perfect lesson plans so they can learn the style.
  • The "Feedback Loop" (Preference Optimization): The researchers asked human teachers to look at the AI's work and say, "I like this one, but I hate that one." The AI learned from these choices, kind of like a video game character leveling up by learning what the player likes.

3. The Safety Net (The Solvability Checker)

Even with all this training, the AI sometimes makes mistakes. It might create a problem that is impossible to solve (like "Tom has 5 apples, his friend gives him some, how many does he have?" without saying how many the friend gave).

To fix this, the researchers added a second AI that acts as a quality control inspector. Before a problem is given to the student, this inspector checks: "Can this actually be solved?" If the answer is "No," the inspector throws it in the trash and asks the main AI to try again.

4. The Results: Good, but Not Perfect

The team tested MathWiz by having humans and computers grade the problems.

  • The Good News: The AI is amazing at writing clear sentences, avoiding spelling mistakes, and making sure the problems aren't dangerous or inappropriate. It's a great tool for generating ideas.
  • The Bad News: The AI still struggles with the math rules. Sometimes it creates a problem that looks like it's for a 1st grader but actually requires 6th-grade math skills. It's like a student teacher who writes a beautiful story but forgets to do the math correctly.

The Big Takeaway

MathWiz is a powerful drafting tool. It can do 90% of the heavy lifting, creating hundreds of unique, grammatically correct math problems in seconds. However, it still needs a human teacher to do the final "proofreading" to make sure the math logic is sound and the difficulty level is just right.

The researchers also released their dataset (the collection of problems they created and the errors they found) to the public. This is like giving other teachers a cookbook of mistakes and fixes, so everyone can build better AI tools in the future.

In short: MathWiz is a brilliant assistant that can write the story, but it still needs a human teacher to check the math.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →