- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Overview
AI has been a thing for a few years in the IT ecosystem and ServiceNow is no expection. Things have evolved and been improved over time, but some organisations still don’t know how to make use of it. This article talks about how to create an AI skill with a sensible purpose so that those that still haven’t felt ready to use it feel more confident about it and also can get an idea for their first use.
In this article we will talk about a new AI skill that calculates how close an Incident and the Problem it’s related to are. Sometimes agents select the wrong problem due to the speed at which they work, so this field can help us locate incongruencies.
Data model
First of all, we need to have a place to store such result. The confidence level calculated by the AI will have to be stored somewhere so that we can see it, order by it, group, etc…
For doing so, we will go to the “System Definition” > “Dictionary” and create a new field called “Problem Affinity”
The field needs to be read-only as shown below:
We add it to the form under the “Related Records” tab as close as we can to the “Problem” field itself:
Creating our skill
Then we will create a new skill by going to “Now Assist Skill Kit” > “Home”. Bear in mind you will need the “sn_aia_admin” role to access this page.
Once we access it, we click on “Create skill”:
Our skill will be configured as shown below:
Once we click on “Next” we get the following screen, where we can define the inputs this skill will require. We create a “Reference” type one called “Incident” which is mandatory. This is the Incident we will require to calculate how close it is to the Problem it’s linked to.
After doing so, we can click on “Summary and Finish” to be able to edit the skill itself. In there we have the prompt, which we enter the following way:
Bear in mind we reference the “incident” in the input we mention and we can dot walk as we would do in a script, hence why we do “incident.problem_id.short_description” for instance. Please, remember where the “Run test” button is highlighted by the red arrow above, as we will be using it later.
Now let’s create two incidents and one problem. One of the incidents will match the problem. The other one, though, will not.
This is the incident that will match the problem:
This is the problem that matches it:
Finally, the unrelated Incident:
Now, we go to the “Related records” in both incidents and relate them to the Problem we have just created.
Let’s test our skill with both incidents and see what happens now that we have them linked.
With INC0019018 (the unrelated INC) the AI recognises that both aren’t related.
However, with INC0019017
Given that we can see it works well, we will be amending the prompt to request it not to provide anything apart from the percentage of affinity.
Then we need to Publish the prompt by clicking on the button above it.
With this, our skill will return only that number, but the response field will contain a JSON structure that looks like this:
{“model_output”:100}
For this reason, we cannot simply assign this response to the “Problem affinity”. We have two options, we remove the JSON structure and replace it with the number in the skill or we parse the response in the Flow. At this moment we cannot redirect the output to another output field as ServiceNow doesn’t allow that as of today.
Once this is possible we could simply redirect it. Given that this is not the case, we will opt for creating a Postprocessor to “clean” the output so that the Flow can consume it directly.
This can be done by going to the “Skill settings” and going to the provider, in this case “Now LLM Service” and clicking on “+Add” on the “Provider postprocessor”. This will allow us to perform actions after the skill has provided an output.
Once we perform this action, we save the postprocessor and are ready to configure its visibility and usability. Just make sure you click on “Save” to prevent the changes from being lost.
Ensuring we can use the Skill
Now let’s go to the “Skill Settings” and there to the “Deployment Settings” and we tick the “Flow Action” option to be able to use this skill in a Flow, although this is not the only thing we need to do. We will see after publishing the skill how to ensure it’s selectable there.
Then we publish the Skill using the button located at the top-right corner:
The skill is now ready to go, but there is one more thing we need to do to ensure the skill can be used in a Flow. For that, we need to go to the “Now Assist Admin” panel.
Then under the “Now Assist Skills” > “Other” we will find the “Problem Affinity Calculator” skill within the “Available” tab. Bear in mind that it appears under “Other” because when we selected the Workflow under the “Now Assist Features” in the Deployment section of our skill we selected “Other”.
By clicking on “Active skill” we will see the following screen. Bear in mind if you see “Turn on” you need to go back to the deployment settings in your skill and ensure you select “Flow”.
In this screen we ensure the “Display” slider close to the Flow Action is on and click on “Save and continue” to see the other details, which we can simply leave alone and Activate the skill.
Making use of the skill
The only thing needed now is a Flow. This Flow will ensure there’s both a trigger and a mechanism to store the confidence level the skill prints into the “Problem Affinity” field we created at the beginning of this article.
We create a new flow called “Problem Affinity Calculator”:
The first step is defining the trigger, which we define this way. If the Problem field within the Incident changes, we will trigger the flow for every update of this type:
Then the first action needs to be an "if" statement to validate if the Problem field contains something or not. If not, we need to clear the "Problem Affinity" value, otherwise we need to recalculate it:
This is the update we perform if "Problem" is empty:
Then we create an else statement and use the “Execute skill” selecting “Other” in the “Workflow” field and our skill under “Skill Config”. Then the Dynamic input should show the Incident input we defined in our skill. If it doesn’t we can always click on the circle arrow to refresh the values.
The last step is saving the result of our skill in the Incident under the “Problem Affinity” field we created at the very beginning of this article.
Selecting the incident coming from the trigger, then setting the “Problem Affinity” to the response obtained from the output given by the “Execute Skill” action we ensure we store the result. Then we Activate the Flow as usual.
Showing the end results
In the test we performed in our skill we had already entered a Problem in both Incidents. Let’s clear the “Problem” value in them and save them so that we can enter the same problem again and see how ServiceNow populates the “Problem Affinity” field.
After making it blank and populating it again, we see the “Problem Affinity” being populated.
From the list itself, if we display the Problem Affinity field, we will see them at a glance, helping us detect Incidents related to a Problem they shouldn’t be:
Please like 👍 and share 🌍 this article to your colleagues if you found it useful.
- 203 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
