GitHub’s new product Copilot is here! Developed by GitHub in collaboration with OpenAI and now available in a technical preview, the tool is embedded in the Visual Studio Code editor and automatically completes snippets of Code.

According to GitHub, Copilot isn’t just parroting code you’ve seen before. It analyzes the code the user has written and generates new matching code, including the specific functions that were called previously. Examples on the project’s website include automatically writing code to import tweets, plot a scatter plot and get a Goodreads score.

Its main functions include:

  • Extract the code context and give suggestions for the completion of the entire line of code or the entire function.
  • Convert comments to code;
  • Automatically populate duplicate code;
  • Writing tests;
  • Quick discovery of alternative solutions to problems;
  • Explore new APIs quickly without searching the web.
  • Adapt to the way users write code to help them get things done faster.

GitHub CEO Nat Friedman said in a blog post that GitHub Copilot works with a wide range of frameworks and languages, but the current technical preview is particularly useful for Python, JavaScript, TypeScript, Ruby, and Go.

GitHub sees this as an evolution of pair programming. Pair programming is where two programmers work on the same project, catching each other’s errors and speeding up the development process, while Copilot converts the other programmer into a virtual form.

The partnership between Microsoft and OpenAI

The Copilot project is the first major result of Microsoft’s $1 billion investment in OpenAI announced in 2019. OpenAI is a research firm now led by Sam Altman, a former president of Y Combinator. Since Altman took over, OpenAI has moved from a nonprofit to a “capped-profi” model and received investment from Microsoft. In September 2020, Microsoft received an exclusive license for the OpenAI GPT-3 language model. (GPT-3 is an autoregressive language model with 175 billion parameters that shows excellent performance on multiple NLP datasets and produces articles that cannot even be authenticated.)

Copilot is built on a new algorithm called OpenAI Codex and trained using terabytes of publicly available code extracted from GitHub entropy and English language examples.



How Copilot works

Codex is said to be a descendant of GPT-3, with the difference that GPT-3 mainly generates text, while OpenAI Codex generates code. OpenAI plans to release a version of Codex through its API later this summer to help developers build their own applications using the technology, according to an OpenAI representative.

Possible problems with Copilot

Copilot gets a lot of praise for the productivity boost it brings, but GitHub hints that not all code is vetted for bugs, unsafe practices, or personal data. GitHub claims to have filters installed to prevent Copilot from generating offensive language, but this may not be perfect.

“Due to the pre-release nature of the underlying technology, GitHub Copilot may at times produce undesirable output, including output that is biased, discriminatory, abusive or offensive,” the Copilot website says.

The GPT-3 model has faced some criticism for its bias and abusive language patterns, but OpenAI doesn’t seem to have found a way to prevent algorithms from inheriting the worst elements of training data. OpenAI also warns that the model might suggest email addresses, API keys, or phone numbers, but this rarely happens, and the data is synthesized or pseudoranomically generated by the algorithm. But the code generated by Copilot is largely original. A test conducted by GitHub found that only 0.1% of the generated code overlapped with code in the training set.

Copilot is not the first project to help programmers with automatic code generation. A very similar feature from Kite, a startup, is available on more than 16 code editors.

For now, Copilot is in a limited technical preview phase, where users can sign up for access on the project’s website.

Web site address: https://copilot.github.com/

Refer to the link: https://www.theverge.com/2021…