logo

NJP

ChatGPT Integrates GPT-3 with ServiceNow

Import · Jan 17, 2023 · video

foreign [Music] it's Justin thank you for watching and welcome to my house that's Justin's house in this video I have a special treat for you certified Master architect Mike Herron comes to us and shows us chat GPT in service now but there's a Twist everybody chat DPT writes its own integration with itself into servicenow I'm not going to say anymore let's get right to it my name is Mike Herron I'm a certified Master architect working at crosshouse I've been working on servicenow for around about 11 years I started off as a customer or a user of servicenow and quickly got the bug and started building things and playing around as I think everybody does I worked my way up to being an admin to a developer to a consultant to an architecture now now I have a dual role it's it's delivery manager in the in the UK slash platform architect so that's me yeah I'm a bit of a nerd Justin I love playing with gadgets and gizmos and and any kind of new tech because it's right up my street okay so then besides chat GPT and servicenow what have you geeked out on recently uh my home media setup is is my my baby well it's a few things right I mean I I built a new pc so I have a a monstrous gaming rig with a with a 40 90 and a 13900k CPU so it's it's my little baby under my desk but my uh my home media surf is uh is my favorite I use a Synology Nas uh to to allow my whole house to have my whole media collection everywhere wise oh wow which is amazing any any of you are incorporated into that not yet you know what my that's the one problem with my office it's like a thin tube all the way down so you can see the wall like it's right here okay so there's no space for VR yeah but that is the one thing I wish I had I think I'm looking forward to the psvr too chat GPT um use double across this probably like the rest of us everybody's talking about it and experimenting with it is that does that sum up pretty well how you kind of encountered it yeah I'm trying to remember the first person uh who got me on it but uh essentially in in the okay in costumes we were talking about AI generated art and and copywriting and what it all means it was such a fascinating conversation we all dived in with different views and I think somebody linked to chat GPT and were like hey this is really cool go play with it and you know I'll I'll come right out of the gate and say you know I I haven't been a big fan of AI implementations today I've been quite skeptical of what they can do what they can achieve their purposes the use cases immediately Blown Away by by chat GPT and the more I learn how to speak with it and how to talk with it and how to get the right information out of it the more it scares me in a good way yeah you when you said that you reminded me like my exposure to Ai and I'm assuming it's been like this for you has been servicenow's use of that term machine learning Ai and around predictive intelligence and kind of finding Solutions and this seems like a totally different take on what you and I have come to know as AI through at least through service now's lens yeah absolutely and I just uh I mean I can't quite verbalize what's different about it because you know ultimately it's doing similar things to what we've seen in the past but I think I think the thing for me is the fact that this this AI this model has been trained it's it's primary purpose is to to replicate natural language uh you know in a conversation with the humor and and more often than not in other implementations you know you're talking to a robot uh but with chat GPT when you start getting into the flow of a conversation and you're asking things that maybe you spoke about a few days ago in a thread um or contextually jumping around like you would with a human and it knows what you're talking about I mean that's the game changer for me it's uh hey we talked about that three days ago and it was this bit here I think that's what's different yeah and I don't want to steal your thunder for the actual showing this but when you were showing me before this call you were saying something like it remembered that you asked for a particular type of Icon so when you ask for the next thing you didn't ask for the icon but it put it in there anyways because it knew you'd asked for it yeah I mean that was one of those like Skynet moments where I was sat there like that's a good icon but I didn't tell it to pick that icon how did it know I mean it was it's impressive uh to say the least and you know it's early doors as far as I'm aware with this sort of platform the sort of capability but uh I know the tech world is going crazy for it right now and I think I read was it Microsoft recently announced they're embedding it in with their Bing search engine so you know the big players are they're watching they're listening they're they're working yeah my understanding and I saw that article yesterday too is that Microsoft is one of the backers of open AI which is who produced chat GPT um who also did the Dali 2 which you saw in one of my videos yeah so with this one what was your what was your goal in mind were you just experimenting or did you have like an end thing you were trying to get to yeah I was talking to one of my good friends a guy called Tom over Christmas and we were we were playing around I was hosting a quiz with my friends uh like a drinking quiz type thing and I was wondering you know could I get the bot to do the quiz for me could it be a quiz master um so I was asking it things like you know are you familiar with uh Who Wants To Be A Millionaire and he's like yeah and I was like let's play I'll be a contestant you'll be the host ask me 15 questions I get harder and it was like really really cool and I was like okay I wonder if I could get it to I wonder if I could build Who Wants To Be A Millionaire game within servicenow that integrates with the bot acting as a host um and then I was like okay no you know that's that's that's too far that's really bad I was like let's see if we can just get the bot to build an integration with itself and start there so uh that's where we started was where I started um on a slow afternoon and just thought let's let's see how far we can take this so uh I mean as a one-liner the the concept is can we get chat GPT to build it's its own integration with itself from servicenow to chapter and and produce an interface as well that a regular end user will know how to use and be able to converse with the bot yeah I think that's worth underscoring and double clicking on is that what you said it twice they're getting the bot to write the code to integrate its own self into servers now and I bet that was where my mind was like whoa yeah I mean I didn't write a single line code it was uh it was all the ball I mean I will stress you know I had to take the input from the bot copy paste it into the appropriate Fields but I uh I set out thinking you know I I've worked with service pool a lot I built a lot of Integrations um a bit of a geek like that but I set out thinking I might have to tell it to do things in a certain way um but the goal was try not to influence it too much and see how far it will get on its own um and it was uh I mean it was interesting interesting to say the least sure yeah do you um do you want to share it now that we've been talking about it you want to show what it actually does yeah absolutely this is the the servicenow service portal all I did was create a a placeholder service pool Rec called went and created a blank page opened up the form for a new service portal widget and for those that are familiar with it you get the HTML field the CSS the client script the server script and then the the link Fields so to basically build your own widgets using a combination of HTML angularjs obviously JavaScript and service now Glide and yeah don't be put off by the colors and the layout right that that was all picked by the bot it's a bit it's a bit partial towards purple and blues I had to ask you like three or four times the first the first color set was just like this crazy 1995 red blue like hitting you so hard like a flashbang um so a couple of prompts to say hey can we go a little bit softer and a little a little cleaner until we got on a color set that wasn't too terrible but yeah this is the service portal widget and um it was built entirely by chat GPT now what I mean by that is I started off by asking the ball one simple question and I tried to keep my uh the language that I used with the bot almost a business analyst level right so trying to put the service down knowledge away to one side and just say hey as a business user sort of thing I'd love to have a widget that I could interact with Chad GPT on um I'd love to be able to ask you questions through servicenows service portal so the first question was something on the lines of hey it's actually petite could you go and uh could you write me the code the HTML CSS the client script the service script for a servicenow service portal widget to integrate with yourself and a couple of seconds later It produced the first iteration of code now I'm not going to sit here and tell you that it was uh but it was perfect because it wasn't right I wanna I wanna make sure everyone understands this took about three hours of talking with the bot um but the first set of code wasn't terrible right it gave me a couple of input I gave me an input field it gave me another input field that I told the bot was going to have an answer in it um and it gave me a button the little send button that you can see in the bottom right hand corner it also had a first stab at creating the rest message and the integration with itself using an end point that it you know thinks it can use um needless to say none of it worked so after a piece decoding the first thing I did was was essentially just try and try and get the UI a little bit cleaner a little bit more modern a little bit more space style that kind of thing so my prompts to it were hey let's go for like a central column uh sort of layout with one box above the other they should fill the width of the container and we'll have the button in the bottom right hand corner for each text input box I want them in a panel with a title and an icon to the left for the first box this one up here I want a little user icon and I said this is where users will ask you questions I said for the second box let's put a little robot icon that's where your answers will be shown to the users so again we're only two questions in right now with the bar but managed to basically produce this form um once we have that nailed down I then started trying to figure out where where the bot had gone wrong with the API um script itself which is kind of ironic because that's the bit you should know the most right it's its own API um but in the end there are a couple of couple of simple tweaks uh I did have to go and check the doc site for uh four chat gbt and not all it did is it just got the wrong the wrong method call at the end of of its own API so the robots aren't taking over just yet uh but once we nailed that we had a functioning um page with a functioning API and response back so I'm just going to demonstrate it I guess right so the very first thing I asked about was what is the French word for hello and if I type that in and press send I get an answer back which is bonjour right not too uh not too crazy nothing nothing too special though um can you write me a poem uh maybe not poem can you write me a summary of what service now so some people might be watching this and this might be their first um view of what chat GPT is um it's this crazy bot that has been trained on a data set that is vast and expansive so you can ask it things about uh you know large sasper Falls I service now or Salesforce or anything like that you could ask it about Shakespeare you can ask it about languages you can ask your coding problems and and if you're anything like me and you're a programmer and you hate regex it's really really good at regex I love that so so that simple question there can you write me a summary of what servicenow is used for um it's given me a little a little snippet of information about what service now is used for um that was the goal it was just get the bot to write that kind of an interface well produce an interface with an integration and get the bot to do it all using business language as a way of sort of tweaking and shaping things up um I mean once I had that call the next bit was just tidying up a few other bits so it was you know adding this little history panel at the bottom just to track what was being said uh between the bottom myself um and towards the end of the project um I uh a friend messaged me and said after I shown him and said um it'd be really cool if you could get speech input put in place and and uh he'd show me a few weeks ago that he'd been playing around with this um so I thought why not let's ask the bot in one question um you know something in the lines of hey uh wouldn't it be great if you could do voice recognition for the ask a question box um and then Auto submit once the input has been received and within one question it produced the full HTML the full client own scripts the amendments to the server scripts and we have a we have a working voice recognition system in two three minutes of just asking about which is kind of cool can you explain the Fermi paradox so it's captured the input it's now interrogating the API and the responses now come back at the bottom there wow it's kind of cool that that kind of feature uh you know literally took two or three minutes to just the bot just boom produce the the code straight away and what's doing the listening to the voice is it tab TPT or is it some other service so most browsers have got a speech recognition webkit enabled within them so and obviously chat GPT has has scoured the web to know what browsers can do what uh and essentially it just use leverages that sort of inbuilt library in the browser to uh to execute the listen and then there's various events that hang off the back of that like stop listening when there's you know the silence for too long and then just off the back of that it's put the content into the field execute the query of the API deliver the response I have to imagine like if someone had to give them given me a list of requirements and said and we also need voice to text I would have been going into the dark side of service now looking for some API or something and so you're telling me that this AI knew that that was part of I guess you're using Chrome right yeah exactly and I think that's where this is so powerful right you know just in yourself myself many other colleagues and friends in the servicenow industry right we've built our careers on experiences and knowledge and knowing things maybe even obscure things right and and that's where we can deliver a lot of value but now you know with that brain space doesn't have to be taken up with that kind of stuff anymore you know um I mentioned earlier I'm terrible at regex my friend has tried to teach me regex so many times that I always default to going on those online um regex editors to try and figure it out um turns out I don't need to worry about that anymore because this service can do regex better than anybody that I know um which is just going to free us up to do so much more uh you know not having to dig into the dogs to figure out uh what's going on yeah I I think one of the things that as I've played around with it and I think I'm getting the sense because you actually showed me on our previous call kind of your history of that conversation you have with it yeah I'd like to hear your thoughts on those prompts and asking the AI the right kind of questions to get to a result like this yeah so with the uh with the input boxes um you know it it understood what a HTML input box was straight away so I didn't need to give it too much more there but what I ended up with was like a squished box that was like maybe taking it one one column uh in a bootstrap container so you know the bot didn't immediately think hey they're going to be asking me potentially some long questions better make it a long box so I had to sort of give it that prompt of um yeah we got the text box but could we make it fill the width of the container now that's where the sort of business analyst lingo started to bleed into knowledge of you know web pages user experiences servicenow that kind of thing um so there was a there was a line being towed throughout the questioning but I think that line of knowing how to ask the bot the right things is going to be crucial in the future um you know people people won't need all this knowledge in their head but they'll they'll need to know how to get to the right answer if it's not in their head if you're if you're if you're interrogating the botron answers you need to know how to ask it the right things in the right way so the way you're describing it kind of aligns with my thinking so far is that it's not so much a replacement for what we do or what other people in Tech are doing but maybe another tool in our toolkit to like get there faster or like you said overcome a an Achilles heel around reject sort of you know for me I'm colorblind so colors are a mess for me right even though you said this color is bad what does this look like to you is this no good it looks pink to me actually okay it's like a pinky Purple Gradient into blue all the way across yeah and I think the blue Loft on me like when you said it I saw it but I don't see it right away yeah well what would be interesting is to obviously in the same conversation with the bot where I asked it to pick a color maybe ask it if it knows what those colors are because obviously you gave it to me in the form of um either hex codes or RGB codes but I wonder if it knows what those colors correspond to right I wonder if he knows that this hex code is is a soft purple or the did you ask for a gradient I did I did specify a gradient I said yeah give it some kind of gradient so it it did know um what a gradient was at least yeah this is exciting stuff and I want to go back to something you said at the very beginning when you were kind of describing it just to make sure it's clear to anybody who's watching this um you there was there was an intermediate step of it gave you something and then you had to put that in the service now right so it wasn't feeding it in there automatically you still needed your hands on a keyboard and your mouse to do that right absolutely yeah I mean this was like a little pet project for a couple of hours um but you can see here this is some of the widget code now I will say right up front the bot doesn't know best practice right and and and this is one of those occasions where I'm gonna put my hand up and say I didn't write this so you can't judge me um but for a bot it's incredibly impressive um it has a few biases so um it prefers to just use JavaScript where it can it didn't seem to know or I didn't seem to want to use angularjs right off the band that I told it it could but at which point it kind of deferred back to using uh you know raw raw JavaScript which is quite interesting but I'm fairly confident if I told it you know using angularjs as a primary preference could you give me this kind of a requirement I'm fairly confident it would you know go down that color path um so yeah yeah to your original point right the uh I'd ask the question to a bot the bot would produce some of the code for me and I would copy and paste that into the relevant Fields here on this widget now the reason I did it that way is because this was just a little Pet Project you know I'm sure Justin you're familiar and some of the viewers are familiar that actually you know you can get the capability if you have the time to go and um you know almost get the bot to be a listener maybe it's a chrome or Firefox extension and and build your own version of this where you're just talking to the bot and telling it where to put the responses and it will you know that that is absolutely achievable um which is another incredible thing I think in our conversation before we were talking about how this is you know only a few steps away from you know Iron Man's Jarvis uh I'm just imagining like this little button or a big red button on my desk like a big help button where I Smash It and go I can't remember how to do glide ajax's give me the syntax and put it in this field and then boom it's just there for me yeah you know I I'm having all these thoughts as you're talking and bear with me here for a second because I want to get an idea out there and have you follow me is and your role as an architect right you are more senior in the implementation or the configuration of something like servicenow so in your role you probably have someone Junior to you that might be writing code and promoting that to production and you do something like a code review and you look over it hey you're missing comments or this isn't best practice so your role as an architect is kind of vetting your own stuff and what other people are doing is that true yeah absolutely yeah yeah and would you say that an AI producing something like this kind of allows you to continue to do that same thing but without that person um without having to educate that person and then kind of help them along it's generating it and you're not you're cleaning it up maybe aligning it to best practice but there is a what am I trying to say here you're not well it's it's it's freeing a person up from something that a bot can do but it's essentially I think what you're describing is like uh linting rules like in a you know like a in in the in the servicenow or JavaScript script box um where you can type and it will you know maybe underline a variable that's misdeclared or where you've mixed spaces and tabs right into that but maybe taking a step further than just those sort of basic rules and actually looking at what best practices or good practices like adding comments to functions that are particularly long or breaking them up if they're too long and and you don't have to go off and Define those in some arbitrary way using maybe some some crazy regex that that I couldn't write um instead you could just tell the bot hey I want you to review this code as a script include in service now um could you make sure that I've commented it appropriately could you make sure that my methods aren't too long uh can you make sure um you know whatever right whatever rule base you you wanted to to do and it could do that role goal of a peer reviewer absolutely yeah I you know and going back again to something you said earlier the surprises too like you know the using the web kit for the voice to text is something that you I think you had said it but when we talked before a business person coming in let me let you articulate that that use case better because I think you said it really well tell me about um a non-coder developer and what you think could be potentially you know not now but down the road of them using something like this to to get to a result I mean it's it's early doors um but I would I my mindset over the past month of playing with this has has changed drastically the first time I engaged with the ball I asked a few things and it was interesting I asked a few service now things and he gave me some okay answers not great not not terrible so my impression then was um it's cool it's not gonna it's not gonna help you much um after a month of learning how to talk to the bot properly my stance has changed now and it's actually um use it use it for anything you're not sure of use it for anything you can't remember but just remember that it doesn't know what best practice is and you will still need to go and validate whatever approach it gives you I would also say that any piece of code that this produces is not suitable for a production environment unless it's been thoroughly tested thoroughly reviewed you know one of the other biases that I've noticed in the code it produces is it doesn't hand it doesn't like to deal with um sad path right happy pass coding have your path is here everything's present let's go down this path to achieve a result sad path is oh something's missing somewhere in the chain let's you know handle it in some way shape or form um so with that being said uh I think as a as a way to reinforce knowledge learn something new um give you a foundation I think this is an incredible tool to any developer any administrator essentially any business user who is interested in not just servicenow but but any platform I was using it yesterday to get me some crazy complex Excel formula um to get data in a certain way that I wanted to and it saved me hours absolutely hours of scraping through the docs for it yeah I'll be the first to admit like when I I started working with programming God when I was in Middle School or high school and as soon as Google came out right it was like oh I don't understand this I can just go search and hit a forum or some other code repository as the kind of things evolved over the years and even now in servicenow when you kind of when you're trying to do something and you hit a wall or a gap in knowledge like you were saying you go search you go look out there and what I hear you saying is maybe add this as the first or second step including that search yeah yeah I think I think that is it's like having uh a good friend who's who's really good at something you're not and just go into them but you have to bother a person you know you can go to the bar and get an initial answer and and work your way from there um I guess the one thing I would say is you know don't be disheartened if the first time you ask it a question it produces something maybe you know a bit rough a bit a bit not quite what you were after there is an art to learning how to speak to the bot um the questions I was answering asking it a month ago versus the questions I'm asking you today I mean there's been a there's a there's a huge change in the way I write to the bottom knowing what kind of output I'm looking for so yeah don't be disheartened but it's an incredible tool and it sounds like then you're you're encouraging to go out there learn it if anything learn how to interact with it and learn its pitfalls learn what it's good at um because what what's going to come in the future like what is like this is evolving pretty fast and it's it's really going viral among Tech enthusiasts as far as experimenting what do you see in the future I uh it's a really good question and um you know uh I think uh I think the the it's one of those things where I I imagine what it was like to be somebody um around the time the first little commercial or I guess non-commercial uh airplanes were introduced and it was a bit novel and people didn't know what to do with it and they were like oh that's cool you can you know you can dangerously fly across the sky um but really the uh the the the potential opportunities weren't fully understood at the time right people knew what they could do with it but it took 50 60 years for it to be real you know this this Global Logistics and everything else that surrounds that industry now um I think we're in the very early doors of what this kind of platform can do um I see I see hopefully in in the next five to ten years you know this sort of a platform uh taking away a lot of the monotony in in people's jobs there was a video I think last year where Google put out a conversation with an AI um and he tried to book like a hairdresser's appointment over the phone with somebody I'm not sure if you saw that one um but it used you know a voice an actual voice to to interact with another human being and the human being didn't even know it was talking to an AI right you know with that said you know the possibilities here you know everything from uh help desk conversations with a bot that you don't know is about to you know what about like um in a mental health therapy you know psychologists uh all the sort of people they're they're hard to get a hold of uh and they're expensive well you know why not just get a bot train it on on psychology for for two years feed it into the model and then open up a bot instance where anyone can go for mental health support you know it's I mean it's it's it's baffling the things that you could do with this thing yeah yeah you really agree with that I mean what do you think what do you think uh where do you think it's going to go what do you think the sort of short term looks like versus long term I think I want to be careful about predicting because but you can go back to your video in like five years ago yeah yeah I want to be careful but I want to I mean you you've probably seen some of my videos I'm passionate about learning I'm passionate about pushing the boundaries and seeing what can be done what's possible and you know I immediately leapt towards the kind of artistic side of this yeah and I feel like people like you um there's Jace and some other people in the servicenow community who've immediately gone to this Tech oriented view of the coding piece of it which totally just went right over my head I was like I never even my mind never went there and and I really so I want to unders you know you you asked what I think I think what you said earlier in so many words is we need to understand and we need to learn how to make this part of our daily practice even if it's just informative so that we can use that as another input to do our jobs better or to do whatever we're passionate about better and in order to do that we need to we need to not put up a wall for this and actually just start messing with it start playing with it start playing with different AI engines and and understand the ins and outs because I think the the flywheels and motion now and this isn't going to slow down I think it's going to accelerate and like many things and the tech side of things or probably just in you know Society in general that acceleration tends to leave people behind that don't don't keep up and I'm more concerned that there's some old philosophies and and some legitimate nervousness you know about stuff like this but I think you need to you just recognize that for what it is and still go learn this that's it everyone thanks to Mike Heron for coming on the channel if you would please give the video a like leave a comment extend your welcome let Mike know what a great job you did on the integration leave your thoughts leave your comments down in the comment section below I hope you found this video helpful if you did please like Please Subscribe or share it with somebody who you think might be interested in chat GPT or artificial intelligence writing its own Integrations with applications maybe even serviced now and until next time don't forget to always be learning foreign [Music]

View original source

https://www.youtube.com/watch?v=9-yLfX3km14