The debugging process can be taxing for anyone who has had to write a relatively long piece of code. But, one enterprising fellow has just created a proof of concept for a self-debugging and repairing AI-powered tool called “Wolverine.”
According to Hackaday, “BioBootloader,” a programmer, created the program that can grant Python programs “regenerative healing abilities.” The program takes advantage of OpenAI’s GPT-4 multimodal AI language model, released in March and now accessible to ChatGPT Plus users and beta testers via an API. It performs text-processing activities, including authoring, language translation, and programming, using its “knowledge” of billions of documents, books, and webpages scraped from the internet.
In the Wolverine demo video, BioBootloader displays a side-by-side window display with “Wolverine” results in a terminal on the right and Python code on the left. He loads a customized calculator script, introduces a few flaws, and runs it.
“It runs it, it sees the crash, but then it goes and talks to GPT-4 to figure out how to fix it,” he says. GPT-4 returns an explanation for the program’s errors, shows the changes it tries to make, then re-runs the program. Upon seeing new errors, GPT-4 fixes the code and runs correctly. The original Python file is then updated with the changes added by GPT-4.
Today I used GPT-4 to make “Wolverine” – it gives your python scripts regenerative healing abilities!
Run your scripts with it and when they crash, GPT-4 edits them and explains what went wrong. Even if you have many bugs it’ll repeatedly rerun until everything is fixed pic.twitter.com/gN0X7pA2M2— BioBootloader (@bio_bootloader) March 18, 2023
“LLMs (Large Language Models) like GPT-4 are “programmed” in natural language, and these instructions are referred to as prompts. A large chunk of what Wolverine does is thanks to a carefully-written prompt,” explains Hackaday.
The creator thinks the method could be utilized with other programming languages, and the source is accessible on GitHub. “Wolverine” must be used with an OpenAI API token for GPT-3.5 or GPT-4, which does attract fees. Anyone with an OpenAI account can access the GPT 3.5 API. However, GPT-4 access is still limited by a queue.
“Wolverine” is not the only ChatGPT-based tool featured in the press recently. Other examples, like Auto-GPT and BabyAGI, also featured similar recursive loop functions that effectively create multiple “agents” of ChatGPT to complete several tasks simultaneously. Although “Wolverine” is still a crude prototype, it does show a possible future where programs can patch their bugs—even unanticipated ones that may arise after launch.