Skip to content
CBT Nuggets
DemoBook a Demo

Understand Artificial Intelligence Basics

This skill explores the integration of Artificial Intelligence (AI) in network automation, highlighting its benefits such as faster development and reduced barriers to entry. It discusses the use of AI tools like ChatGPT and GitHub Copilot for writing and debugging code, and emphasizes the importance of responsible AI usage, particularly concerning data privacy and intellectual property. The skill also addresses potential pitfalls like AI hallucinations and provides guidance on using AI securely and effectively in network automation environments.

Full skill from CCNP AUTOCOR. Preview the training IT teams trust.

Updated

49m

Skill 25 of 26 in CCNP AUTOCOR

What you'll learn

  • Describe how AI tools support script and automation development across the CI/CD life cycle of network operations
  • Identify the security, data privacy, and intellectual property ownership risks of using AI in network automation
  • Explain why pasting production network configurations into a public AI instance can expose sensitive information
  • Verify AI-generated configurations in isolated environments such as EVE-NG, Cisco Modeling Labs, or Cisco DevNet Sandboxes before production
  • Install Ollama and choose a local model such as Mistral based on available CPU, GPU, and model parameter size
  • Generate a Netmiko script with a local Mistral model that runs show ip interface brief on a Cisco IOS device, then test it

Free 49-minute video lesson with a full transcript and knowledge checks. No account needed to watch.

Artificial Intelligence in Network Automation

In this video we introduce the topic of Artificial Intelligence (AI). We discuss how AI can be used in the context of network automation to generate, debug and improve code. We highlight some of the main benefits of using this approach such as faster development and a reduced barrier of entry to network automation.

Knowledge Check

AI systems can only be used to write new code and cannot assist in debugging or improving existing code

Data Privacy and IP Ownership Considerations

As we now know, Artificial Intelligence has many benefits. However, that does not mean that it doesn't also present its own set of problems and complications. In this video, we discuss two of these challenges in detail. Namely - data privacy and intellectual property.

Knowledge Check

What is a potential risk of using public AI systems like ChatGPT for analyzing network configurations?

Hallucinations and Output Validation

Previously we highlighted the challenges of data privacy and intellectual property in the world of Artificial Intelligence. In this video, however, we take a closer look at a very unique characteristic of the technology - hallucinations! Why do they arise and how should we deal with them? Let's find out!

Knowledge Check

Match the AI concepts with their explanations.

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

Considerations for Using AI Responsibly

So far we've discussed some of the potential pitfalls of using AI incorrectly. In this video, however, we highlight some actions you can take to use AI in a more secure and responsible fashion. Check it out!

Knowledge Check

What is a recommended practice before deploying AI-generated network configurations to a production environment?

Validation

Let's now validate what we've learned in this skill!

Instructions:

Launch the lab below and open the Linux Mint virtual machine. Run the command "ollama list" to see the available models installed on the system. Next, run the "mistral" model and use it to generate a Netmiko script that will connect to the Cisco IOS device in the lab with the IP address of 10.0.0.1, username of "john" and password of "Cisco123". The script should run the command "show ip interface brief" and print the result. Finally, test the script against the device in lab.

Check out the video solution below!

Knowledge Check

How much experience do you have using AI for network automation?

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

View Transcript

Artificial Intelligence in Network Automation

0:00Hey friends, welcome back. We have another skill for you and in this one we're going to get to the fun stuff. The stuff that everyone's all hyped about. We're going to be talking about AI. We're going to talk about some of the benefits but importantly we don't just have to talk about the cool exciting stuff, we have to talk about how we can use AI in a responsible manner. So with that said, let's just kick things off and talk about how we can use AI to help us with our code development and our automation development writing scripts, that type of thing. So it won't be any surprise to you to know that we can use these AI systems to write code, to write Ansible playbooks, to write NetMeco scripts, that type of thing, because we have seen it already within this course. Now in our case we've seen things like using ChatGPT to write Python scripts, we've also used Clod, but quite honestly there is a whole ecosystem of these types of tools. We've got things like GitHub Copilot for example and quite honestly there are a lot more tools than this let me tell you. Now regardless of the tool that you select, ultimately they can all kind of do similar things. They can help us write codes, so that could be just a brand new creation of a script to change the OSPF configurations across your network.

1:09The ChatGPT, the Clod instance, whatever you're using, that can help you do that. But what it can also do, it can also debug that particular piece of code so if something is wrong and you're not quite sure how to solve it, the AI systems can help you out there. And in fact, to be honest with you, at least in my opinion, the debugging feature is one of the most useful features of AI. Gotta say, it really does save you a lot of time if you know how to use it correctly. So that could be debugging code that it originally wrote for you, which is kind of comical, or it can debug code that you have written yourself, whatever it may be, the point is we can fix these problems.

