Large language models and conversational AI in Data Networking

Anna Tsyganova
Deloitte UK Engineering Blog
7 min readJan 16, 2024

Co-Author : Nial Majeed

A (very) brief history of AI

If we were to rewind the clocks 30–35 years and engage in discussions on Artificial Intelligence or Machine Learning, the concept of AI would most likely have been dismissed as some sort of science fiction from the books of Isaac Asimov, and other Sci-Fi writers.

Fast-forward to 2021 and AI has finally stepped into the limelight owing to the successful development of Large Language Models (LLMs), such as GPT from Microsoft/Open AI, LLaMA from Meta, and Bard from Google. Today it would be difficult to find a person who hasn’t heard of Artificial intelligence (AI), Machine Learning (ML) and, in particular, LLMs.

In this article we won’t delve into detailed definitions and will instead take a leap of faith to assume readers have at least a general understanding of AI. If not, the reader can employ an AI assistant such as ChatGPT or similar, to bridge the gap (some of the readers would notice a recursive loop here, however we strongly believe in learning by doing!).

As much as LLMs have garnered attention from the public, the inquisitive minds of network specialists and professionals have not been idle. Are LLMs useful for network professionals? Can they be used as a part of the toolset? As active participants of this community, we’ve tried and tested a few examples using ChatGPT (but feel free to use any other LLMs) and would like to share these experiments with you. We have explored various use cases that most network engineers would come across day to day, such as configuration creation, automation, troubleshooting, and change planning and are eager to walk you through our findings.

How can we use AI in enterprise / corporate networking?

The following use-cases provide examples of how LLM can support networking tasks.

Use-Case: CLI configurations and Ansible Templates

First things first, let’s address the fundamental question — can LLMs perform tasks typical of a network professional, such as writing network device configurations?

It was mind-blowing to witness the model coming up with very plausible network device CLI configs and Ansible templates, but it appeared that in most cases they cannot been applied without further review and correction:

Figure 1. Creating CLI config. Seemed to be a good start, however we would not recommend applying it directly to the router without further development– get your requirements right first in the prompt: IP addresses, masks, global parameters such as hostname and authorisation, loopbacks, default gateways and so on.
Figure 2: Creating Ansible templates works better and may be potentially used for automation starters.

Whilst excitement faded to disappointment due to the limited applicability of the output for most engineers, we continued to experiment and iterate as you’ll see in the next example. It appeared that with a little patience, you can improve the output quality. ChatGPT proved to be exceptionally useful in coming up with a draft that can be iterated. Additionally, creating jinja templates or similar out of the existing configuration files seemed to be one of the tasks that ChatGPT is very capable of doing (and doing well).

Figure 3: Prompt to represent the iterative process used to improve the router config.
Figure 4: ChatGPT’s response to our iterative prompts — improved router configuration. Whilst it still needs more work, you can see the progress!

As witnessed above, it is evident that ChatGPT can be used as a foundational starting point for CLI configurations and Ansible templates. It is important to note that these configurations are initially unreliable and need continuous iterations prompted by the network engineer before they can be utilised for testing and production.

Use-Case: Change Runbooks

Let’s have a look into a common use case, which many engineers come across daily — change scheduling. Most change managers would require a set of standard documents to accompany the change request. Let’s consider a change runbook as an example document. Imagine you are going through the software upgrade cycle for your perimeter firewalls with a straightforward set up, pair of the firewalls in a cluster, which you are looking to upgrade with the minimum service interruption. Here is how a large language model can assist:

Figure 5: Prompt used in ChatGPT to build a change template for upgrading a pair of firewalls.
Figure 6: Change template provided by ChatGPT — Pre change steps.
Figure 7: Change template provided by ChatGPT — Change steps.
Figure 8: Change template provided by ChatGPT — Post change steps.

As usual ChatGPT comes up with a useful disclaimer:

“This schedule provides a streamlined approach for the firewall upgrade process. Ensure that you have thoroughly tested the upgrade procedure in a lab or test environment before executing it in production. Always have a rollback plan in place and communicate effectively with stakeholders throughout the process.”

Of course, you may want to adjust your prompts with more details, for example specifying the OS version or hardware options.

