
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
05-01-2022 12:13 AM - edited 12-06-2023 04:44 PM
How to use AI Search and other search tools in your Virtual Agent to quickly discover answers
Vancouver release
Tired of getting the message, "I am sorry but I didn't understand your request"? Use ServiceNow's search tools to get better results and answers for your Virtual Agent users. You can use the Search Fallback topic, powered by Contextual Search, or if enabled you can use AI Search. Fallback topics are helpful when you are just starting your Virtual Agent journey and haven’t enabled all your desired topics yet. While expanding your topic list, you can rely on Search Fallback to still serve the majority of your users’ requests and questions.
Users can still expect answers from your Service Catalog or Knowledge Base. That is why it is also important to maintain your Catalog and Knowledge with the latest and greatest information.
Rule of thumb: Your search results are only as good as the quality and currentness of your Knowledge Base and Service Catalog!
Custom Greetings & Setup – Recommended Setup topics configuration for fallback topics.
See the following search methods available on the Virtual Agent below:
AI Search, Genius results, and Troubleshooting
AI Search is a newer, more powerful search for ServiceNow. It uses machine learning to find the most relevant search results to directly address user queries. Genius results powered by NLU provide the single most relevant item in a rich card format.
How to enable:
AI Search is automatically provisioned for you. If not, you can enable AI Search via the “Request AI Search” button. This can be found in the Conversational Interfaces Home page. Once your instance is successfully provisioned for AI Search, the AI Search Status page should display the status: “AI Search is Ready!”
Requesting AI Search on the CI Home page
Using AI Search for Virtual Agent
In your Default Chat Experience > Setup topics configuration, “AI Search Fallback” should have the “AI Search – Fallback" topic added by default. When AI Search is enabled, Virtual Agent will use AI Search as the default fallback. If not enabled or if AI Search does not return results, then the “Search Fallback” topic is used. The "AI Search - Fallback" topic uses an updated "AI Search" topic block. If you're upgrading from a previous ServiceNow release, check to see that you're using the new topic block to run AI Search in your topics or flows.
Optional: You can navigate to Default Chat Experience > Search Mapping, to change the Search Application or the Search UI (EVAM) Configuration. The Search Application determines the behavior and logic of the AI Search experience while Search UI determines the appearance of the search results.
Genius results present a single result in a card format. To activate genius results, take the following steps:
- Since genius results rely on NLU, navigate to “Vocabulary Sources” and sync your sources related to AI Search Genius results
- In your AI Search > Search Profile, ensure that genius results for “Catalog” and “Q&A” (Knowledge) are Active.
Note: Genius results are currently only available in English.
Catalog item genius result
Catalog Item results with AI Search
In the Tokyo release, catalog item results can be ordered via in-line conversation, a pop-up, or a new browser tab. The behavior is determined by the catalog item itself and its variables. The default experience is pop-up. You can see how the catalog item will be rendered in Virtual Agent by navigating to sc_cat_item table, clicking an item, and then clicking the "See VA render type" related link. If you do not want to render your Virtual Agent conversation as a pop-up, set the glide.sc.va.render_type.legacy property to 'true', which renders pop-up catalog items in a new browser tab.
Troubleshooting Virtual and AI Search :
If you're expecting certain search results, first test your search term in the AI Search Preview tool. Virtual Agent displays those results.
Make sure that the "AI Search - Fallback" topic uses the updated "AI Search" topic block.
Admins can expand the number of AI search results displayed up to 10, using the com.glide.cs.ai_search.max_regular_result system property.
Contextual Search
You can also use regular Contextual search as your fallback. The “Search Fallback topic” uses the contextual search topic block. The topic block can also be used within other topics in fallback branches, e.g. when user issues still are not resolved after a recommended action.
Additional configurations:
You can configure the search context of the Search Fallback Topic. First, duplicate the (read-only) Search Fallback Topic. Click on the “Contextual Search” topic block. You can then change the context field. The available search contexts can be found in the “Search Context” table (cxs_context_config), each with different Search Sources. The default search context is “Incident Deflection”. You can also create your own.
Contextual Search topic block and search context
FAQ Builder
You can use the FAQ Builder topic block to provide a simple FAQ experience in the Virtual Agent. When users type a Question that matches an FAQ record in the Knowledge Base, the Virtual Agent will output the Answer.
Note: FAQ requires the Knowledge Management – Advanced Installer plugin. Once installed, FAQ is available as an Article template. In Knowledge > Administration > Templates, mark "FAQ" as Active.
How to enable:
First, make sure you have published FAQ Knowledge records.
Example published FAQ article about corporate cellphone plans
Then in VA Designer, use the FAQ Conversation Builder topic block. It requires an input query, which can be a text input for example. You can incorporate the FAQ topic block in an existing topic or consider creating a separate topic just to service your FAQ.
FAQ Builder topic block and example topic flow
BONUS! - External Sources
Sometimes, the information users are looking for can’t be found in ServiceNow. It’s also possible to embed a web search such as a search engine or product support site.
Note: AI Search can integrate external sites owned by customers such as your corporate SharePoint. The following example is for public sources.
How to configure:
It is possible to create a dynamic link where a portion of a URL is scripted or based on the user’s input. You can use this to create a URL link for users to surface external search results based on their search terms. For example, searching for “Teams audio issues” in the Microsoft Support site results in a URL: https://support.microsoft.com/search/results?query=Teams+audio+issues&isEnrichedQuery=false
You can create a Text Input node first to grab a user query. Then use a Text Output node and insert a link. For the link, use the data pill to insert an input variable. This will generate a link that users can click to open the search results.
If you know some simple scripting and HTML, you can also embed an HTML of the search results within the Virtual Agent. To embed the query, you can access your input query variable in your script block with ‘vaInputs.xxx’.
Note: If using an MS Teams or Slack integration, HTML will display as an image so this technique will not be as effective.
Final thoughts
- To reiterate, one of the first things you should do is to replace the “Fallback Topic” with the “Search Fallback Topic.”
- As you expand your topics, avoid creating topics just for the sole purpose of showing a knowledge article or piece of information. Instead rely on search fallback to surface relevant information.
- Keep your Knowledge Base and Service Catalog up to date. The better the data, the better the results!
- Keep your ITSM/HRSD Virtual Agent Conversations store app updated. We are constantly improving the Virtual Agent and Search experience through the store apps.
See the May 3, 2022 Virtual Agent Academy on using search in Virtual Agent:
- 16,084 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Victor
Can the Run AI Search block also be used instead of the contextual search and not only as a fallback search? Does the Run AI Search block require additional logic compared to the regular contextual search, just looking at the AI Search Fallback there is quite some logic around genius results and displaying further records, I would expect if you just use the Run AI search in a topic it will not have this functionality? Is there any guidance on this?
Thanks

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@ulr2 - Yes it does, which is why in that case I recommend using the updated "AI Search" topic block found in San Diego Patch 9, and Tokyo P4. I've just updated the article above to make note of the update.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I have one requirement, When I type "create incident" in now support then It should show me similar interface like attachment and when I click on request this item, It should redirect to incident form. How I can achieve it?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
We have AI search enabled and setup configuration has “AI Search – Fallback" added to "AI Search Fallback” .
When I search anything first time I get genius result as expected and 3 options to chose. If I select show more I get 3 results as per setting and 3 other options as in second image. When " I need more help" is selected I get sorry message ,my question is shouldn't system return more results as we show in portal ? where can I tune this search ?
@Victor Chen any suggestions , thank you!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Victor Chen Just out of curiosity what would cause the AI Search Fallback Setup topic to break the Virtual Agent when attempting to switch languages in the conversation?
Currently, my situation is just this, I get my greeting message and other criteria to display. Once the initial greeting and content has been displayed with the topic picker "Show me everything", I then type Guten morgen to prompt the VA to ask if I want to continue in german. When selecting Ja | Yes, the VA then switches the language and starts a search of the KB and Catalog items. I want the VA to reinitialize the conversation in the chosen language after selecting Yes.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
When using Machine Language Detection, the expected flow is that a user would not greet the Virtual Agent in their language, instead they would just ask their question.
Because of this expectation, the Virtual Agent has been designed in such a way that once a user confirms the language they're speaking in, it will reload in that language AND bring the original utterance (what the user typed) in as an utterance to use for Topic Discovery.
If you link the Greeting that you have to a properly constructed NLU Intent, this should remediate the issue that you're seeing and lead to users that greet the Virtual Agent being brought to the Greeting topic via Topic Discovery instead of their greeting not being picked up by Topic Discovery, which causes the behavior you're seeing now (Virtual Agent falling back to Search).
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I believe this is released in Utah OOTB (ability to return more than 3 regular search results in AI Search)
There were 2 reasons behind the previous design of only allowing 3 regular search results.
1. AI Search has an average click position of ~2 (one of the top 2 results is usually the one users want)
2. Virtual Agent's Link Output can only put out 3 links at a time (system limitation)
I've customized this before for customers to allow for the pagination of regular results like existed in Contextual Search (the Search Fallback topic) but this is rather advanced and script-heavy.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@WillWitten So I took a look at my greeting, which was a combination of two ootb greetings that I had modified to provide additional information and to check if the user was logged in. I trained my NLU model and translated 6 languages. Linked my greeting to the NLU Intent. If I could just understand or configure the greeting to restart the conversation once the user selects yes then Ill be in a good spot. Currently, its still pulling the intent guten morgen and running ai search on the greeting.
I may be missing something.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
No worries! Here are some pieces to check
- Ensure that the Greeting you want discovered is configured as a Setup Topic in the Chat Experience
- Ensure that the topic is available to all users, as the OOTB Setup Topics are restricted by a script that always returns 'false' (Check the 'Who can access this topic' tab of the Topic Properties)
- Ensure that Topic Discovery is on for the Topic (Check the 'Active' tab as shown in screenshot below)
Essentially, because Dynamic Translation is assuming the user is submitting an utterance instead of greeting the Virtual Agent, it submits the utterance for Topic Discovery instead of re-prompting the user. By configuring this, you can add your Greeting as a part of Topic Discovery, so that if users greet the Virtual Agent at the start of the chat, the Virtual Agent can greet them back! (See below)
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@WillWitten Ive ran through all my settings and configuration. I have what you have displayed but my result ends up being different. See my result here. It still continues to enter search.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Can you check in the NLU Batch Testing?
- Install the Advanced Features plugin for NLU
- Go to Multi-model Batch Testing and create a new Test Set that has 'hi' as the utterance, and your greeting intent as the expected intent (you will need to do this in Excel, see pictured and use your utterance and intent pair
- Run a test with this test set and ensure that it returns the expected result
You should also ensure that your Greeting is configured as a Setup Topic for the chat experience you are testing from, and that you've published the greeting with the changes that you've made to the applicability.
Let me know how it goes!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Ran the test, test failed.
Im sure i'm missing something. I have two other issues to address after this one but that will be for tomorrow.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@WillWitten ran the test above. Test Failed.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@WillWitten Ive tested my chat experience through the conversational interface>custom greetings>mycustomgreeting and hitting test on the greeting. Everything worked as intended. Upon going to the Virtual Agent on my portal somethings aren't working the same as the conversational interface test. Maybe a new thread is required. Any other insight?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Victor Chen @WillWitten Question regarding the Genius Results, is it possible to display more than 1 Genius Result tile/card? If so, how would we go about updating the Virtual Agent to accommodate this? I haven't been able to find any documentation to accomplish this anywhere within the documentation on AI search and Genius Results search. I am on Vancouver at the moment.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Viktor,
Great read! Question regarding around only show specific self service KB's in VA search. Right now, the search looks both IT internal kb's and self service. I thought you could do in search profile but that didn't seem to work. I added a condition to only search End User self service articles but to no avail. Guidance would be greatly appreciated.
Good day.
Edwin