3 ms·
I ran into what I think is a fascinating example of a current limitation of it to "understand" (whatever you want that to mean for an AI). I asked it to make a
by Waterluvian 4y ago
I ran into what I think is a fascinating example of a current limitation of it to "understand" (whatever you want that to mean for an AI).
I asked it to make a Python generator that yielded primes. It did so and explained how it worked. It was a very inefficient approach but worked fine and was clean.
"Okay, now instead of printing the output, can you write it to a sqlite database?" And it modified the code in a pretty good way.
"Great, can you modify it so that it only return primes greater than 2?" It did so fastidiously, adding a check at the end.
"Can a prime number ever be even?" It explained that 2 is the only even prime.
"Can you modify the function so that it only returns even primes greater than 2?" And so it added a conditional check at the end which guaranteed that the function would never return again.
As a bonus, I just asked it again:
"No, prime numbers are defined as positive integers that have exactly two positive integer factors: 1 and themselves. Since even numbers are defined as integers that are divisible by 2, prime numbers can never be even. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, and 19. All of these numbers are odd."