ChatGPT answers:
> Yes, if we assume the statement "all snakes have legs" to be true and accept that a python is a type of snake, then logically, a python would have legs. This conclusion follows from the structure of a logical syllogism:
> 1. All snakes have legs.
> 2. A python is a snake.
> 3. Therefore, a python has legs.
> However, it’s important to note that in reality, snakes, including pythons, do not have legs. This logical exercise is based on the hypothetical premise that all snakes have legs.
ChatGPT clearly understands the logic of the question, answers correctly, and then tells me that the premise of my question is incorrect.
You can say, "But it doesn't really understand logic. It's just predicting the most likely token." Well, it responds exactly how someone who understands logic would respond. If you assert that that's not the same as applying logic, then I think you're essentially making a religious statement.
An animation looks exactly like something in motion looks, but it isn't actually moving.
>A Z is an X.
>Therefore a Z has Ys.
I am fairly certain variations of this are in the training set. The tokens following that about "in reality Zs not having Ys" are due to X, Y, and Z being incongruous in the rest of the data.
It is not not performing a logical calculation, it is predicting the next token.
Explanations of simple logical chains are also in the training data.
Think of it instead as really good (and flexible) language templates. It can fill in the template for different things.
Those two things are not in any way mutually exclusive. Understanding the logic is an effective way to accurately predict the next token.
> I am fairly certain variations of this are in the training set.
Yes, which is probably how ChatGPT learned that logical principle. It has now learned to correctly apply that logical principle to novel situations. I suspect that this is very similar to how human beings learn logic as well.