1:45And by the way, in a similar sense, we don't just have to fix particular problems, maybe it just might be that we can improve our code, for example. You know, it still might work in its current form, but it can be improved. Once again, having this AI and its ability to review what you're doing, kinda is super, super helpful. So there's so many wins here, okay? Alright, so we all know the old way in which networks were managed. What we would do is we would use like something like SSH to manually log in to a device, we can make configuration changes, log out, and then manually log into the next one, type in the configs for that, so on, so forth. And then came the era of automation, made things so much easier, whereby we could ultimately use these Python scripts, use things like Ansible to connect to all of our devices at the same time, and deploy these changes. That said though, we still had the bottleneck of actually writing these scripts, and this could take quite a bit of time, depending on the type of automation that you're doing. For example, if you are using Yang-based network automation, it's super powerful as we have already seen, but it can be a little bit difficult to work with. It can take a lot of time in order to get scripts working exactly as you expect. And quite honestly, it could transpire that writing code might take you days,

3:01weeks, and maybe even longer, depending on what it is you're doing. So this is where we come to one of the main benefits of using AI systems and network automation. Just like the way that network automation sped everything up, the use of AI ultimately speeds things up even further. It allows us to work at a quicker pace. For example, AI can tell you the type of libraries you should be using. Maybe the code that you're writing is going to have a lot of common boilerplate code that is not really inevitable, but it does take a lot of time to type out and, well, to get onto the page.

3:34Not the case when you're using AI. AI is so used to this type of stuff, it's trained on it, so it really is not much of a problem for AI to spit out this code at a rate of knots, okay? It really can speed things up. All right, so the speed factor, that's probably maybe the most obvious benefit of using AI. You can almost feel it in your bones, can't you? When everything is working in your favor, it almost feels effortless. Now that said, that doesn't mean it's the only benefit to be had with AI. For example, we also have the benefit of accessibility. Because here's the thing, when you happen to be introducing concepts of network automation into your team, it might not be the case that every engineer on your team has experience with Python and Ansible and Yang-based data modeling, for example. Ultimately, with AI, you kind of have this crutch. Maybe that's a negative connotation, but it's not meant to be. It gives you this support system. Like a good friend you can ask for advice to help you through a problem, this is what AI gives to everyone on the team.

4:33So maybe they don't have the most extensive Python experience, but they can still ultimately write a Python script, or at least evaluate a Python script, just by having a fairly decent understanding of the tool or task and using their natural language to communicate with an AI system. So at least in my opinion, I think that's really reducing the fear factor behind automation, whereby when network automation first came on the scene, there was a small subsection of network engineers who took that concept and just ran with it, whereas many other people just didn't really want to touch it. They were kind of terrified of it, to be honest with you. They did not want to use automation to make configuration changes, because if it broke the network, well, it kind of spelled disaster and they did not have the confidence to use these particular tools. Not so much anymore, in fact, the next benefit kind of leans into the previous one. When we have AI systems, it makes it a lot easier to learn a new technology or a new tool. I mean, I'm sure you've used it yourself when you're trying to understand a particular technology, the AI system can give you an answer about the very specific query that you have. Maybe the question you have in your mind is not thoroughly documented, but it doesn't make sense to you, because you can talk to the large language

5:50model, the AI system, give it all your context and then highlight what your problem is. Ultimately, that can help you solve that problem and will learn that tool, be comfortable with that tool, which again, like I say, leans in to the second benefit. It gives people that accessibility. Now, ha, it's not all roses here, like I said, when it comes to AI, there's a few pitfalls we have to be aware of and we're going to be looking at these pitfalls in more detail throughout this skill, but for the moment, let's just park that thought. Without going into too much detail, let me just say at a high level overview, you may have issues with things such as basic security when it comes to your AI automation. You also might have issues with data privacy, which is a very serious topic.

6:34In a similar sense, if you are using AI systems to develop your own proprietary software, you may actually have an issue with the intellectual property ownership of that particular tool. And again, we will expand upon each of these subjects later on within this very skill. Now, before we get to that, let me highlight one more thing. Within this particular course, we see a lot of focus on things such as CI-CD pipelines. Honestly, it's been a really heavy focus of ours because it's a really heavy focus in the world of network automation. And I just kind of want to draw your attention to how AI systems actually fits into this type of architecture.

7:11One of the most important components of building a robust CI-CD system is actually choosing the correct tooling. Just as we mentioned before, which type of tools are we going to be using to automate our network? Which type of protocols are we going to be using? Is it going to be RESTConf? Is it going to be the CLI? Is it going to be gRPC? When it comes to building out a responsible and robust automation system, the whole design of the process, the whole architecture, really requires great consideration and AI can really help you think through this particular problem.

7:42And in a similar sense, when you have selected the tools and you have selected the configuration style that you want to be implementing, AI systems, as we have already seen, can help you build these particular scripts and build these particular processes. And then also, when we happen to be making these changes in our CI-CD systems, we can also validate these changes via the use of AI because AI can help you analyze log outputs. It can help you identify error messages. Basically, what I'm trying to highlight is that the use of AI tools is not just beneficial in this small, isolated manner. Ultimately, AI systems help improve and stabilize the entire life cycle of our automation operations. Now, like I said, it's not just all benefits and roses and happiness with the use of AI. There also are some serious risks and considerations to think about. So, friends, how about we highlight some of those risks in the very next video.

