GitHub Copilot is an AI tool developed by GitHub and OpenAI (yes, the AI lab founded by Elon Musk). It aims to assist programmers with writing code through autocompletion in the IDE. The extension is made available for Visual Studio Code, Neovim, and JetBrains.
The OpenAI Codex model powers GitHub Copilot. Codex is trained on natural language and billions of lines of source code from the public domain, including GitHub code repositories. GitHub Copilot generates multiple suggestions on the context of the file being edited based on the comments in the file, and the code you’ve written before.
Here’s how it works: you write the docstring or the comment, suggesting a code snippet. In some cases, just the function name or a part of the function is enough to generate the rest of the code. Copilot makes ten suggestions at a time. The accuracy of suggestions improves as you type more code, and it also improves as mode programmers connect it to feed the model with more code, as any AI model.
Copilot isn’t the first of its kind; Tabnine and Kite are two popular tools that cover the same functionality. However, Copilot stands out because it’s powered by Codex, which provides a deeper understanding of the context than other assistants. Codex is a NLP supervised learning model based on GPT3, trained with billions of lines of code as features and docstrings as labels from GitHub public repositories and open-source projects. Furthermore, Github Copilot learns from your own programming patterns and improves recommendations on the fly.
Let’s see how well Copilot can solve three common aviation coding problems.
GitHub Copilot is very impressive and indeed is one the first new generation AI tools that could replace humans. But, as it is now, the Copilot’s code must be “tested, reviewed, and vetted.”
The system “is known to produce undesired outputs, including biased, discriminatory, abusive, or offensive outputs.” Copilot code may even not compile, as it doesn’t test the code it outputs. Ultimately, this makes human interference and supervision mandatory in order to produce functioning code.