Eliza
ServiceNow Employee
ServiceNow Employee

Eliza_0-1727137719267.png

Overview

Now Assist Skill Kit (NASK) allows you to create new generative AI skills using the generic Now LLM or your own LLM.  NASK has been designed to easily manage and integrate new skills into the ServiceNow platform via a UI Action and soon into the Now Assist Panel. With NASK you define the input data, leverage tools to process the data, activate the new skill, and deploy it to the platform (see below).

Eliza_3-1727225078606.png

 

For our use case we will use NASK to send a prompt to the LLM asking it to review the contents of our knowledge article, and to provide suggestions on how to improve it. This feedback will be stored in a Feedback Task attached to the knowledge article.

 

Eliza_2-1727225003935.png

 

Prior to running this lab, you will need:

  1. Your own instance on at least the Xanadu release. Note that Generative AI/Now Assist features do not work on Personal Developement Instances (PDIs).
  2. The latest Now Assist for [x] plugin e.g. Now Assist for ITSM/CSM/Creator - Now Assist Skill Kit comes with all Now Assist SKUs, so all plugins will install it.
  3. At least one record in the kb_knowledge table in the published state.

 

 Phase 1: Review the knowledge article

  1.  Type kb_knowledge.list into the filter navigator. You should see a list of knowledge articles.Eliza_11-1727225281103.png
  2. Identify a published knowledge article that you will use as a test record for NASK. The ideal candidate for selection is an article that contains a number of spelling, grammar, and structural issues. If you don’t have a good article to leverage, you may create a new knowledge article using the below text:

R u having trouble with ur Outlook inbox? It can b a real pain in the butt when things aren't working rite, huh? Well, let me break it down 4 u and give u sum tips on how to fix those pesky issues.

First of all, one common problem peepl have with their Outlook inbox is that emails are not showing up or they r disappearing randomly. This can b super frustrating, especially if you're waiting for an important email. One possible reason for this is that ur inbox is getting too full and causing Outlook to glitch out. So, what u can do is try clearing out sum old emails or moving them to a different folder to free up sum space.

Another issue u might encounter is that ur inbox is running super slow or freezing up. This could be due to a bunch of different factors, like a slow internet connection, a bug in the Outlook program, or a problem with ur computer's hardware. To help speed things up, try closing out of any unnecessary programs or tabs, restarting ur computer, and checking for any updates to the Outlook program.

Sumtimes, u might find that emails r not sending or receiving properly in ur inbox. This could b because of incorrect email settings, a problem with ur internet connection, or issues with the recipient's email server. To troubleshoot this problem, double-check ur email settings to make sure everything is set up correctly, restart ur internet connection, and reach out to ur email provider if necessary.

Overall, dealing with issues in ur Outlook inbox can b a real headache. But by following these tips and staying patient, u should b able to troubleshoot and fix those problems like a pro. Good luck!

 

  1. Note down the number of the knowledge article you will be using.

 

Phase 2: Grant access to Now Assist Skill Kit

  1. First, we need to grant our current user permission to use Now Assist Skill Kit. Click on your avatar, then Profile.
    Eliza_8-1727225196467.png

     

  2. Click on the three bar menu in the top left corner, then View > Default View.

    Eliza_7-1727225189149.png

     

  3. Scroll down to the related list named Roles and click Edit.Eliza_9-1727225203605.png

     

  4. Add the role named sn_skill_builder.admin to your user. Click Save.Eliza_10-1727225210563.png

     

  5. Log out and log back in to your user. You should now have access to Now Assist Skill Kit!

 

Phase 3: Build the custom skill

  1. Navigate to All > Now Assist Skill Kit > Home from the filter navigator.
  2. Click Create new skill.

     

    Eliza_13-1727225805395.pngEliza_15-1727225371873.png

     

     

  3. Name the skill Knowledge Article Coach. In this lab, we will be using the Now LLM service to complete our task, so ensure the Default provider and Provider API values are both set to Now LLM Generic.
    Eliza_16-1727225378917.png

     

  4. Add a new skill input by clicking the plus icon next to it. This is where we add the reference to a knowledge article to use within the prompt.
    Eliza_17-1727225385445.png

     

  5. Populate the skill input form as seen below, replacing the test record with the number of your knowledge article from phase 1. Once complete, click Add skill input.Eliza_18-1727225392939.png

     

  6. [Optional] Click the Pencil Icon next to the prompt name to rename the prompt. We are renaming it to Knowledge Coach here. Click Save changes.
    Eliza_19-1727225399352.png

     

  7. In the prompt field, remove the template text and replace it with the following:

You are an AI model specialized in evaluating the quality of knowledge base articles on IT issues. A knowledge base article that covers a specific IT topic will be presented. Your task is to perform a quality check on the article by evaluating it against the following criteria:

Rubric for quality check:
1. Clarity and Conciseness: The article should be easy to understand, with clear, concise language that avoids unnecessary jargon.
2. Comprehensiveness: The article should cover all necessary aspects of the issue, including steps for resolution, potential pitfalls, and any additional resources.
3. Grammar and Language Use: The article should be free from spelling, grammar, and punctuation errors, and the language should be professional and appropriate for the audience.
4. Usability: The article should be organized in a user-friendly manner, with clear headings and step-by-step instructions that help the user navigate the content.

Evaluation Instructions:
- Each criterion should be evaluated as either "Satisfactory" or "Unsatisfactory."
- If a criterion is evaluated as "Satisfactory," provide no additional explanation.
- If a criterion is evaluated as "Unsatisfactory," provide a brief explanation of why the article does not meet the criteria.
- By the end of the evaluation, if one or more criteria were deemed "Unsatisfactory," provide overall improvement suggestions.

Article to be assessed:

  1. Click in the text box to add your cursor focus to the end of the prompt. (i.e. have the flashing line appear after the text “Article to be assessed”). Click Insert inputs.

     

    Eliza_3-1727226281988.png

     

     

  2. Click on the arrow icon next to the Knowledge skill input we added in step 5.
    Eliza_21-1727225504821.png

     

  3. Select Article body.
    Eliza_2-1727226258587.png

     

     

  4. Your prompt field should now contain a reference to the skill input:
    Eliza_23-1727225530040.png

     

  5. Click Save.
    Eliza_24-1727225534117.png

     

 

Phase 4: Test the custom skill

  1. Scroll down to the Test prompt section. Click Run tests.
    Eliza_0-1727225618042.png

     

  2. From the dialog box that appears, verify which knowledge article you wish to test your skill against, then click Run Tests.
    Eliza_1-1727225621902.png

     

  3. Verify the output from the LLM is to your liking. You can iterate upon the provided prompt if you desire.
    Eliza_4-1727225664300.png

     

  4. To verify if information from your skill inputs is being brought in correctly, click on the tab named Grounded prompt. You will see the input that was delivered to the LLM, including your knowledge article text.
    Eliza_5-1727225680037.png

     

  5. Once content with the output of your skill, click Finalize prompt.
    Eliza_6-1727225701624.png

     

  6. In the module that opens, click Finalize prompt again.
    Eliza_7-1727225708038.png

     

Phase 5: Deploy the custom skill

  1. Click on Skill settings at the top of the page.
    Eliza_8-1727225724310.png

     

  2. Click on the option named Deployment Settings.
    Eliza_9-1727225728899.png
  3. Underneath the workflow header, set the value to be Other.
  4. Tick the option marked UI Action, and set the table to Knowledge (to do so, type in kb_knowledge and scroll down until you find it)
    Eliza_11-1727225768471.png

     

  5. Click Create UI Action, then Link to UI Action once it appears.
    Eliza_12-1727225788902.png

     

  6. A new window containing your UI Action will appear. Change the value in the Name field to Review my article.
     
    Eliza_15-1727225821961.png

     

     

  7. In the script field, replace everything from the try statement and below with the code provided below. Ensure you replace the instance URL with your instance’s URL.
    Eliza_14-1727225815334.png

     

 

try {

    var output = sn_one_extend.OneExtendUtil.execute(request)['capabilities'][request.executionRequests[0].capabilityId]['response'];

   

      var newFeedback = new GlideRecord("kb_feedback");

newFeedback.initialize();

newFeedback.article = current.sys_id;

var feedbackSysId= newFeedback.insert();


      var newTask = new GlideRecord("kb_feedback_task");

        newTask.initialize();

        newTask.assigned_to = gs.getUserID();

         newTask.feedback = feedbackSysId;

        newTask.short_description = "Knowledge Article Feedback generated by NowLLM";

        newTask.description = JSON.parse(output).model_output;

        var newTaskSysid = newTask.insert();


        //get the link to the new case/incident

        var mylink = '<a href="https://INSTANCE URL.service-now.com/kb_feedback_task.do?sys_id='+newTaskSysid.toString()+'">here</a>';


        //publish an info message

        gs.addInfoMessage("We have finished reviewing your Knowledge article and have created a feedback task for you to review. Click " +  mylink +  " to open.");



} catch(e) {

    gs.error(e);

    gs.addErrorMessage('Something went wrong while executing skill.');

}

action.setRedirectURL(current);

 

 

  1. Click Update to save the record.
  2. Return to your skill within Now Assist Skill Kit.
  3. In the top right corner, click Publish.
    Eliza_16-1727225886401.png

     

  4. In the module that opens, tick the box containing your finalized prompt, then click Publish.
    Eliza_17-1727225895144.png

     

Phase 6: Activate the custom skill

  1. Navigate to Now Assist Admin from within the filter navigator.
    Eliza_19-1727225936696.png

     

  2. Click on Now Assist Features, then Other to find your published skill.
    Eliza_20-1727225950975.png

     

  3. Click on the tab named Available to find your published skill. Click Activate skill.
    Eliza_21-1727225967231.png

     

  4. Set the Display trigger to true, then click Save and continue.
    Eliza_22-1727225975160.png

     

  5. Review the next page, then click Activate.
    Eliza_23-1727225982394.png

     

  6. Dismiss the message stating confirmation of activation.

 

Phase 7: See the custom skill in action

  1. Type kb_knowledge.list into the filter navigator. Find the knowledge article you wish to run your custom skill on and open the record.
    Eliza_24-1727226012638.png

     

  2. Click the UI Action you created – you may have named it something else.
    Eliza_25-1727226021744.png

     

  3. Review the information message that appears. Click the link in the message to open the feedback task.
  4. Review the output from your custom skill in the description field of the feedback task.
    Eliza_26-1727226046337.png

     

  5. Congratulations! You have now created and deployed a custom skill.
Version history
Last update:
‎09-24-2024 06:05 PM
Updated by:
Contributors