Data Privacy and IP Ownership Considerations

0:00Hey friends, welcome back. So in this video, what we're going to be doing is talking about some of the risks, the potential downsides of using AI. So I suppose the first thing we will talk about is data privacy. All right, so let's imagine this. Let's just have some network configurations and let's imagine this as a real live network, okay? Not my lab environment, okay? So let's just do a show run and get the running configuration. And all I'm going to do here is just highlight it all and copy it. Okay, so copy here. Now, let's just say I go to a public instance of an AI system and I say, here's my configuration on my Cisco switch.

0:34And what I'm going to do is just paste it all in, okay? And then I earnestly just ask it something like, do you see any configuration errors or problems, okay? So I'm getting it to study my configuration. All right, so it thinks for a bit and it says here nothing jumps out as a syntax error. It looks valid and should boot fine. And it gives some suggestions about potential things I could do. Now, this is not the issue. This is why someone would like to use an AI system to get this type of feedback. But what actually is the issue? Well, this is a public instance of ChatGPT and I've just dumped in all my network configurations.

1:04Now, like I said, this is a pretty bare configuration, so there's not much on it. But imagine it was a real live production environment. I may have just potentially told it some sense of information. Maybe we've got some SNMP community strings in here. Maybe if my security is really bad, I've got some unencrypted passwords that I've just sent to this AI system. Maybe I've divulged the internal IP addressing in the system, my VLAN configurations, my access control list, my security posture, my routing protocols, so on and so forth. Now, if this here was just a conversation between me and a private system, a private AI system, whereby the data here was just, well, just private to me and not being shared to anyone at all ever, well, that would be fine.

1:46But that's not how these tools work, unfortunately. Very often, by default, the conversations that I'm typing here is used to, well, improve the actual training data. Because when you think about it, especially on the free tier version of these particular utilities, these tools are so expensive to run. I mean, like, seriously, the amount of energy they use is astronomical. And if they're just giving it to you for free or for, like, $20 a month or something, you can be pretty sure that there is an upside for them.

2:17The information that you are giving these particular tools and these particular companies, they're using it to train their models. So what that might mean, therefore, is that the configurations that you have on your live network may actually be the input today, but maybe in the future it is the output for someone else's request. Now, what I will say is that many of these tools happen to have an enterprise-style offering, whereby you pay more money, you have a type of business account, and because of that, the information, the way it's processed, is a lot more restrictive and it's a lot more secure.

2:51But the point is, is that when you happen to be using these particular tools, you want to make sure, make sure absolutely, that the information that you're sending is not being sent somewhere else without you knowing about it and without you actually understanding that. Because, you know, maybe some things that you send are not sensitive at all, and that's fine. But if you are completely unwitting about this fact, you might be divulging really sensitive information. So really the main thing to highlight here, especially, especially in a commercial setting, whereby this is you working in the purview of your job as an employee, if you really want to be understanding your company policy, if they tell you, hey, by the way, never, ever, ever put our configurations into a public AI system like ChatGPT, then definitely don't do it.

3:36You're opening yourself up for a lot of problems and you can be compromising your security. This might be what some people comically refer to as a resume generating event. Which means you'd be looking for a new job. So just don't do it, okay? So be aware of your policy. The next thing you can also do if you're going to be interacting with these systems is to actually sanitize the output. So say, for example, as opposed to just blindly pasting all the configurations, look at the unique data like here, like the IP addressing. How about if it's not necessary for the actual problem to actually divulge the IP addressing, for example, why not just sanitize it before you just paste it in blindly?

4:12Why not just go and, you know, change this information or deliberately truncate it and leave it blank? The AI system, if it doesn't need to know about it, it's not going to somehow impair its ability to solve a completely unrelated problem. So sanitize it. So again, pasting this in. Okay, let's just maybe say version. Let's just leave that as version redacted. Down here, hostname. Change it to my hostname. Username, John. Privilege 15. Secret. And it's got the actual hash of the password here. Change that to redacted. Same again here, redacted. And you can just keep doing this on all the sensitive data.

4:43Now, again, this is maybe not the quickest way to interact with AI, but it certainly is, it's a more secure way as opposed to just giving away the keys to the kingdom with respect to your sensitive configurations. So really know what the company policy is. If you have the ability to use the more enterprise version of these tools, whereby we have stronger privacy guarantees, definitely do that. And where you can, be sensible about replacing the sensitive data that you happen to be inputting into these systems. All right, so that's just some basics on data privacy. Let's now talk about something known as IP ownership.

