Sri61
ServiceNow Employee
ServiceNow Employee

TEST THE PREDICTION USING REST API EXPLORER

Once the solution training is complete, we need to check if the prediction is working or not. You can test the prediction with the help of REST API Explorer without actually creating a record.
  1. Type REST API Explorer in the filter navigator > Explorer
  2. Set Namespace as "now", API Name as "Agent Intelligence" 
  3. Set "solution_name" for which you need to test the prediction
  4. Click the button "Add Query Parameters"
  5. Add the input fields of your solutions. "short description" (in Text field 1) and "Email not working". Ensure to supply all the input fields of your solution and Click "Send"
  6. You will see the response output

find_real_file.png

You have now confirmed that the prediction works.
 

STEPS TO DEBUG - "PREDICTION NOT WORKING"

 
But sometimes you notice that the actual prediction does not work when the record is created. There could be different cases when the prediction does not work. In this article, we will discuss one such case.
 
1. Let's say prediction did not happen for incident record INC123456. Get data supplied to the inputs fields. And INC123456 has the following input fields
short_description: "email not working"
category: "Email"
2. From the REST API explorer, input the solution name, input fields and Get the value of parameter confidence from the response header output.
 Here is the response
 
Class confidence is only 15 
"result": { 
"input": { 
"short_description": "email not working", 
"category": "Email", 
"api": "api" 
}, 
"output": { 
"outcome": "IT ADMIN", 
"confidence": 15.632104265474023 

 

3. Get the threshold value. Follow the below steps
  1. Navigate to Agent Intelligence > Solution Definition > Choose the corresponding Solution Definition
  2. Choose the Solution which is Active from the ML Solutions related list
  3. Under Section, Class Confidence enter Name as <your class name> and Enter. In this case, we will enter IT Admin > Open the record
  4. On the Class Level Statistics section, get the values of Estimated Precision and Estimated Coverage. Let's say we have 75 and 90 respectively
  5. Under Precision Coverage Lookup, match the record with the values that obtained from the previous step( Est. precision 75 and Est. Coverage 90). 
  6. Configure the list layout and add "threshold" column. Get the threshold value. For class "IT Admin" we got the threshold value as 25.

Since confidence value 15 is less than the threshold value 25, prediction did not happen for INC123456.

 

If threshold value greater than confidence, the prediction will not happen. You might want to configure the precision/threshold value for the outcome class. 

Comments
Subhajit1
Giga Guru

Hi Sri,

Nice informative article.

Can you please mention some approaches in which we can configure the precision/threshold value.

Sri61
ServiceNow Employee
ServiceNow Employee

Hi Subhajit,

For Configuring precision/threshold values, you set the value of confidence greater than precision for corresponding class. That would be the approach if you want prediction to happen. However, this may result in predictions not being accurate. 

If your dataset is having a wider distribution/coverage the confidence will increase and so prediction will not fail.

You can use Prediction result dashboard to determine if solution predictions are improving over time.

Thanks,

Sri

Jayant3
Tera Contributor

Hi Sri,

 

I am trying to run test the solution using REST API Explorer.

But the prediction is failing. Also I cannot see any topwords in ml_class_list.do

Any suggestions as to what might be going wrong?

 

Thanks,

 

Jayant

Akhila Jayaraj
Tera Contributor

Hi Jayant,

 

I am facing the same issue since the New York upgrade. The topwords column is empty in the ml_class table.

Any updates on this?

 

Thanks,

Akhila 

Version history
Last update:
‎06-09-2018 10:22 PM
Updated by: