GitHub recently announced Copilot, an AI-powered pair programmer designed to help developers write code faster and with less effort. The service learns from comments and existing code, suggesting new lines and the implementation of whole functions.

Powered by Codex, the AI system created by OpenAI, Copilot works with different frameworks and languages. Nat Friedman, CEO of GitHub, suggests that the technical preview works better with Python, JavaScript, TypeScript, Ruby, and Go, but it is designed to understand other programming languages too.

A GitHub Copilot implementation of a sortByKey function in Python.

The Visual Studio Code sends comments and code typed by the developer to the GitHub Copilot service, which synthesizes and suggests the implementation. According to GitHub, the service is optimized for small functions with meaningful names for parameters, as for the sortByKey example above:

We recently benchmarked against a set of Python functions that have good test coverage in open source repos. We blanked out the function bodies and asked GitHub Copilot to fill them in. The model got this right 43% of the time on the first try, and 57% of the time when allowed 10 attempts. And it is getting smarter all the time.

#github #ai #artificial-intelligence

GitHub Previews Copilot, an OpenAI-Powered Coding Assistant
10.65 GEEK