I have tried to create a new task for ChatGPT, starting from the simple math problem in the Guidelines section of the course. Basically I’ve just asked ChatGPT to solve the problem with this prompt
prompt = f"""
Your task is to solve a math problem and provide the solution.
Use the following format:
The problem
===
summary of the problem here
===
The solution
===
solution here. Make sure the math is correct
===
Question:
===
I'm building a solar power installation and I need help \
working out the financials.
- Land costs $100 / square foot
- I can buy solar panels for $250 / square foot
- I negotiated a contract for maintenance that will cost \
me a flat $100k per year, and an additional $10 / square \
foot
What is the total cost for the first year of operations \
as a function of the number of square feet.
===
"""
response = get_completion(prompt)
print(response)
While the summarisation of the problem looks great to me, the solution seems wrong. Any suggestions on how to avoid this type of errors from ChatGPT?
The response
The problem
===
What is the total cost for the first year of operations as a function of the number of square feet, given that land costs $100/sq ft, solar panels cost $250/sq ft, and maintenance costs $100k + $10/sq ft?
The solution
===
Let x be the number of square feet.
The total cost for the first year of operations is the sum of the cost of land, solar panels, and maintenance:
Total cost = (land cost per sq ft) x + (solar panel cost per sq ft) x + (maintenance flat fee) + (maintenance cost per sq ft) x
Total cost = ($100/sq ft) x + ($250/sq ft) x + ($100,000) + ($10/sq ft) x
Total cost = ($350/sq ft) x + ($100,000)
Therefore, the total cost for the first year of operations as a function of the number of square feet is:
Total cost = ($350/sq ft) x + ($100,000)
Note that a similar wrong answer happens if I use the three backticks to in the prompt to signal the different sections instead of the three equal signs. For some reason the answer is correct if I use instead three dashes.
Is ChatGPT so sensitive to such small details? How can it be used in the real world if it is? Or have I just been unlucky to find this example?