以前、LinkedInのこの投稿で、簡単な分数の問題を間違えるという紹介をしたことがあります。
その事をOpenAIのDiscourseフォーラムに投稿した2月18日、即時に(既に消しました)OpenAIのヘルプサイトDoing math with OpenAI modelsの内容が変更されてしまいました。
変更前のヘルプサイトの内容から削除された部分の概覧
On the challenge of doing math - specifically algebra - using the OpenAI Playground with workarounds to consider
Have you ever tried to solve for x using the OpenAI playground?
For example, solve for x:
3 x + 4 = 66
First you’d isolate terms with x to the left hand side like so:
3 x + (4 - 4) = 66 - 4
then:
3 x = 62
to get the result:
x = 62 / 3
… simple, right? Unfortunately, you won’t always get the same result from the Playground.
Our language models currently struggle with math
The models are not yet capable at performing consistently when asked to solve math problems. In other words if you were to try this example in our Playground using text-davinci-002 you will likely get inconsistent answers when performing math. With some generations you will get the correct answer, however we do not recommend you depend on the GPT models for math tasks.
What you can do to improve output consistency in our Playground
Disclaimer: Even implementing everything below there is only so far we can push the current model.
現在のヘルプサイトの内容の概覧
Today, large language models like GPT-4 are not well suited to solve math problems. This is mainly due to the way these models work under the hood. Using a technique called next token prediction, the model looks and input it was given (in this case a math problem) and makes an approximate guess based on data it was trained on. This tends to work very well for more creative tasks like writing, but with math, where there is a definite answer, this approach is less effective.
With the introduction of the OpenAI Assistants API, you can now rely on more robust tools like Code Interpreter to solve these problems for you. With Code Interpreter, the model will write and run the code necessary to solve a specific math or computational problem, and then output the answer to you. This makes math domain problems much more likely to be solved by our models right out of the box.
簡単な分数の比較の問題を間違えるという欠点に気付いて、現在のGPT-4のような大規模言語モデルは数学の問題を解くのに適していないというシンプルな内容に変更されてしまいました。
一方でもう少し難しい数学の問題を出したところ上手く解けるようになったようです。
- システムメッセージを次のように設定しました。
あなたのタスクは数学の問題を解くことです。
問題は中学生レベルのものですが、Latex記法やバックスラッシュを使わず、「+-*/」や「=」などの記号を使って問題を解いてください。
ステップバイステップで考えるときは、割り算をして小数にしてしまわず、分数表記のままにする事。マークダウン記号やピリオドは使えません。
最後に、答えが正しいかどうか検算をして確かめてください。
- せっかくなので、gpt-4-turboとgpt-4oの両方に連立方程式を解かせてみました。
画像のままだと小さくて見にくいので、クリックして拡大するなどして見て下さい。
gpt-4-turboとgpt-4oを比べると、gpt-4-turboの方が短いステップで解いて検算も済ませています。
ChatGPTからgpt-4oを使った場合は、gpt4-oの方が簡潔な回答をする印象を受けましたが、正確さを要求される計算などではステップを多く要するようです。
gpt-4oを使った感情のこもった会話などは現在ChatGPTのユーザーへ段階的にロールアウトされているようで、こちらでも利用できるみたいなので、使用した感想を追って掲載していきます。