5:15So let me go and give you a really, really simple example, okay? Let's just say, write me a network automation utility that tests OSPF. Let me hit enter. Now, as it stands right now, this is going to go and spit out a fairly simple and generic script. Now, that is not really going to be such a concern for you, okay? The problem, though, is if you try to develop this into some type of proprietary software, whereby you claim ownership of it, and even worse, if you try to monetize it and sell it, if in the event that you've just had an AI system generate this particular tool or large blocks of this particular tool, it may actually be the case that you have no valid claim to it at all, because all you did was just ask an AI system to go and create or mostly create it.

5:58And that, my friends, is not the same thing as actually creating something on your own. Now, what I will say is straight off the bat, I'm not a lawyer, and this very topic, it's quite contentious at this time of recording, so there is no clear path as to how to solve this particular problem. So I'm not going to go and pretend I know the exact legal bar whereby something becomes your ownership versus something that you cannot actually copyright. What I'm trying to highlight more generally is just be aware of this particular stuff. So if, for example, you just blindly copy this AI code, don't be surprised that the new tool that you have supposedly quote-unquote created is not actually yours and can actually even be used by a competitor, and there is nothing you can do about it.

6:40You'd have no claim to say, this is mine, you can't use it. If you rely just on AI and you're not making sufficient modifications, whatever that legal bar happens to be, just be aware that this is a potential pitfall. Now, that said, if you happen to be the main designer of the architecture, the main person writing the code, AI is just maybe assisting you here and there, modifying things a little bit. Well, you can imagine you would have a much stronger claim to ownership of that material. And, by the way, here's another one. See the type of code that is generated here?

7:11The way that the tool is so good at writing this particular code is that, well, many of it has been trained on open source material. Now, much of that original code that it was trained off of could actually have been written under a particular public use license. So the actual code that you're using that has been derived from original code that had a public use license, it might still carry that same licensing. Again, this is still not quite clear as to how all of this is going to play out. So, really, what I'm saying here is my advice to you is to be very, very careful when using these particular tools to generate and create what you think is custom and original solutions.

7:48So, friends, as we know, AI, absolutely awesome. Two thumbs up. We like it a lot. But as we can see, there are some potential pitfalls that we have to understand. One of the big ones, data privacy. Again, this is a very, very easy one to fall foul of. People make this mistake all the time. Do not let it catch you out. And, again, especially in the enterprise environment whereby you might be creating your own tools, including, by the way, what might end up being commercial products, remember to keep in mind the potential issues of IP ownership. In fact, you know what I should do?

8:20I should probably clarify what IP actually means. I'm just talking about intellectual property. This thing that we created, this thing actually belongs to us. And if anyone tried to use it without our authority, well, ultimately, we have some legal standing to challenge that and prevent those actions. So, friends, those are just some of the potential issues of using AI. How about we talk about some more in the very next video?

Hallucinations and Output Validation

0:00Hey friends we're back we are back with a vengeance and in this particular video what we're gonna do is talk about one of my favorite not definitely not one of my favorite maybe one of my what you say pet peeves one of the things that annoys me the most about AI and this is the subject of hallucinations. Now if you happen to have experience with AI no doubt this has probably driven you pretty crazy at least well now that I'm used to it it's not so bad I've kind of half expect it but when I first got into the whole AI thing to be quite honest with you it was a little bit too trusting and that ultimately leads to a lot of frustration and confusion so we don't want that so what we're gonna do in this particular video is to talk about what hallucination is and of the importance of validating what the AI system actually generates for us because here is the thing if you happen to have used AI quite a bit no doubt you have experienced that AI can be super super confident you know for example you ask it to do something for you and maybe it gets something that you can clearly tell is wrong then you point that out and it says you know what you're totally right I'm sorry this is what I did wrong here is a solution that will definitely work this time and the first time you hear this it's quite reassuring you think wow

1:15this is really really good it must have solved a problem this time and must have thought very deeply about it this thing here this new corrected version is definitely going to work and then it doesn't work and you're left annoyed this is just the nature of many of these AI systems they are designed to sound confident but ultimately what they're doing is probabilistic reasoning and that is quite hard to say sometimes probabilistic so what that means therefore is that they are trying to get the what would you say the thing that's most probable from a statistical point of view so by its very nature it should be a little bit uncertain about the nature of the response that it gives but that ain't the case very often they'll just tell you this answer is absolutely certain and you should just trust it apparently but definitely don't do that because here is the thing in the world of networking and particularly network automation whereby you can use these particular generations to automate out across a large amount of devices making many configuration changes you can ultimately black hole your network if you're not actually certain about what the outcome is going to be from this code that was generated so that could be things like misconfiguring access control lists it could be misconfiguring

