How to make GPT 3.5 to be a bit smarter in math?

I’m trying to make an application using gpt-3.5-turbo, but it seems that it can’t do simple math properly. Here’s an example demonstration using ChatGPT web-interface.

My prompt:
“Here are some information:

  • A voltage range is from 0.3V to 18V
  • B voltage range is from 1.3V to 1.9V
    From those information, please answer “which one can provide 1.5V voltage, A or B?” Please think step-by-step”

Response:
“Neither A nor B can provide a 1.5V voltage directly within their given voltage ranges. However, there are different ways to obtain a 1.5V voltage using these ranges.

One way to obtain a 1.5V voltage using the given voltage ranges is to use a voltage regulator. A voltage regulator is an electronic component that can provide a stable output voltage regardless of changes in the input voltage or current.”

What should I change my prompt to make it smarter in math?

Difficult for got 3.5

But if you give it the equation and some examples

Within the range of example it will answer
Especially if you ask for a first approximation

And then ask to refine it

But not the right way to do it

Just add a calc in your app that ChatGpt can query

Hey mate,
And welcome to the forum, great example, I tried your prompt 5 times and it failed to respond accurately every single time.

The correct way to do this is indeed to use some external function or calculator, then feed those results to GPT, we can do this by just appending the correct answer to the initial prompt:

A voltage range is from 0.3 up to 18V
B voltage range is from 1.3 up to 1.9V
From those information, please answer “which one(s) can provide 1.5V voltage?”
(CORRECT ANSWER: Both A & B)

We get the response:

Both A and B can provide 1.5V voltage. In range A, 1.5V falls between 0.3V and 18V, while in range B, it falls between 1.3V and 1.9V.

Language Models are inherently bad at math, I’ve written some more about it in the thread over here:

1 Like

Dear N2U,
I’ve lot of problems with GPT4 and Math. GPT4 makes a lot of mistakes and I would like to train my own MathGPT bot to help a lot of students in a proper way with math. But how can I train my bot. There are several levels of input : the conversation between tutors ans student to generate conversitian data 2) mathproblems for the students 3) theorie old exams etc.
Can you help me or advice a bit with this?

Hey there!

You will probably need to create multiple fine tunes, one for each situation and use a different tool like the wolfram alpha API to check if the results are correct.

For a start you will need to gather data like tutor-student chats, math problems, and study materials to create a rich dataset.
Then you’ll need to tidy up your data, make it consistent, and use a tool like Wolfram API to double-check the math is correct.
Then you can use a platform like OpenAI’s API to fine-tune GPT-4 with your situation specific dataset.

I hope this helps you create an awesome MathGPT bot! Best of luck! :smile:

1 Like