ChatGPT was trained on massive libraries of human text—including the code for software programs—and it has already proven it can write and/or debug programs in several languages via text-based requests.
“ChatGPT can do a lot by itself, but it still needs some help,” wrote the researchers. "So, we write a text prompt for ChatGPT which describes the task goal while also explicitly stating which functions from the high-level library are available. The prompt can also contain information about task constraints, or how ChatGPT should form its answers."
One of the test cases involved ChatGPT writing computer code to control a drone.
“ChatGPT asked clarification questions when the user’s instructions were ambiguous, and wrote complex code structures for the drone, such flying as a zig-zag pattern to visually inspect shelves,” explained the Microsoft team.
They were even able to use ChatGPT to get the drone to fly in front of a mirror and take a selfie with its camera.
However, programmers don't need to pivot to a new career just yet.
As the chatbot can only write code based on the initial text-based request provided by a human, an actual flesh-and-blood engineer must explain to ChatGPT how the application-programming interface works.