# What AI Can Do: Writing Useful Math Word Problems

TL;DR – Being specific is a necessary but not sufficient condition for prompts for AI. Including examples in your prompts can work wonders. Now, read on.

Let me tell you about one of the worst math games I ever saw. It was used in an alternative high school program for students who were behind in math. A math problem appeared on a screen, with an outer space background. The student typed in an answer. If it was correct, an alien appeared and hit a golf ball. That was it. That was the whole game, over and over. I watched it for a while and it just slipped out, I exclaimed,

“That looks boring as @#\$ !”

Without turning around, the student responded, “It is.”

Since we pride ourselves on making games that teach math in context, I spend part of my time writing math problems. We know that games that include a story and game play, like search games, platformer games, etc. have more game play, more math problems solved by students. So, I spend time coming up with math problems that both fit a story and address a standard.

As anyone who uses AI can tell you, one key to getting the response from Gemini or ChatGPT is be specific.

## My first, unsuccessful prompt.

“Write ten math problems requiring using an equation, in the context of ranching.”

– Produced several problems that were not what I needed. Something like

Problem: A rancher needs to distribute 500 liters of water equally among 5 cattle troughs. How many liters of water will each trough receive?
Equation:   Total water /Number of troughs=Water per trough

That is a problem and it does have an equation but I’m really looking for something at the middle school level that addresses this math standard, “Solve real-life and mathematical problems using numerical and algebraic expressions and equations.” Instead, I got a division problem.

## My final, (mostly) successful prompt.

In my final prompt (I’ll skip the iterations in between), I started with the same prompt and added the instruction to give both the equation and the answer. What really made a difference in the results, though, was including specific examples. I found two examples to be sufficient to increase the percentage of useful responses I received from 10-30% each time to 100%. In the example below, I used blank lines and indented the examples for readability, but you could just type it all as one paragraph.

Write ten math problems requiring using an equation, in the context of ranching. Do not repeat the same problem. Give the equation used to solve the problem and the answer.

Example:  You need to fence in a 400-foot perimeter. You’ll put a post every 8 feet. A six-pack of posts costs \$30. A foot of wire costs \$.24. What is the equation to compute the cost of the fence?

Equation:   (.24 x 400) +  30 * ((400/8)/6)

Example: You have 500 head of cattle. Each cow needs to eat 20 pounds of hay per day. You have 10,000 pounds of hay in storage. How many days will the hay last?

Equation:  10,000/ (500 x 20)

Here are two examples of the responses I received.

**Problem:** You have 500 head of cattle. You want to sell each cow for \$1,000. You also have 200 acres of land that you can sell for \$10,000 per acre. How much money will you make if you sell all of your cattle and land?

**Equation:** (500 * 1000) + (200 * 10000)