UPDATED 16:39 EDT / JUNE 29 2021

AI

GitHub’s new Copilot programming assistant uses AI to generate code

Microsoft Corp.’s GitHub unit today debuted a tool called Copilot that uses an artificial intelligence model based on OpenAI’s powerful GPT-3 algorithm to write software code automatically.

Developers write code in specialized editors called integrated development environments that provide many time-saving features. They correct syntax errors, such as misplaced semicolons, and with the help of third-party plugins can even can perform tasks such as flagging cybersecurity issues. Copilot has the same basic goal, to save time for developers by automating common tasks, though it applies the concept in a far more sophisticated way than existing technologies.

GitHub says the tool can detect when a programmer starts writing a new snippet of code and automatically complete it. If necessary, Copilot is capable of generating as many as a half-dozen lines of code more to complete the snippet the programmer is working on. The tool understands dozens of programming language and can assist with many different types of projects.

One area where GitHub sees Copilot saving an especially large amount of time for developers is component integration. A sizable portion of the work involved in building an application consists of adding integrations with external components: the database the application uses to store customer information, the payment service it relies on to process purchases and so on.

The task is often quite simple, requiring only a few lines of code in some cases. But before developers can write those few lines of code, they have to learn how to use the component they’re integrating, which can take hours or days.

Copilot automatically generates a part of the code necessary for the task. In this way, the tool not only speeds up the component integration process itself but also reduces the amount of time that developers must spend studying the component beforehand, since the overall complexity of the task is reduced. The resulting time savings can accelerate software projects.

Testing is another task that Copilot can help with. To check the reliability of their applications, developers often embed reliability testing models from the open-source ecosystem in the applications’ code base. Copilot can analyze a developer’s code and automatically find the open-source testing modules most suitable for assessing its reliability.

Under the hood, Copilot generates recommendations using Codex, an artificial intelligence model developed by the OpenAI machine learning research lab. Codex is based on GPT-3, a groundbreaking natural-language processing model that OpenAI debuted last year. GPT-3 can generate numerous types of text, from poetry to lengthy essays about business topics, in response to short user-provided writing prompts.

One of the main details that set Codex apart from its predecessor is the training data that OpenAI used to build the model. The lab’s scientists trained GPT-3 on natural-language text from sources such as Wikipedia. Codex, in turn, was trained on billions of lines of open-source code from GitHub, which enabled the model to learn common code patterns that it harnesses to generate programming suggestions for developers. 

“It helps you quickly discover alternative ways to solve problems, write tests, and explore new APIs without having to tediously tailor a search for answers on the internet,” GitHub Chief Executive Officer Nat Friedman wrote in a blog post. “As you type, it adapts to the way you write code — to help you complete your work faster.”

Microsoft will initially make Copilot available at no charge in its open-source Visual Studio Code editor for writing software code charge. Further down the line, the company and OpenAI plan to open access to the underlying Codex model as well, which will enable other companies to incorporate similar code generation features into their products.

Copilot is the latest fruit of Microsoft’s long-running collaboration with OpenAI. The company provided OpenAI with $1 billion in funding two years ago to support its research and also offers the lab’s scientists access to infrastructure resources from its Azure public cloud. 

Image: GitHub

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU