Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Query Generation logs

Every call to a Query Generator and its results are logged in the Query Generation Log [sn_query_gen_log] table.

Using the logs

Go to Query Generation > Administration > Logs to inspect failed or incorrect queries.

  1. Find the entry by user, date, or utterance.
  2. Check Semantic Entities/Dimensions/Segments Count
  3. Open Query Constitutor Output to see what was selected.
  4. Compare with Semantic Filter Result for raw semantic matches.
SymptomLikely causeFix
"Unable to understand" responseSystem cannot find a matching tableImprove entity description; rephrase with table name; verify AI search is running; verify that all Indexed Sources are fully processed.
Wrong table selectedSimilar table names, no disambiguationAdd semantic usage instructions to differentiate.
Wrong table selected (permissions)User lacks read access to the intended table or fields.Verify and grant table and field read ACLs for the intended data.
"Error accessing table data" or "Scope access not granted" responseSome data is in protected application scopes that AI Data Explorer cannot access.Create ACLs granting access to the scope for AI Data Explorer. Approve the subsequently generated Restricted Caller Access (RCA) records. For more information, see Enabling access to protected scope applications for AI Data Explorer and Query Generation.
Missing field in resultsDimension turned off, unclear label, or field not in semantic layerCheck dimension is active; update label.
Related fields not pulled inReferenced table missing from semantic layer or reference dimension turned offAdd and enable the referenced table entity; enable the reference dimension.
Wrong filter appliedBad segment matchFix segment name and description; disable the segment.
No filter when expectedNo matching segment; phrasing too vagueCreate a manual segment; rephrase question.
Segment from report is wrongAuto-generated segment has stale or irrelevant filterDisable the report segment source or the specific segment.
ColumnDescriptionShown by default?
CreatedTimestamp of the call to Query GenerationYes
UserThe user from the User [sys_user] table who made the call. If this is blank, try Created by.Yes
UtteranceThe plain language question asked by the userYes
StatusThe success or otherwise of the callYes
Error messageIf the status is "error," this is the error message that is returned to the user.Yes
Total timeTime in milliseconds it took for the AI to process the query and return the responseYes
"X" timeTime in milliseconds each component X spent processing the queryYes
Semantic Filter ResultsFields in the semantic layer tables that the query references, in JSONYes
Utterance Bank ResultsQuestions similar to the user's question (Utterance) that were found in the Utterance Bank and used to interpret the user's question, in JSONYes
ResponseThe JSON response to the queryYes
EntitiesThe records in the Entities table that are referenced by the query. Each record corresponds to a facts table.Yes
Query Constitutor OutputJSON of the query that is generatedYes
SourceThe application from which the question was asked. If the question was asked from the Now Assist panel when it was open in a page that is not part of an application, the UUID of that page is shown instead.Yes
ResponseThe response that the LLM returnsYes
Generative AI LogThe LLM used for the queryYes
ConversationUnique chat conversation ID, such as in a Now Assist Panel to Query Generation conversationYes
ACL TimeTime it took to validate the Access or Security of the user for the underlying tableNo
Additional infoStart time, total calls, and other metadata about the AI Search runNo
Created byPerson who created the query. Includes ServiceNow® staff members logged on as maint.No
DomainDomain in which the query was createdNo
Dot walkedWhether the query included dot walking between tables (true/false)No
Entity has usage scoreWhether the entity has a usage score (true/false)No
Entity sourceWhether the Source was in ENTITIES, USER SENSE, or SEGMENTSNo
Error codeThe error code, if there was an errorNo
Follow Up GeneratedThe number of follow-up questions that the LLM generated in response to the queryNo
Follow Up ReturnedHow many of the generated follow-up questions are actually returned. The questions must refer to tables that the querying user can access and are in the semantic layer, for example.No
LLM TimeTime spent by the large language model (LLM) on the queryNo
Query Constructor TimeTime spent by the query constructor on the queryNo
RAG timeTime spent by the retrieval-augmented generation (RAG) on the queryNo
Semantic Dimensions countNumber of table records (dimensions) examined for the queryNo
Semantic Entities CountNumber of tables (entities) examined for the queryNo
Semantic Filter ResultsResults of running the semantic filterNo
Semantic Filter TimeTime spent by the semantic filterNo
Semantic Segments CountNumber of segments examined for the queryNo
Source TableName of table corresponding to Source IdNo
TagsAny tags that you add to the logNo
UpdatedDate stamp when log entry was last updatedNo
Updated byUser responsible for last log entry updateNo
UpdatesCount of updates to the log entryNo
Utterance bank resultsSimilar examples extracted from utterance bankNo
Utterance bank timeAmount of time spent searching the utterance bankNo

Parent Topic:Query Generation reference

Related topics

Common AI Data Explorer issues and fixes