2:32routing protocols there's tons and tons of ways in which these systems can get things wrong let me give you an example okay one thing you might notice with respect to AI systems is that it might just get the syntax wrong maybe the training data was based off of older versions of the tool that you're trying to be using so maybe the training data uses an older version of Cisco iOS XE and the newer version has a slightly different command or a slightly different implementation if the training data is all on the old version then the AI system is going to statistically generate an outcome based on that version and then present it to you as this type of perfect solution almost you would be wise to always have a good healthy dose of skepticism when interacting with artificial intelligence next thing and this is the topic that we kind of kicked off this video about and this is the concept of hallucinations now if you're not certain what a hallucination actually is what we're talking about here is when the AI system happens to just make something up and pull it out of thin air something that doesn't actually exist so how could this present itself in the world of network automation well what it might do is it might invent a non-existent function inside of a Python library the way you actually talk to the AI system can kind of have an effect on this well I mean

3:51when I say that well if you happen to talk to the AI system in this way that almost expects a particular response it's almost like it freaks out it can't actually find an authoritative source on what you're expecting it to do but it can tell by your tone that you are absolutely expecting this particular thing to be there so it's just going to go and invent it out of thin air let me give you an example okay all right check it out what I've written here is a lot of rubbish see this particular module doesn't actually exist totally made it up but I sound pretty confident okay because I've specified a very particular version I've asked something that sounds really quite technical I mean LFIB does relate to MPLS and resconf is something you would use with an actual yang model so it kind of sounds like it should actually have an answer but it's just gibberish let's see though what the AI system happens to say because it sounds like I'm expecting a particular response let's hit enter so it's searching the web give it a moment and look at this right here now it says this is one of those areas where the iOS XE yang gets very under documented well I'm pretty sure why it's under documented this doesn't exist this model so it shouldn't actually be documented at all key point first so you don't chase ghosts okay so it's trying to help me out here it says here and this

5:09particular XE version this model does not expose LFIB adjacency statistics directly as a flat stats container instead it follows the MPLS model hierarchy now it doesn't do this because this here doesn't even exist so then we scroll on down we get a nice big green tick about the actual path to be using with this non-existent model and it just goes on and on and on and on so again this is obviously really annoying but notice the trend I sounded really confident the training data was obviously quite limited because this is quite a technical subject but if we don't have some type of expertise here to actually recognize that this here is all completely wrong you may be possibly putting this stuff into your network automation solutions and this is definitely not a good thing at all now let's be a little bit mischievous but we're doing it for educational purposes I'm gonna flat out confess that this model doesn't exist and I'll ask it why it told me these paths and then it's gonna say you're right to call that out that was incorrect there is no model of that type so now it's giving me a little bit better data but if I happen to change this and say the model should be called and all I'll do is paste in the model once again and let's add on like LFIB at the end something that sounds quite technical and roughly plausible okay so let's hit enter see what it does and look at this you're absolutely right the correct model is this I just made this

6:27up right there and now it's saying that's the one that actually backs the show MPLS forwarding table does it really not at all and then off it goes generating all this nonsense and what I'm trying to really stress to you is that you can't just be relying on this stuff this is why expertise is still very very important because if you don't actually truly understand this stuff and you just try to spam these solutions you might be really confused as to why your device is just giving you client errors all the time now one thing we can do to actually improve this we can use something called retrieval augmented generation and what this can do it can kind of constrain what your queries are actually going to be in essence what we're talking about here is grounding the actual answers with particular context so once again let me give you a quick example what I'm going to do here is open up a new chat and what I'm going to do is to ask it something quite vague so I'm saying which HTTP method and URL should I use to associate a site with a network profile now here is the thing see the terminology I'm using here this is quite specific to Cisco catalyst center so I should expect the AI system to perhaps generate some information about this but it might not get it correct so let's go and enter here and see what it says so it has recognized that this is catalyst center terminology

7:43and what it's done here is that it's giving me the actual URL or at least it purports to tell me that this is the correct URL now what I'm going to do here is I'm going to go and check that and verify this to make sure that this actually is correct so all I've done is search for the actual documentation right here go and click this and I'll get down to the API reference and let's click on API right here okay now the section I'm looking for is in site design so let's click this right here and if I scroll on down I can see this option for associates and as we can see right here this is going to allow me to associate a site to a network profile now look at the exact wording I had right here okay this is basically why I asked the system right here associate a site with a network profile but look at the endpoint they're saying it's going to be site site ID network profile then network profile ID where in reality it's actually going to be network profile network profile ID site site ID that is the endpoint we need to use so once again it was quite plausible what the answer was but it got it completely wrong what I want to do though is I want to give it particular context by just having it reference this documentation so check this out what I'm gonna do here is go back and when I get to this I'm going to choose to download the open API document okay so it's just gonna go and

8:59download like so now I'm gonna do here is choose to save a copy and I'll save this so what I'm gonna do here is choose to create a new project and let's just call us like catalyst helper and create the projects now what I can do here is specify particular sources that I want to include and to give this chat a lot more context so let's go and add the documentation alright so now the documentation has been uploaded as a source and all I'm gonna do is to paste in the exact same question and see if we get any better responses so let's hit enter and now you can see it's beginning to search the project context and look at this right here this looks a lot better see this right here it's now specifying we're gonna have to use the post request and the endpoints this actually looks like the correct endpoint this time and in fact if I go to the documentation and compare this it should be DNA intent API v1 network profile then you put in the profile ID then forward slash site and then the site ID and it also tells us any required parameters so again if we consult the documentation if we look right here it shows us the required parameters as the network profile ID as well as a site ID and those are the two that are required so friends be aware that whilst AI is awesome it can do this really annoying thing known as hallucination and we can ultimately mitigate hallucinations by giving our AI systems a lot more constraints and

