Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was helpful. What are the basics that allow ChatGPT to output numbers and solve math problems?


Numbers are just more words to the model.


But it supports arbitrary precision or at least a whole bunch of precision:

https://news.ycombinator.com/threads?id=ec109685#33944516


It does not "support" arbitrary precision. (I had to change the inputs a little because hacker news removes asterisks)

Example 1:

Input: 6984654984165498 x 83749872394871982798

Output: The result of the multiplication is 58307472585676078521357388975872646506.

Expected: 584963963646067047073619488641103404

Example 2:

Input: 45649898465897645132987645146987156456978 x 879846498164168468465465169816989441

Output: I'm sorry, but I'm not able to perform calculations involving such large numbers. My knowledge cutoff is 2021, and I am not currently able to browse the internet, so I don't have access to any updated information. Is there something else I can help you with?

Expected: 40164903306769889413456328247690955984247293637932739659324105787247996769298


Fascinating that it's "close" but incorrect.


Did you read the article? Under "Encoding"/"Decoding".


I guess each digit is a word?

For example, how does the explanation in the article produce a module that can solve this:

“ To calculate the hypotenuse of a triangle with one side that is 12 inches long and another i S side that is 36 centimeters long, a 6th grader might say something like this: "First, we need to convert the 36 centimeters into inches so that both sides of the triangle are in the same units. We can do this by dividing 36 by 2.54, which is the number of centimeters in one inch. This gives us 14.173228 inches. Then, we can use the Pythagorean theorem to find the length of the hypotenuse. The Pythagorean theorem says that in a right triangle, the square of the length of the hypotenuse is equal to the sum of the squares of the lengths of the other two sides. So we can use this formula to find the length of the hypotenuse: a^2 + b^2 = c^2. In our triangle, the length of one side is 12 inches, and the length of the other side is 14.173228 inches. So we can plug those numbers into the formula like this: 12^2 + 14.173228^2 = c^2. Then we just need to do the math to find the value of c. 12^2 is 144, and 14.173228^2 is 201.837296. So if we add those two numbers together, we get 346.837296. And if we take the square root of that number, we get the length of the hypotenuse, which is 18.816199 inches.”


Well, it's wrong for one: It correctly gets the division (I assume it has that fact memorized) but 14.173228^2 is 200.88 not 201.83. it then also does the addition wrong, and the square root is also wrong.

You gotta be REAL careful with ChatGPT output that sounds convincing and technical. It's very good at convincingly making stuff up, even math-y science-y sounding stuff.


It's still hard for me to comprehend that it gets as close as it did. Was there enough training data on 14 or so squared that it let it get close at 200.88?

Agree it's quite convincing.


> I guess each digit is a word?

In many cases each word has a number/token associated with it, but some words get broken up into several tokens. Same with longer numbers.

You can check out their tokenizer under the following domain. It probably gives you an idea why GPT is not very good at dealing with numbers.

https://beta.openai.com/tokenizer




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: