Define a query filter for Now Assist Q&A Genius Results
Define a Java regular expression pattern that a search must match to be eligible for triggering Now Assist Q&A Genius Results. Searches that don't match this pattern don't return Genius Result answers from Now Assist Q&A Genius Results.
Before you begin
The Now Assist in AI Search ServiceNow® Store application must be installed on your instance. For details on installing this application, see Install Now Assist in AI Search.
Make sure that you're familiar with Java's regular expression pattern syntax. To learn about the regular expression pattern syntax, see the Javadoc for the java.regex.util.Pattern class.
Role required: admin
About this task
Now Assist Q&A Genius Results send eligible knowledge article search results to the Now LLM Service for Q&A Genius Result answer generation.
- The search application is Service Portal, Virtual Agent, Employee Center, or global search.
- The user's session language is English.
- The search contains two or more terms.
- The search matches the Java regular expression pattern defined by the sn_ais_assist.u_question_regex system property's value. This system property has no value set in the base system, so by default all search queries satisfy this condition.
You can customize the pattern match condition by defining your own Java regular expression pattern for use by Now Assist Q&A Genius Result configurations.
Procedure
Result
Now Assist Q&A Genius Results don't send knowledge article search results to the Now LLM Service for Q&A answer generation unless the search query matches your Java regular expression pattern.