10:17context as to what we're trying to do

Considerations for Using AI Responsibly

0:00Alright, so we know about many of the benefits of AI as well as some of the potential pitfalls and in this particular video what I just want to do is to spend a little bit more time on kind of talking about how we can use AI in a responsible and secure manner. So the first thing I just want to highlight is just some kind of questions you should have when interacting with AI especially in the setting of network automation. So the first thing which is probably at the top of the list and that is always to verify what it is you're getting back from the system and we kind of hinted at this in a previous video but what does it really mean? We're not just talking about just being skeptical and you know executing the code with a little bit of trepidation.

0:42We're talking about actual steps that we can do to help mitigate the risk of something going wrong if we choose to execute the code that was written via the AI system. So say for example, the AI system is writing some code to templatize and generate some CLI configurations. What would you want to do? Well, first thing you would want to ensure that the CLI commands are indeed the correct ones and in a similar sense if let's maybe say it was generating some type of YANG payloads and it's going to be deploying it via NetConf or RESTConf.

1:15Once again, you want to be verifying this. So in the case of the CLI you could go to the actual CLI documentation of that particular model of the device you're using and before you attempt to deploy this on a real-life network go and check that what has been rendered is actually matching up with what you would expect. Same thing is true for the YANG based automation. Ensure that the actual modules are indeed correct. Use the tools that we've talked about already throughout this course. Things like PyYang or say for example YANG Explorer, that type of thing. These are the types of tools that you can use to help ensure that what has been suggested is actually real and it's not just some type of hallucination. Now again, maybe for you this seems really really obvious and you know it's just something you clearly would do anyway, but to be honest with you many people are not doing this at all.

2:01They're just kind of blindly trusting the god of AI and assuming that it must know better than them and just going in kind of gung-ho and well, I would say taking a reckless approach to network automation via using AI. So ultimately whether it's rendering CLI commands, whether it's you know using YANG based automation or whether you happen to be interacting with a particular controller the main thing to do is to trust the authoritative resource. Go to the actual documentation and make sure what you're seeing in the AI system is actually matching up with reality. All right, next point.

2:33So let's say you have done your verification and you are highly confident. Still not a good idea just to go and deploy this directly onto the production network. Instead what you would want to do is to test this in a nice isolated environment. So that could be things like using EVE-NG for network simulation or as we talked about earlier on throughout this course you could use Cisco's modeling labs to model your topology and just go and inspect what the AI system has actually done when you deploy this code or when you run this playbook that type of thing. And another tool you could use is one we have seen already throughout this course once again is to also use the Cisco DevNet Sandboxes very very useful. Once again they give you a nice isolated and secure environment whereby you can kind of go crazy. And the worst case is as if you happen to break something you never really broke anything in reality. It was just a simulation. Now another component which is very very valuable and this is the kind of thing that's going to keep you in a job is to use your own expertise. Really spend time learning these technologies, become comfortable in them, become an expert in them because even though AI can't allow you to work quicker more efficiently ultimately you should see it as a tool to augment your own work. And if say for example the AI is going off the rails because you have expertise you are more able to easily detect that. Because here's the thing when it comes to making changes and networking

3:54particularly you may push out a change and it might seem like it has worked but you also maybe have to think about the downstream effects of the change that you just implemented. Maybe it transpires that the BGP configuration that the AI system actually told you it's using the correct format it's using all valid values, the configuration does apply and it can actually work. But maybe the AI systems are not really thinking about how that might affect your MPLS network. This is once again whereby you can shine when you understand the holistic picture and you have expertise and confidence in the technology.

4:26Then maybe when the AI system gets a little bit gung-ho and recommends changes to a particular technology you have a good enough understanding to know all the potential side effects that that may cause and you can go and check them and verify them in your isolated environment before deploying it to production. Now again, just another point to talk about with respect to actual security when using AI. Now previously we talked about these public AI utilities such as ChatGPT or Clod that type of thing and we highlighted some of the potential pitfalls that you can fall into when using these particular tools.

4:59For example, you happen to paste in your API token directly into an AI system. Maybe you divulge your inner security posture of your network configurations. As we know the real vulnerability of this as the data that you're sharing well, it can be shared and it can be used elsewhere. So one thing I just want to highlight to you is that whilst we can get these enterprise grade implementations of these tools, one thing you can also do is run your own local and private AI system. So the benefit here is that while it's offline it's just between you and the AI tool. Now the downside to this is in order to be able to run these well, these more modern models, quite honestly, you need an absolutely massive amount of compute and power.

5:41So to be honest with you, to use the latest greatest best models in the world you're kind of gonna have to go the public route whereby you have access to Clod whereby you have access to ChatGPT and their latest models and their infrastructure to run those models. That said though not every solution requires the most advanced AI. So what I want to do is I want to just briefly show you how we can install your own local AI system and we can see how that can benefit us in the world of automation. So check it out. What I'm gonna do here is to go on to my Ubuntu machine. Now what I'm gonna do here is to install a particular utility known as Olama.

6:14So let's go and open up the browser. Now all I've done here is search for download Olama and let's just click this right here. And what you're gonna see here is we have all the options to download this if it's on Windows, if you're on Linux or if you're on Mac OS. Now in my case here, I have a Linux machine. So let's just click this and we can see here the command is this one. So if I just go and paste this in and to enter, what it's gonna do is to go and begin downloading Olama onto my machine. Now in the meantime, if we just go back to the browser here, what you're gonna see here is we have all of these particular models that can be run on Olama.

6:46So if I click this right here, you can see here these are all the things that you can ultimately use. You can see here we have tons and tons and tons of models. Now one that happens to be particularly powerful for coding is this one right here, the Quen 3 coder. But one thing to note here in order to run this at its most powerful, this has 480 billion parameters, which requires an enormous amount of power. So what I'm saying here is that when you happen to choose these models, you really have to consider your environment and what you can actually power. Now a good generic use model that is not so intensive that can be run on a regular laptop is this one right here, Mistral.

7:24So what we're gonna do is once Olama is ready, we're gonna go and pull this particular model and use it. And even though it's not the most powerful, it should be enough to kind of get us going in our network automation scripts. Now straight away here, we get this warning and this is because I have downloaded this in a virtual machine on my system. So we're not getting access to the GPU, we're only going to be running it via the CPU, which is going to make things run really quite slowly. So with that said, all I want to do now is to show you how we can pull in the actual Mistral model and use it. And then what I'm going to do is to slide on over to my MacBook, my native computer, and then do the AI there, whereby I have access to my GPU.

8:03So the way I can get the model is really quite similar to Docker. All I'm gonna do is say Olama pull and then Mistral and say I want to get the latest version. So if I hit enter, what's gonna happen is we're gonna begin pulling this down. And if I want to run this, I can just say Olama run Mistral, okay? So if I hit enter here and what it's given me is an error straight away saying that we need more memory than is available inside this particular virtual machine. So pause, let's hold that thought. Let's now take the same installation over onto my MacBook, okay? All righty-o, so now I'm over on my MacBook and if I just say Olama list, we're gonna see here I have already installed Mistral as well as another model as well.

8:41So if I want to be interacting with the Mistral model, I can just say Olama run Mistral and to enter. And now we drop into this command-line interface and like I say, this is completely offline. So let's just ask you something quite simple. What is the capital of England? And it tells you straight away that the capital of England is London. So it seems to be working. Now here is the thing. What I can also do is use the graphical user interface. If I just go and open this up to click on this logo, as we can see right here, I have this little chat interface and down here what I can do is select the model that I want to use.

9:11So let's choose Mistral. I'll just say, can you write me an Amico script that will connect to Cisco iOS device? The IP address is 192.168.1.201. Username is John and the password is Cisco123. Just say send the show version commands and print the result. So let's hit enter, give it a moment and now it's beginning to write this out. Okay, so it's given me a response, but what I've noticed is that it's actually using the getpass module to prompt the password. So I'll just correct it and say, obviously this is good, but hard code the password of Cisco123 instead of using the getpass module.

9:47So let's hit enter, see what it does. So now it's beginning to correct things and now we have our code. Let's go and just copy this right here. And what I'll do here is create a little script called olamascript.py and I'll just paste this in like so. Okay, so let's just save this. And if I just run the script and to enter, let's see what we get back. And bam, we get our response back. And you know what, just to highlight this, if say for example, I disconnect my internet. Okay, so if I try to ping the internet, we're going to see here I don't actually have any access, but the cool thing is, is I can still use Olama.

10:17So check this out. Let's imagine this is now the zombie apocalypse and, you know, I don't have access to the internet. I don't know what I can do. But the good thing is, is I still have access to the intelligence of AI. So whilst I'm disconnected, I could say something, let's say write an Ansible playbook to do the same kind of thing. And if I hit enter, what is going to happen is even though I'm disconnected from the internet, I'm still now getting back my responses from Olama. So see this right here, all this is coming out. And as we can see here, it's given me all the instructions to do things like make sure Ansible is installed on the system, make sure I've got a host file, that type of thing.

Validation

0:00Alright friends so let's now validate what we've learned within this skill. So the first thing we're going to do here is to launch the lab below. So let's go and click this and then once it loads we're going to go and open up the Linux Mint virtual machine, run the command olamalist to see all the available models installed on the system. Then we're going to run the Mistro model and use it to generate a Netmego script that's going to connect to the Cisco iOS device in the lab with the IP address of 10.0.0.1. The username is going to be John and the password is cisco123 and the script should run the command show ip interface brief and print the results. Now once you get your result the last thing I want you to do is to test that script against the lab device. So friends go build up your lab give it a go and I will see you in the very next video where we discuss the solution.

