GPT-3 codes frontend AND corresponding backend

I managed to coax GPT-3 Curie-Instruct into writing a simple web frontend that takes in a users name and password, and then POST it to localhost on port 7000. After it generated this frontend, I then prompted it to write a python3 backend for that same frontend. After a couple tries, it produced a nearly working system.

It took me 15-20 minutes to debug its program, and it would have been shorter if I had done similar work before. Unfortunately, I’ve never actually handled post requests, frontend or backend, so GPT-3’s code was alien to me. Nonetheless, I was able to easily change 1 character on the frontend, and 2 lines on the backend. I also added an additional line on the backend. So 4 total changes.

Although it is an incredibly simple application, I found it incredibly impressive that it was able to make two scripts that work together.

The pastebin for the completion as well as the debugged code: **NOTE FROM ULTRAPRIM: A few things needed to be debugged. For the frontend, I n -


Do you mean the exact prompt I used? I used two different prompts, one with the frontend prompt, and then with the frontend code and backend prompt. I figured it was just easier to share the whole interaction.

1 Like

It was. I gave it
"Write a html web application that takes the users name and password, then sends this data as a post request to localhost port 7000


Then it gave me the HTML code. The next prompt was everything previous, as well as "Now write python3 code to handle a post from this code.


Then with the few changes it worked. Which is insane. The crazy part about this is it didn’t even take Davinci. Only Curie-Instruct-beta.