Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to configure Genius result in KB for Virtual Agent

js20
Mega Guru

In Virtual Agent Default Search Application  in Service Portal Default Search Profile I have created Genius Result configuration  with Ai search request processor:

function process(context) {
    var answer = new sn_ais.GeniusResultAnswer();

    answer.setTable('kb_knowledge');
    answer.setSearchPhrase(context.getOriginalSearchPhrase());
   
    answer.setEncodedQuery("workflow_state=published^active=true");
    answer.setSearchLimit(1);
    answer.searchTitleOnly(true);
    answer.addSearchAttribute("geniusResultSearchMode", ["custom"]);

    return answer;
}
 
In Custom Greetings & setup I have experience with Search mapping with Virtual Agent Default Search Application and EVAM Virtual Agent Search. all is active also AI search is ON. 
However if I Run AI search topic block it gives me only regular results not Genius result even If I search exact KB article. 
 
Can someone help to get those Genius results from KB please?
3 REPLIES 3

benm3
Mega Guru

Hi js20,

 

Did you make any progress on this? 

 

Thanks,

Ben 

MathiV
Tera Contributor

Hi,

We have same issue. We created a custom "Genius result" for Knowledge article, with similar code as above. But I am unable to tell if it is working. Any suggestions from ServiceNow would be helpful??

Thanks,

Mathi.

Anjana P T
Tera Contributor

@MathiV  Any updates on the same, We have a similar requirement