Social Question

LostInParadise's avatar

Did you know that ChatGPT can write computer programs?

Asked by LostInParadise (31920points) September 6th, 2023

I asked ChatGPT if it was familiar with Wordle, and it said it was. To test how well it understood the game, I asked it to write a Python program that took as input a target word and a guess for the word. It would output the colors of the guess word. The program is not difficult to write, but it is not entirely trivial.

ChatGPT’s program was close to correct, but it needed some simple bug fixes. Here is what blows my mind even more than the ability to write the program in the first place. When I pointed out the bugs, ChatGPT understood perfectly what I was saying and rewrote the program so that it got rid of the bugs. Does anyone have any idea how it is capable of such understanding?

Observing members: 0 Composing members: 0

8 Answers

LostInParadise's avatar

For anyone familiar with Python, here is our conversation. Link

elbanditoroso's avatar

Yes, I have read that. But given the lousy reputation that ChatGPT (and other AI) have for accuracy, and how it misuses other sources to confabulate answers, I would be more than a little worried about the efficiency and accuracy of your programs.

Sure, you may have found a number of syntactical errors, good for you. I’d be more worried about the more subtle errors that are system or module level.

The other thing I have read recently is that major software shops are not allowing AI to be used unless the programmer has reviewed the AI contribution and signed off on it (and then the programmer has responsibility if it doesn’t work correctly.)

LostInParadise's avatar

I agree with you, but here is something I would like to know. In correcting ChatGPT, did I make it a better programmer? Even if it is not currently wired to learn from such errors, it should be possible, since learning from errors is a key factor in how it operates.

Entropy's avatar

I’m a software developer. I’ve used it to write some utility functions for me. I always visually inspect the results. They’re generally pretty accurate.

Realize that among it’s knowledge base is ALOT of real human programmers answering questions for each other. ChatGPT is a language model, it isn’t generalized intelligence. It doesn’t truly ‘understand’ the way you think of it.

However, that doesn’t mean it can’t simulate understanding. Much like how emergent behaviors in animals can arise from very simple rules understood by each organism, simpler foundations can create more complex looking behaviors at scale.

ragingloli's avatar

Yes, I used it to write a batch file to synchronize file folders over the network.
Unfortunately, the robocopy command it used has the annoying habit to corrupt Photos hop files, so I had to scrap it.

Forever_Free's avatar

Yes. Just one of it’s powerful use cases.

Zaku's avatar

Like other such “AI”, I think it is referring to a massive probabilistic database based on Internet scrapings (i.e. things other people wrote). So it’s sort of copying what others’ wrote, but with random variations and re-mixes.

Computer programs it writes, I would expect to be much more likely to build, than to do what you really want.

Blackwater_Park's avatar

One of the first things I asked it was to write python code to play pong and it did a decent job of it. I certainly would not trust it to deliver perfect code but as a learning tool to quickly see how to do certain types of coding it is quite handy.

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther