Starting from the current state, you could make ChatGPT much better programmer simply via brute-force approach:
1) ask it to generate (positive and negative) test cases first
2) ask it to review the test cases it wrote to make sure they fit the spec
3) ask it to produce an architecture of the program you want (you need to specifically ask it for writing modular code, consisting of small testable functions), fitting spec and test cases
4) ask it to write the tests for each function
5) ask it to find mistakes in the functions it wrote
6) run the functions against tests it wrote and present to it failures, asking to fix them (loop here until fixed)
7) run the e2e tests it wrote at the beginning and present mistakes to it, asking it to fix them
8) run the whole process in parallel multiple times, until one of them works
It's not pretty, it's not cheap and it's not super robust, but neither is the code written by majority of programmers. And I'm sure you could make it understand the code even better using some kind of evolutionary algorithms, by letting it play with interpreter.In fact probably you can use a compiler and a human supplied test suit to generate training data for the network. Let it do the looping with the compiler where its output is fed into the compiler and if any error happens you feed the compiler output to the network. Then if it manages to write something which compiles you run the test and feed back any errors it got into the network.
If it ever manages to find a solution you add it to the dataset used to train the next version.
ChatGPT is like power-assisting prompt-craft. Special case tricks and tunings make casuals rate ChatGPT assisted prompt results higher than GPT-3 alone. Some of this is discussed here:
ChatGPT -- ChatGPT is a sibling model to InstructGPT, which is trained to follow an instruction in a prompt and provide a detailed response.
See: https://openai.com/blog/chatgpt/
InstructGPT -- We’ve trained language models that are much better at following user intentions than GPT-3 while also making them more truthful and less toxic, using techniques developed through our alignment research. These InstructGPT models, which are trained with humans in the loop, are now deployed as the default language models on our API.
See: https://openai.com/blog/instruction-following/
But, if you carefully craft prompts and prime continuations, it seems GPT-3.5 (the same new davinci models) lets you color outside ChatGPT's lines to achieve arguably even better results once you have your own crafted prompt.