# OpenAI struggles in balancing chemical equations

Sample:
Q: Balance H2SO4 + HI → H2S + I2 + H2O
A: 2 HI + H2SO4 → H2S + I2 + 2 H2O

2 Likes

GPT-3 struggles with math, especially when you use the number form instead of word form. Maybe convert the numbers to their word form counterparts and see if results improve, and perform more prompt engineering to leverage making GPT-3 pay more attention and telling it to focus on ensuring the chemical equations are balanced.

Is GPT-3 good at math? Let the answers speak for themselves!

1 Like

Try using this approach (Davinci 2 output in bold):

The following example shows step by step how we can balance chemical equations.

Chemical equation to be balanced:

H2SO4 + HI → H2S + I2 + H2O

Let’s think this through step by step:

1. In order for the equation to be balanced, we need the same number of atoms of each element on both sides of the arrow.
2. On the left side, we have 2 atoms of hydrogen, 1 atom of sulfur, 4 atoms of oxygen.
3. On the right side, we have 2 atoms of hydrogen, 1 atom of sulfur, 2 atoms of iodine, and 1 atom of oxygen.
4. In order to balance the equation, we need to add 2 atoms of iodine on the left side.
5. The balanced equation would then be:

H2SO4 + 2HI → H2S + I2 + H2O

Disclaimer: I don’t know if the output is correct but the AI seems to be following a logical process, so I assume it should be correct?

1 Like

I need product of this eqiation