The government has published guidelines for software engineers working in government departments on how they should use artificial intelligence (AI)-based coding assistants.
The Government Digital Service (GDS) AI coding assistants for developers HMG The document warns that if a production service is developed, maintained and deployed from a single environment using AI coding assistants, unacceptable risks may be introduced.
“A tighter development platform and deployment infrastructure is a good practice, as you have fewer concerns about the specific use of AI coding assistants,” the GDS said. It suggested that software engineering teams in government departments can “significantly reduce the risks of using AI coding assistants in their development environments by working in the open and using master branch protection.”
The GDS guidelines recommend that software engineering teams in government departments also maintain strict segregation and audit of access to production secrets and multi-stage deployments, which should include sufficient test coverage and vulnerability scanning for continuous deployment in software development pipelines.
Because the models underlying AI coding assistants are not defined, GDS guidelines recommend that source code and build pipelines should never rely on specific responses to a prompt unless the software engineering team is willing to extensively test those responses and accept the risk of frequent breakage.
The release of the guidelines comes after a four-month pilot with more than 1,000 software engineers using AI to improve program productivity.
The Department of Science, Innovation and Technology (DSIT) reported that a pilot shows that AI assistants have the potential to save government software developers the equivalent of 28 working days a year – almost an hour every day.
The efficiency gains from this AI meant that the more than 1,000 developers who took part in the trial were able to create more software to support government-led digital initiatives. DSIT predicted that AI assistants could help the government build the technology it needs faster, targeting £45 billion in savings for the taxpayer by making the public sector more efficient.
Developers and engineers across 50 government departments trialed AI coding assistants from Microsoft, Github Copilot, and Google, Twin Code Help in the Field
The trial found widespread satisfaction with the coder tools, with 72% of users agreeing that they offer good value to their organization. More than half of participants (58%) said they would rather not return to work without the help of AI, while 65% reported completing tasks faster and 56% said they could solve problems more effectively.
AI-powered coding assistants were used to produce initial drafts of source code that could then be modified by government software engineers, or used to review existing code. DSIT said that only 15% of the code generated by AI coding assistants was used without any edits, showing that engineers are taking care to review and correct AI-generated code where necessary.
Technology Minister Kanishka Narayan said: “These results show that our engineers are hungry to use AI to do this work faster and know how to use it safely. This is exactly how I want us to use AI and other technology to make sure we deliver the standard of public service that people expect, both in terms of accuracy and efficiency.”