How to troubleshoot and debug AI Search<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } <!-- .SOKMKBArticle div.margin { padding: 10px 40px 40px 30px; color: #283d40; font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; font-size: 10pt; } .SOKMKBArticle div.fed{ background-color: #f5f8fa; border: 1px solid; border-color: #bfbfbf; padding: 10px; } .SOKMKBArticle .FedRestricted{ background-color: #c00000; color: #ffffff; padding: 10px; margin-top: 10px; text-align: center; font-size: 14pt; font-weight: bold; } .SOKMKBArticle .CustRestricted{ background-color: #ff0000; color: #ffffff; padding: 10px; margin-top: 10px; text-align: center; font-size: 14pt; font-weight: bold; } .SOKMKBArticle .SNRestricted{ background-color: #ea700d; color: #ffffff; padding: 10px; margin-top: 10px; text-align: center; font-size: 14pt; font-weight: bold; } .SOKMKBArticle .SNConfidential{ background-color: #ffc000; color: #ffffff; padding: 10px; margin-top: 10px; text-align: center; font-size: 14pt; font-weight: bold; } .SOKMKBArticle .Public{ background-color: #00b050; color: #ffffff; padding: 10px; margin-top: 10px; text-align: center; font-size: 14pt; font-weight: bold; } .SOKMKBArticle table.tocTable { border: 1px solid; border-color: #f2f2f2; background-color: #f2f2f2; padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } .SOKMKBArticle table.noteTable { align: left; border: none; border-color: #81b5a1; background-color: #f2f2f2; width: 100%; border-spacing: 2; font-size: 11px; } .SOKMKBArticle table.internalTable { border-top: 1px solid; border-left: 1px solid; border-color: #81b5a1; width: 100%; border-spacing: 1px; } .SOKMKBArticle .sp td { border-bottom: 1px solid; border-right: 1px solid; border-color: #81b5a1; background-color: #ffffff; height: 20px; padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; } .SOKMKBArticle .sphr td { border-right: 1px solid; border-bottom: 1px solid; border-color: #81b5a1; background-color: rgb(245, 245, 245); padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; height: 20px; } .SOKMKBArticle .sh td { border-bottom: 1px solid; border-right: 1px solid; border-color: #81b5a1; background-color: #81b5a1; color: #ffffff; height: 20px; padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; } .SOKMKBArticle th { padding-top: .5em; padding-bottom: .5em; padding-left: .5em; padding-right: .5em; border-bottom: 1px solid; border-right: 1px solid; border-color: #81b5a1; background-color: #283d40; font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; font-size: 10pt; color: #ffffff; height: 20px; } .SOKMKBArticle td { border-color: #81b5a1; margin: 5px 5px 5px 5px; font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; font-size: 10pt; color: #283d40; } .SOKMKBArticle p { color: #283d40; font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; } .SOKMKBArticle li { color: #283d40; font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; font-size: 10pt; line-height: 1.5; } .SOKMKBArticle pre { font-family: Courier New; } .SOKMKBArticle div { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; } .SOKMKBArticle hr { border-top-width: 1px; border-top-style: solid; border-top-color: #81b5a1; } .SOKMKBArticle a { color: #81b5a1; } .SOKMKBArticle a.two:link { padding: 15px 45px 15px 45px; margin-top: 20px; color: #ffffff; text-align: center; background-color: #1F8476; border: 1px solid; border-color: #1F8476; } .SOKMKBArticle a.two:visited { padding: 15px 45px 15px 45px; margin-top: 20px; color: #ffffff; text-align: center; background-color: #1F8476; border: 1px solid; border-color: #1F8476; } .SOKMKBArticle a.two:hover { color: #ffffff; background-color: #259b8a; } .SOKMKBArticle .button { padding: 15px 45px 15px 45px; margin-top: 20px; color: #ffffff; text-align: center; background-color: #1F8476; border: 1px solid; border-color: #1F8476; } .SOKMKBArticle .title { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #81b5a1; font-size: 30pt; } .SOKMKBArticle .hd1 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-size: 20pt; border-bottom: 1px solid; border-bottom-color: #81b5a1; text-decoration: none; } .SOKMKBArticle h1 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-size: 20pt; font-weight: normal; border-bottom: 1px solid; border-bottom-color: #81b5a1; text-decoration: none; } .SOKMKBArticle .hd2 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #68a1af; font-weight: bold; font-size: 16pt; text-decoration: none; } .SOKMKBArticle h2 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #68a1af; font-weight: bold; font-size: 16pt; font-weight: normal; text-decoration: none; } .SOKMKBArticle .hd3 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 14pt; text-decoration: none; } .SOKMKBArticle h3 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 14pt; text-decoration: none; } .SOKMKBArticle .hd4 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 12pt; text-decoration: none; } .SOKMKBArticle h4 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 12pt; text-decoration: none; } .SOKMKBArticle .hd5 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: bold; font-size: 10pt; text-decoration: bold; } .SOKMKBArticle h5 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: bold; font-size: 10pt; text-decoration: bold; } .SOKMKBArticle .hd6 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 10pt; text-decoration: underline; } .SOKMKBArticle h6 { font-family: Century Gothic, Verdana, Helvetica, Arial, sans-serif; color: #283d40; font-weight: normal; font-size: 10pt; text-decoration: underline; } .SOKMKBArticle details { font-size: 10pt; } .SOKMKBArticle details[open] summary ~ * { animation: sweep .5s; margin-top: 0; padding-top: 10px; } @keyframes sweep { 0% {opacity: 0; margin-top: -10px} 100% {opacity: 1; margin-top: 0px} } .SOKMKBArticle summary { cursor: pointer; outline: none; margin-bottom: 3px; } .SOKMKBArticle .summary { background-color: #81b5a1; font-size: 10px; color: white; cursor: pointer; padding: 5px; width: 100%; border: none; text-align: left; outline: none; vertical-align: top; } --> Troubleshoot and debug AI Search issues. This article provides steps to enable debug logging, use the Search Preview UI, run test scripts, and resolve common AI Search problems. Enable debug logging To enable AI Search debug logs: Go to System Diagnostics > Debug AI Search. Debug messages display in the system logs. View AI Search logs Go to AI Search > All or AI Search > Ingestion Warnings & Errors. For more information, see AI Search logging and debugging. Use the Search Preview UI Install the Advanced AI Search Management Tools application.Go to AI Search > Preview > Search Preview.Select the search profile from the dropdown.Enter a search term and select Search. Check localhost logs Review the localhost logs for additional debugging information. Test search queries for NLU models To test a search query for an NLU model, run the following script in System Definition > Scripts - Background: //Enter the solution name you are testing in the line #1 like ml_x_snc_sn_km_mr_global_ais_gra_b8bc699a67621010b3d782f45685efa5var geniusSearchSolutionName = 'enter the solution name'; var searchQuery = new sn_ml.GeniusSearchQuery("abraham lincoln");var searchContext = new sn_ml.GeniusSearchContext({"session" : ""});var geniusSearchSolution = sn_ml.GeniusSearchSolutionStore.get(geniusSearchSolutionName)geniusSearchSolution = sn_ml.GeniusSearchSolutionStore.get(geniusSearchSolutionName);var result = geniusSearchSolution.search(searchQuery, searchContext, {});gs.print(JSON.stringify(JSON.parse(result), false, 4)); Replace enter the solution name with your solution name (for example, ml_x_snc_sn_km_mr_global_ais_gra_b8bc699a67621010b3d782f45685efa5). Debug search results with a search profile Use the following script to debug search results or narrow down search issues. Important: The AISASearchUtil API is unsupported and should only be used for debugging purposes. Run the script in System Definition > Scripts - Background: //Make changes to the searchParams based on your requirements.//Just need to change searchContextConfigId and searchTerm to get started.searchParams = { searchContextConfigId: '00731b9d5b231010d9a5ce1a8581c7dd', //sys_id of the Search Application configuration[sys_search_context_config] record that you want to use for searching. searchTerm: '***', // The search term *** returns all records that have been indexed. paginationToken: '', // Leaving paginationToken empty returns the data for the first page. To get the paginationToken for 2nd page, click the next page button on the portal after doing the search and check the URL for paginationToken. disableSpellCheck: false, facetFilters: [], searchFilters: [], requestedFields: {}, rpSysId: 'test' // Just a dummy value that is needed for the script to work.};var aiSearchUtil = new AISASearchUtil();var result = aiSearchUtil.search(searchParams);var searchResult = result.data.search.searchResults;gs.info(searchResult.length);for (var i=0; i<searchResult.length; i++){gs.info(searchResult[i].title + " | " + searchResult[i].text);}gs.info(JSON.stringify(result));//Note: Ensure that search sources have been indexed before trying to search. AI Search does not display results If AI Search does not display search results, check the following: Verify AI Search is enabled Confirm the glide.ais.enabled property is set to true.Go to AI Search > Connection and select Test Connection. If there are connection issues, contact Technical Support. Verify Genius results configuration If Genius results are not returned: Confirm the glide.ais.genius_result.enabled property is set to true.If Genius results do not display when a facet is selected, set glide.ais.genius_result.enabled_with_facet_filter to false.Genius results are supported only for English. For non-English language support, see Internationalization support for AI Search.Verify an EVAM configuration exists for the Genius result type. For example, Peoplefind Genius results require a manual entry in the sys_ux_composite_data_template_predicate_bundle table. See EVAM Configuration. Verify search profile configuration If expected results are not displayed: Verify the correct search profile is linked.Verify the search profile is published. If not, publish it and retest. Verify search source configuration If expected results are not present, check the Search Source filter condition. Records excluded by the filter do not appear in results. Other factors that can exclude records: ACL rulesDomain separationUser criteriaBefore query business rules Verify search results limit If the expected number of results is not displayed, check the search results limit in the Search Application Configuration [sys_search_context_config] record. Other AI Search issues Edge encryption not supported Edge encryption and encryption support are not supported for AI Search. Event queue issues For event-related issues, check the Event Queue for events starting with "ais_index". Performance issues Identify the content security features applied to search results: Are many user criteria being evaluated?Are many ACLs on the tables being searched? Important: The same dedicated AI Search nodes handle search query traffic from all instances. Search queries on non-production instances may impact search query performance on production instances. AI Search modules missing after clone If AI Search modules are missing after a clone, contact Technical Support. AI Search not available for certain Service Portals AI Search can be enabled for custom portals. For default portals and Store portals, AI Search is enabled by default if available. If it is not available, it cannot be enabled. Tables that cannot be indexed Tables in the zing block list cannot be indexed, with the exception of sc_cat_item and kb_knowledge. Task, CMDB, and other blocked tables cannot be indexed. Note: If a parent table is indexed, all child tables must be manually added and indexed separately. Related links AI SearchAI Search referenceAI Search logging and debuggingSearch Preview UIAdvanced AI search management tools applicationInternationalization support for AI SearchEVAM Configuration