Figure 9: Prompt to add further detail to the change request.
Figure 10: ChatGPT adds the steps to the Pre-Change Preparations to include the upgrade to Gaia R81
Figure 11: ChatGPT adds the steps to the Change to include the upgrade from Gaia R80 to R81.

ChatGPT produces a Change runbook that incorporates all the commonalties expected from a runbook and ChatGPT can also alter the runbook to be more specific based on the prompt provided as seen in Figure 9.

Use Case: Troubleshooting

Another great example is troubleshooting suggestions. Let’s try to improve configuration we have previously put together. Here are a few useful prompts to try:

Figure 12: Prompt for ChatGPT to identify and resolve issues it has made.
Figure 13: ChatGPT reviewing CLI Configs and Ansible templates it has made and resolving potential issues (Part 1)
Figure 14: ChatGPT reviewing CLI Configs and Ansible templates it has made and resolving potential issues (Part 2)

Sometimes it works better if you start a new dialog every time to clear out the cached context — especially when you switch tasks and prefer to have a fresh start.

This further testifies to the notion that ChatGPT can be used to provide “ideas” when prompted. It can look at its past work and suggest improvements, however these ideas need to be reviewed for legitimacy. Further cementing that fact, the initial configurations should not be presumed “production-ready”.

As illustrated in the use-cases above, sometimes ChatGPT may yield slightly frustrating results (i.e., not providing the full configuration required or coming up with errors). It is noteworthy to mention that the output quality improves in line with the quality of the input prompts — similar to any area of our professional life. LLMs and AI in general could be thought as your new apprentice or junior engineer that is being trained on the job, marked by the process of iterative review and improvement cycles.

Security best practices for Gen-AI

Security Best Practices

When using ChatGPT or other services, familiarise yourself with some security best practices:

· Be cautious when using non-proprietary instances of Gen-AI, as your data may be exposed.

· In particular: handle any confidential, personal, and company confidential information you supply as a part of the prompts with the utmost care. As much as you are tempted to use Gen-AI for the transcripts and summarisation of your network team meetings and further development of the network configurations, there is no guarantee on the security and privacy of this information once it’s copied over to the chat dialog window.

· Sanitise your configurations by replacing IP addresses and remove all the mentions of the company confidential data or anything that could expose your network internals. Think of this process akin to dealing with an unvetted contractor or 3rd party supplier without Non-Disclosure Agreement.

· Keep in mind that as well as being incorrect straightforwardly, code generated by GenAI may be nefarious for example, set a well-known login credentials and passwords as a part of configuration, if not checked appropriately. Apply extra caution before using it in live environment.

Future use of AI in networks

“Should I use ChatGPT and language models?” you may ask. I regrettably have to say it but, “It depends”. Large language models can be a great help and can accelerate your day-to-day activities, accelerating the start of the work and enhancing the efficiency of your routine operations or fostering creativity. Creating configs, automation boilerplate code, templates for the change schedules, and troubleshooting ideas are all these use cases that can be used to accelerate day-to-day work of the network engineer.

Unfortunately, the applicability of the output can be also misleading as it can simply provide the wrong answers — which makes them extremely dangerous if not properly validated. Therefore, be mindful when relying on the outputs of the LLMs and ensure validation using professional judgement and iterations. If your company is at a forefront of the GenAI deployment, try using your enterprise version of LLM, “Enterprise AI”, so that the model is based on internal corporate code repositories and does not share your data outside of the company.

Given the level of proliferation of Generative AI in our daily lives, particularly in networks the question we need to ask ourselves is: “Can I afford not to use it?”. Increasingly, it seems that going forward we’d all need to get at least some level of acquaintance with this type of technology — if not becoming fully Gen-AI native.

The ultimate decision lies in your hands.

Note: This article speaks only to my personal views/experiences and is not published on behalf of Deloitte LLP and associated firms, and does not constitute professional or legal advice.

All product names, logos, and brands are the property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.

--

--

Anna Tsyganova
Deloitte UK Engineering Blog

Senior Manager and a network professional in Cloud Connectivity @ Deloitte with a long standing passion for resilient systems design and architecture, CCIE RS