GitHub updates its code-writing AI for more accurate suggestions

16 Feb 2023

Image: © MichaelVi/Stock.adobe.com

The Microsoft-owned company said the new updates will improve the quality and speed of code suggestions, while blocking ‘insecure coding patterns’.

GitHub is launching a series of updates to improve the capabilities of Copilot, its AI-powered coding assistant.

The Microsoft-owned company said it has updated the AI model behind the coding platform, to improve the quality of code suggestions and create them faster for users. The updates are set to roll out to both individual and business users this week.

Copilot was first revealed in June 2021 as an AI assistant for programmers that essentially does for coding what predictive text does for writing emails.

GitHub says the amount of code being written by Copilot is continuously on the rise. Last June, the company said its AI assistant is helping write nearly 40pc of code. Now, GitHub claims Copilot is behind roughly 46pc of code “across all programming languages”.

The company has developed Copilot in collaboration with OpenAI, the company behind recent AI endeavours such as ChatGPT and Dall-E.

GitHub said its coding assistant has been updated with a new OpenAI Codex model, providing better results for “code synthesis”.

Copilot has also received a new paradigm called “Fill-In-the-Middle”, which uses known code suffixes and leaves a gap in the middle for the AI model to fill. GitHub said this will lead to better quality code suggestions with more context to the project being worked on.

The Microsoft-owned company has also launched a vulnerability filtering system, to block insecure coding patterns in Copilot suggestions.

GitHub said this new system leverages large language models to quickly block insecure coding patterns such as hardcoded credentials, SQL injections, and path injections.

“Since GitHub Copilot runs advanced AI models on powerful compute resources, it’s incredibly fast and can even detect vulnerable patterns in incomplete fragments of code,” said GitHub senior director of product management, Shuyin Zhao.

“As we move forward, we will continue to improve the developer experience for people using GitHub Copilot, and these updates are just the beginning.”

Microsoft, GitHub and OpenAI are facing a class-action lawsuit over Copilot, with US programmer and lawyer Matthew Butterick alleging that using public open-source code without attribution is illegal.

10 things you need to know direct to your inbox every weekday. Sign up for the Daily Brief, Silicon Republic’s digest of essential sci-tech news.

Leigh Mc Gowran is a journalist with Silicon Republic

editorial@siliconrepublic.com