Home >Technology peripherals >AI >GPT-4 developers develop AI system with unlimited self-healing capabilities

GPT-4 developers develop AI system with unlimited self-healing capabilities

PHPz
PHPzforward
2023-04-23 11:31:071522browse

I want to ask programmers, what is the most annoying time of the day?

It must be for debugging the written program. But now, this situation is about to be improved!

A foreign developer named BioBootloader launched a project called "Wolverine" based on GPT-4, which can self-repair Python scripts.

As you can tell from the name, this project focuses on "self-healing." Identify errors in the code through GPT and provide modifications until the program runs smoothly.

However, "Wolverine" can currently only be used on Python.

This project has collected 1.2k stars and 108 Forks on GitHub.

Wolverine? Wolverine!

BioBootloader said that if you run your program with "Wolverine", as soon as it crashes, GPT-4 will automatically edit it and give the reason for the error.

Even if programmers write a lot of bugs, it’s okay. "Wolverine" will be run repeatedly until all bugs are eliminated.

GPT-4 must be familiar to everyone. This is a multi-modal artificial intelligence language model developed by OpenAI.

BioBootloader's demonstration video on Twitter shows the specific use of "Wolverine".

GPT-4 developers develop AI system with unlimited self-healing capabilities

In the video, the developer first wrote a simple four-arithmetic operation code, and then deliberately wrote some parts wrong .

GPT-4 developers develop AI system with unlimited self-healing capabilities

(Correct)

For example Say, change the return result at the end to return res, but res is not defined, so an error occurs.

My brother also deleted the subtraction part of the code, which is the substract_numbers above. In this way, an error will definitely be reported in calculate below. Because subtract is not defined.

GPT-4 developers develop AI system with unlimited self-healing capabilities

(wrong)

After Just run "Wolverine" directly, and the part generated by GPT will appear on the right.

GPT-4 developers develop AI system with unlimited self-healing capabilities

It can be seen that "Wolverine" quickly identified the error and attached an explanation.

「subtract_numbers is not defined in the script.

The res variable is not defined and should be replaced by result.」

GPT-4 developers develop AI system with unlimited self-healing capabilities

Not only gave suggestions, "Wolverine" also directly attached the modified code. Red is the part that should be deleted, and green is the part that should be added.

In fact, "Wolverine" is a wrapper. It is responsible for running the program, capturing error messages, and then sending these errors to GPT-4 to ask what went wrong with the GPT code. .

LLMs (large language models) like GPT-4 are "programmed" in natural language, and these instructions are considered prompts.

A large part of the functions implemented by "Wolverine" are due to carefully written prompts. Reading these prompts can better understand the entire process.

The project has been published on GitHub. The guy also thoughtfully gave me the setting requirements.

GPT-4 developers develop AI system with unlimited self-healing capabilities

Not just Python

On GitHub, BioBootloader released its future plans, "King Kong The functions of "Wolf" will become more and more comprehensive and powerful.

GPT-4 developers develop AI system with unlimited self-healing capabilities

"The current version is just a prototype that I spent a few hours on. There will be many possibilities in the future An extension, and everyone is welcome to develop it together."

- Add flags to customize usage, such as requiring user confirmation before running changed code.

- Further iteration of GPT’s editing format. Currently, GPT has a bit of difficulty with indentation, but I'm sure this can be improved.

- An example of a set of problematic files that we can prompt in the test above to ensure its reliability and measure improvements.

- Multiple files/repositories - Send all files that appear in the stack trace to GPT

- Better for large files processing, i.e. should we only send relevant classes/functions to GPT?

-Extended to programming languages ​​other than Python

As can be seen from the simple example above, this script is still promising in the future.

After all, we can’t let coders who work in other languages ​​be jealous looking at the “Wolverine” of smart Debug Python.

The above is the detailed content of GPT-4 developers develop AI system with unlimited self-healing capabilities. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete