When ChatGPT arrives to code

By Red Hat

Enterprise open source software provider, Red Hat, is developing a generative AI/ML model that will help developers leapfrog automation code and bridge the IT skills gap with reliable and consistent code for automated tasks. Now, a technical preview is available for users to explore.

A new generative artificial intelligence (AI) programme being trained by Red Hat and IBM might be able to generate secure and working automation code. Image: Canva

AI chatbot ChatGPT isn’t just challenging the work of journalists, advertisers, and paralegals according to BusinessInsider. Software developers with access to an AI coding assistant could complete tasks in more than half the time it would have otherwise taken them, found a study by Microsoft.

 

But can ChatGPT write good automation code? 

 

Kelvin Loh, Senior Manager, Solutions Architect, ASEAN, Red Hat, shares that even though ChatGPT can generate workable Ansible playbooks, which IT professionals use to automate tasks, it may not be able to help when code issues cause deployment failures. Developers may not be reasonably assured that it can resolve the code successfully, even after feeding the code back to ChatGPT, says Loh. 

 

Computer scientists from the University of Quebec in Canada found that the code generated by ChatGPT did not meet minimum security standards, despite being able to identify critical vulnerabilities when asked to do so. 

 

But a new generative AI programme being trained by Red Hat and IBM might be able to generate secure and working automation code. Through a natural language interface, Ansible Lightspeed will be able to transform requests written in plain English – such as “Deploy web application stack” – into an automation workflow for Red Hat Ansible, which can then be modified by the developer if needed.

 

Reliable, consistent, and accountable code

 

For one, Ansible Lightspeed promises code that is more reliable, consistent, and accountable than code generated by ChatGPT when it comes to automation code for Ansible, according to a press release by Red Hat.

 

Ansible is an open source software tool used by IT professionals to automate tasks such as application development, updates on workstation servers, cloud provisioning, and other administrative tasks across a network of computers.

 

Ansible playbooks help developers define the parameters and settings applied to operating systems, infrastructure devices, and applications. It can provide instructions to update computers to the latest configuration settings. 

 

In turn, developers can use these playbooks to manage enterprise IT as agencies adopt hybrid cloud models, which will make IT environments more complex, explains Loh.

 

Ansible Lightspeed will allow users to enter a request in plain English and receive a syntactically correct and functional playbook or role, according to Red Hat. Unlike playbooks generated by ChatGPT, users will not need to spend time debugging faulty code. Instead, users will be able to expect reliable and consistent results.

 

This is because Ansible Lightspeed’s machine learning model is specifically designed and tailored to help with Ansible Playbook use and deployment. Ansible Lightspeed was trained on high quality data sources like Ansible Galaxy, and uses IBM Research AI’s foundation model cluster and software stack, which runs thousands of latest-generation GPUs to train models, according to IBM. This ensures that the AI will generate precise code that has been validated and is secure.

 

Systems such as OpenAI benefit from having been trained over huge amounts of data, with experts estimating that GPT-4 has over 1 trillion parameters. However, such large foundational models by nature include data that may or may not be relevant to the user.

 

As Ansible Lightspeed is domain-specific, results generated from its model will better address the needs of the user. Furthermore, there is increased speed and efficiency as the parameters within its model are 35 times more efficient than those found in larger models, ensuring that quality outcomes are delivered.

 

Bridging the IT skills gap

 

Next, Ansible Lightspeed will support agencies in bridging the IT skills gap and support developers in picking up new skills as the job demands. This helps organisations to accelerate and optimise IT operations even further.

 

The ability to leverage generative AI services for automation will help to drive consistent accurate automation adoption across an organisation. Such services make it easier for novice users to automate tasks while removing the burden of low-level task creation from experienced automators. 

 

A press release from Red Hat highlighted that application developers can use Ansible Lightspeed to provision applications in a new cloud platform, and on-premises systems administrators can use Ansible Lightspeed to configure hybrid cloud environments. This is one way developers can accomplish more tasks in less time and IT professionals can rapidly reskill in light of new IT developments.

 

“This project exemplifies how artificial intelligence has the power to fundamentally shift how businesses innovate, expanding capabilities that typically reside within operations teams to other corners of the business. With intelligent solutions, enterprises can decrease the barrier to entry, address burgeoning skills gaps, and break down organisation-wide siloes to reimagine work in the enterprise world,” said Chris Wright, CTO and SVP of Global Engineering, Red Hat.

 

Nevertheless, Loh cautions that developers should still understand how Ansible playbooks work in case they require finetuning.

 

Optimising content to user preference 

 

In the future, Ansible Lightspeed will include plans to optimise content, such as suggesting revisions according to user preferences, recommended best practices, or in-house security and compliance policies.

 

Ansible Lightspeed also aims to alert developers to existing playbooks that are similar to what they are developing, so that they will not have to reinvent the wheel.

 

IBM Research and Ansible specialists are currently finetuning the AI model, and are calling for beta testers to share real world use cases to help further train Ansible Lightspeed. 

 

For public sector developers, doing more with less is a key priority. The promise of domain specific AI for IT automation can support public sector developers in driving scalable innovation while serving the public good.

 

All Ansible users can explore the technical preview of Ansible Lightspeed with IBM Watson Code Assistant and provide feedback here. A full commercial version with additional features is in development.