
News of June 30,OpenAI code generation tool is more powerful than GPT-3. Yesterday, Microsoft and OpenAI jointly launched an AI programming tool GitHub Copilot. This tool is based on the source code of GitHub and other websites, and can automatically write the following code for programmers according to the above tips.
Nat Friedman, CEO of GitHub, said that GitHub Copilot is a virtual version of pair programming. Pair programming is a common agile software development technique—that is, two developers work side-by-side on the same project, taking turns writing code and checking the output of their partners.
“It can provide code suggestions for multiple lines or entire functions directly in the editor. In addition, with the passage of time and the increase in usage, the model will become more and more complex and the code quality will be higher and higher.”
For programmers, the most important thing for a programming tool is of course which types of languages it supports. GitHub said in the trailer that Copilot can support more than a dozen languages, and it works better with mainstream languages such as Python, JavaScript, TypeScript, Ruby, and Go .
At present, Copilot’s function introduction has been posted on the official GitHub website, let’s take a look.
1. Powerful pair programming partner
GitHub said that GitHub Copilot can understand a wider range of contexts than most code assistants. Therefore, whether it is docstrings, comments, function names, or the code itself, GitHub Copilot can synthesize new code based on the provided context (code entered) to match.
If it is so reliable, then as GitHub said, this feature can allow programmers to lose a lot of document reading work and focus on the editor.
GitHub Copilot can also convert comments into code. Just write a comment to describe the desired logic, and GitHub Copilot can automatically “understand” and write the code for the corresponding function.
GitHub Copilot can also automatically fill in duplicate code. GitHub said that GitHub Copilot is very suitable for quickly generating boilerplate and repetitive code patterns. For programmers who need to write a lot of similar but difficult to convert into loop statement code, this feature is very “sweet”.
Organized testing is also a notable highlight of GitHub Copilot. GitHub stated that testing is the backbone of any powerful software engineering project. “Importing a unit test package allows GitHub Copilot to automatically write tests that match your implementation code.”
Seeing this, are the friends eager to try? Unfortunately, GitHub Copilot is not completely open. Like GPT-3, it only provides a trial experience for limited users. In short, let’s line up first.
Project address: https://copilot.github.com/
2. Copilot, born for programming
Brockman said that Codex, the core model of GitHub Copilot, relies on the powerful generation capabilities of GPT-3.
We know that GPT-3 is a super large-scale natural language generation model launched by OpenAI. When GPT-3 was trained in the early days, OpenAI had no intention of teaching it how to help write code. It is more like a general language model, mainly used for text generation and grammar. Modify and other tasks.
Later, OpenAI opened the API to the public. This text-based training model has been played with more than 50 tricks by netizens, including automatic code generation. OpenAI realizes the potential of GPT-3 in writing code and provides an online “code generation” service on its website.
For decades, Microsoft researchers have been trying to teach computers to write code, but have not achieved significant results. In this cooperation with OpenAI, Microsoft will provide powerful Azure cloud computing capabilities and a large number of language programming codes on the GitHub platform (acquired by Microsoft in 2018).
Regarding the code generation quality of this product, Friedman said that GitHub employees have made a lot of attempts to ensure that GitHub Copilot generates safe, high-quality code. He said: “We have established some security mechanisms in the system. These mechanisms can significantly reduce the chance of errors in various fields.” In other words, GitHub Copilot cannot guarantee that there is no error at all. It is still only an auxiliary code generation tool.
The official website reported that the underlying technology of Copilot belongs to Microsoft and OpenAI . OpenAI will release the Codex model this summer for third-party developers to use. Microsoft also said that it will release a version of the product so that companies can learn about their programming style through training. But currently, Microsoft only provides services for code stored in public repositories.
This is not the first time Microsoft has relied on OpenAI to provide intelligent software. Last month, Microsoft demonstrated the powerapps Studio application update service, non-technical personnel can use it to write applications-users enter the element words they want to add, GPT-3 can provide some necessary code options.
3. Netizens discuss
The release of GitHub Copilot triggered heated discussions on Reddit. Many netizens are optimistic about the industry trend of coding automation. Netizen @markbowick said:
There is no doubt that this will greatly improve the daily programming productivity of most programmers, and (I think) this will be one of the most important steps in driving the exponential growth of global software influence.
It is worth noting that GPT-J (an open source implementation of one of the smaller GPT-3 models) was trained on a large number of GitHub and StackExchange query repositories, and performed significantly better than other OpenAI models on specific programming-related tasks . In the next few months, I expect to see similar (larger) models with better performance.
Some people have also raised questions. Netizen @laprika0 said that GitHub Copilot’s testing methods are worrying, “Let GitHub Copilot suggest tests that match your implementation code, but people should not write tests in this way.” Agree, and added, “If there are errors in the implementation code, then GitHub Copilot will introduce the errors into the test, thereby affecting the test effect.”
Others noticed the issue of code ownership. OpenAI issued a statement stating that when users use GitHub Copilot to write code, code snippets and suggested results will be shared with GitHub and OpenAI, and used for diagnostic purposes and improvement suggestions. At the same time, in order to protect privacy, GitHub Copilot will not use the user’s private code to recommend code for other users of GitHub Copilot.
Netizen @touristtam was confused by this statement, “Do they have the code that was written when the user enabled GitHub Copilot?”
Read More: