Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Test a solution prediction

Test a solution prediction

Once your machine-learning (ML) solutions are trained, you can call on the Agent Intelligence API to make a solution prediction. In this example procedure, we use the REST API Explorer to test a solution prediction for incident categorization.

Before you begin

Role required: web_service_admin, rest_api_explorer, or admin

Train your ML solution prior to testing a prediction.

About this task

This procedure uses sample data to illustrate what you can do in your instance, and may not represent data or records that are actually in your instance.

Procedure

  1. Write down and save the name of your ML solution definition.
    In this case, you would use the Name field value in your ML Solution Definition Incident Categorization record, as illustrated in the following example.
    Show user where to find ML solution definition name.
  2. Write down and save the Input Fields type in your ML Solution Definition Incident Categorization record that you want the REST API Explorer to use in its call to the Agent Intelligence API.
    In this case, you would use the short _description field, as the prediction model has been trained to use this field to learn its category definition.
    Show user where to find Input Type.
  3. In your application navigator, navigate to System Web Services > REST > REST API Explorer.
  4. Set these choice fields as follows.
    FieldDescription
    Namespace now (leave as default)
    API Name Agent Intelligence
    API Version latest (leave as default)
    The Agent Intelligence form appears. You use this form to prepare your call request to the Agent Intelligence API.
  5. In the solution-name Value field, type ml_incident_categorization.
    Note: This is the Name value you captured in Step 1 of this procedure.
  6. Click Add query parameter.
    The Agent Intelligence form refreshes to show the Query parameters section.
  7. Type short_description in the first field.
    Note: This is the input field you captured in Step 2 of this procedure.
  8. Type a short description of an incident in the second field. For instance, type Unable to connect.
  9. Click the Send button.
    The REST API Explorer sends your request to the Agent Intelligence API.
    The system predicts the output value in the Response Body section of the API output. You can use other short descriptions to test what the solution is predicting.
  10. (Optional) Send a different request to the Agent Intelligence API so you can test the prediction model again.
    1. Return to the Query parameters section of the Agent Intelligence form.
    2. Type a short description that references a different kind of incident in the second field. For example, type Unable to connect to MSSQL.
    3. Click the Send button.
    The Response Body section may refresh to show a different outcome than what you saw in Step 9, depending on which incident categories you configured in your solution definition setup. In other words, changing the short description text can recategorize the incident as a different kind of issue.

Example

You can also test the Agent Intelligence prediction model when you create a new incident record using the incident form.
  1. Navigate to Incident > Create New.
  2. In the new Incident form that loads, set the fields as follows.
    • User: Type the Caller name.
    • Category: Leave as default.
    • Short description: Type a short description that you want to test.
  3. Submit the incident form.

Result: When the form refreshes, an information message appears with the incident category automatically set to a specific value.

Note: For some short descriptions, the prediction might not process because the solution does not have enough confidence in predicting the value for this input.