Validation

0:00All right friends, the first thing we're going to do is to run the olama list command. So let's hit enter and as we can see here we have the Mistral model available on the system. So what I'm now going to do is I'm going to go and use Mistral to generate this netmicro script to talk to the device of 10.0.0.1. So all I'll do here is say olama run mistral and hit enter. Now what I will say is because this is in a virtual machine things are going to be really quite slow compared to how it would work if you had a GPU available. But nevertheless we're just going to have to be patient and allow it to run. All right also let's write this I'll say write me a netmicro script that will connect to a cisco ios device just say ip is 10.0.0.1 username is john and password is cisco123. I'll just say just hard code the credentials into the script and I'll say run the show ip interface brief command and print the results. So let's hit enter and see what we get back. All right so it's beginning to respond and as you can see straight away it's a little bit slower in typing out the response but again like I say it's a virtual machine so we're just going to be patient. Now straight away I can see here it's wanting to use the getpass module once again as you can see here these particular models are not quite as smart as the higher end ones but you know it's still going to do the job. In fact what it's doing is actually

1:18hard coding the credentials as I said but for some reason it's importing getpass even though it's not going to use it so that's a little bit bizarre but nevertheless. So let's try to correct it and I'll say simplify the script remove getpass since it's not being used and I'll say don't set the terminal length to zero and remove the fine prompt. So let's hit enter and see what we get back this time. Now one thing I will say with respect to the Mistral model it's just a general use model and it's really quite simple. It's not designed for coding, it's not designed for network automation so you can expect some mistakes. Now if you happen to have a more powerful machine at home then by all means go and run a more powerful model that is optimized for coding. Alright so it's now beginning to respond back with the actual results. Alright so it now has completed let me just fullscreen this for a moment and all I'm going to do is to go and copy all of this like so okay so let's just go and grab you and I'll just go and copy this and let's exit olama by saying forward slash by and let's just create this little script and let's just call it again like olamascript.py and I'll just paste all this in like so and let's just save it and then finally we'll go and run this script like so and as we can see the script does appear to work. So friends that is us for our validation challenge on artificial intelligence. I hope this has been informative

2:33for you. I'd like to thank you for viewing.

Frequently asked questions

What does the Understand Artificial Intelligence Basics lesson in Cisco CCNP Automation Core cover?

The 49-minute lesson explains how AI tools support script and automation development across the CI/CD life cycle of network operations, then covers the security, data privacy, and intellectual property ownership risks of using AI in network automation. It closes with a hands-on validation where the learner uses a local Mistral model to generate and test a Netmiko script.

Why shouldn't network engineers paste production configurations into a public AI tool?

The lesson demonstrates pasting a device configuration into a public ChatGPT instance and explains that, in a live production environment, doing so can expose sensitive information. For IT Directors, this gives the team a concrete reason to keep production data out of public AI instances and to consider IP ownership when building internal or commercial tools.

How should a team verify AI-generated network configurations before production?

The lesson recommends testing AI-generated code and playbooks in isolated environments such as EVE-NG, Cisco Modeling Labs, or Cisco DevNet Sandboxes, so a mistake breaks only a simulation. It also stresses that engineer expertise is needed to spot downstream effects, such as a valid BGP change that could still affect an MPLS network.

What hardware is needed to run a local AI model with Ollama for network automation?

The lesson shows how to install Ollama and choose a model based on available CPU, GPU, and parameter size, noting that a coding model like Qwen3 Coder at 480 billion parameters requires an enormous amount of power. Mistral is used because it can run on a regular laptop, though running on CPU only without GPU access is noticeably slower.

What can a team member do after completing this AI basics lesson?

The learner can install Ollama, run a local Mistral model, and generate a Netmiko script that runs show ip interface brief on a Cisco IOS device, then test that script against a lab device. Team Leads gain an engineer who treats AI as a tool to augment their own work and validates its output before deployment.

How does this lesson fit into the CCNP Automation certification path?

It is one lesson in the Cisco CCNP Automation Core (350-901 AUTOCOR) v2.0 course, which spans about 23 hours of training per learner and maps to the CCNP Automation certification. The course's architecture topics include AI basics for network automation alongside Terraform, NetBox, telemetry, logging, webhooks, and PKI.

Team training path

Turn this skill into assignable team training

This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.

What's next?

Ready to keep going?

For your team

Bring this training to your team

See how CBT Nuggets helps IT teams close skills gaps, hit compliance targets, and prove training ROI.

Book a Demo
Just need CCNP AUTOCOR?

Learning on your own? Browse individual plans ($49/month, billed annually) →

Not ready to buy?
with no purchase required. Already have an account?
Book a Demo