Now Assist Custom Skill - Not Returning Expected Results When Triggered From SubFlow/ From BG Script

Venkata Sai Ku1
Tera Contributor
  1. Execution of Skill from Sub Flow:
    I am leveraging a custom skill named “Email and PII Triage” from a subflow using “Execute Skill” OOB Action.

    Purpose of the Skill : To analyze the email body and subject and return output in JSON :

    {

     "related_to_employee_relations": "yes/no",

     "related_to_time_off_and_leaves": "yes/no",

     "contains_multiple_requests": "yes/no",

     "contains_pii_or_sensitive_info": "yes/no",

    }


    [ The skill has already been published and activated from Now Assist Admin. ]
    Inputs Given :
    DynamicInput{json='{"email_body":{"value":"Hi Team,

 

Can you help me share what are all the benefits of ServiceNow?

 

Regards,

Sai","display_value":"","definition":{"label":"Email Body","type":"string","mandatory":false,"defaultValue":"","readonly":false,"use_dependent":false,"type_label":"String"}},"email_subject":{"value":"Benefits of Snow","display_value":"","definition":{"label":"Email Subject","type":"string","mandatory":false,"defaultValue":"","readonly":false,"use_dependent":false,"type_label":"String"}}}'}




Output from SubFlow:FromSubFlow.jpeg

 
It always gives me "related_to_time_off_and_leaves"  as "yes" irrespective of whatever the input is.




NOTE: Execution of standalone Action [ Execute Skill ] separately works fine for the same inputs.

2. The same behaviour from BackGround Script with same set of inputs:

 

Script:

var skillInputs = "DynamicInput" + "{" +
"json =" + '{"email_body":{"value":"Hi Team,\n\nCan you help me share what are all the benefits of ServiceNow?\n\nRegards,\nSai","display_value":"","definition":{"label":"Email Body","type":"string","mandatory":false,"defaultValue":"","readonly":false,"use_dependent":false,"type_label":"String"}},"email_subject":{"value":"Benefits of Snow","display_value":"","definition":{"label":"Email Subject","type":"string","mandatory":false,"defaultValue":"","readonly":false,"use_dependent":false,"type_label":"String"}}}' +
"}";
 
var inputs = {
"skill_config_id": "78dd8cb93b576ed02fccb7d964e45a99",
"skill_inputs"skillInputs
};
 
gs.info(JSON.stringify(new sn_skill_builder.NASKFlowDesignerUtils().executeSkill(inputs)));


Output:

{"provider":"Now LLM","response":"{\"model_output\": \"{\\n  \\\"related_to_employee_relations\\\": \\\"no\\\",\\n  \\\"related_to_time_off_and_leaves\\\": \\\"yes\\\",\\n  \\\"contains_multiple_requests\\\": \\\"no\\\",\\n  \\\"contains_pii_or_sensitive_info\\\": \\\"no\\\"\\n}\"}","status":"success"}



Irrespective of the inputs given to the skill through the subflow or from the BG Script, the output remains same, whereas it works fine from Now Assist Skill Kit Testing Page as below:
3. 
From Skill Kit Testing Panel :

For the same skill “Email and PII Triage”, the below is while testing manually on Now Assist Skill Kit UI/Page.

Inputs Given:
Email Body: Hi Team,  Can you help me share what are all the benefits of ServiceNow?  Regards, Sai

Email Subject: Benefits of Snow

Output: [ As Expected ] 
{

 "related_to_employee_relations": "no",

 "related_to_time_off_and_leaves": "no",

 "contains_multiple_requests": "no",

 "contains_pii_or_sensitive_info": "no"

}

Not sure why it behaves differently when triggered from subflow or script. Has anyone else faced similar issues with custom skills and found a resolution? Appreciate your help !!

0 REPLIES 0