Roles, tables, and scheduled jobs included with Query Generation

  • Release version: Australia
  • Updated March 12, 2026
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Roles, tables, and scheduled jobs included with Query Generation

    Query Generation in the Australia release provides a suite of roles, tables, and scheduled jobs essential for enabling and managing semantic query capabilities within ServiceNow. These components facilitate generating semantic layers, managing segments, and optimizing query responses using AI-powered search enhancements.

    Show full answer Show less

    Roles

    • snquerygen.user: Grants permission to call the Query Generation service from integrated applications. This role is typically included in applications that utilize Query Generation.
    • snquerygen.admin: Provides administrative access to Query Generation tables, the Health Page, and enables customization of semantic metadata and manual segment creation.
    • Additional related roles include snnowassistadmin.nsa.admin and aisadmin, which encompass broader administrative capabilities along with snquerygen.user permissions.

    Scheduled Jobs

    • Generate Semantic Layer: Creates entities, dimensions, and segments; cleans unused segments and related records. Runs initially on installation and subsequently on demand.
    • [Query Generation] Sync Segments Job: Synchronizes segments from various sources including reports and indicator sources; cleans up unused or ineligible segments. Runs initially and then weekly on Sundays.
    • [Query Generation] Semantic Entity Auto-Scaling Job: Synchronizes entity activation states to aid semantic scaling. Runs initially and then daily at 20:23.

    Tables

    Access to all Query Generation tables requires the admin role. These tables are accessible under the Query Generation section in the ServiceNow Navigator.

    • Entity [snquerygenentity]: Read-only records representing tables enabled for semantic generation, tied to Semantic Table Configuration. One record per supported table.
    • Dimension [snquerygendimension]: Read-only records representing queryable columns for each Entity table.
    • Segments [snquerygensegment]: Editable reusable definitions that provide contextual meaning to queries, helping the semantic layer or LLM interpret terms (e.g., mapping "open" to "active=true").
    • Manual Segment Configs [snquerygensegmenttableconfig]: Stores manually created segments, synchronized with the Segments table by the Sync Segments job.
    • Utterance Bank [snquerygenutterancebank]: Predefined sentences and phrases mapped to database contexts to assist in query interpretation. Admins can manage these entries.
    • AI Search Search Profile [aissearchprofile]: Configuration container for search experiences, linking search profiles to search boxes and applications. Supports creation, cloning, and publishing by admins.
    • AI Search Indexed Sources [aisdatasource]: Records defining searchable content sources including instance and external tables. Editable by users with snquerygen.admin or higher roles to resolve indexing issues.
    • Logs [snquerygenlog]: Records all Query Generation calls for monitoring and troubleshooting.
    • Semantic Table Configurations [snquerygentableconfig]: Lists tables available for semantic search and configuration status, allowing admins to manage semantic enablement and child table inclusion.
    • Semantic Column Configurations [snquerygencolumnconfig]: Manages domain, active status, and custom semantic descriptions for table columns, linked to semantic table configurations.

    Practical Implications for ServiceNow Customers

    These components empower ServiceNow administrators and developers to configure and optimize semantic query generation, enhancing user search and reporting capabilities through AI-driven context understanding. Admin roles enable control over metadata customization, segment management, and search profile tuning to tailor queries precisely to organizational needs. Scheduled jobs automate maintenance and synchronization, ensuring semantic data remains current and scalable.

    Several types of components are installed with Query Generation, including tables and scheduled jobs.

    Roles included

    Role name Description Contains roles

    sn_query_gen.user

    Allows the person with the role to call the Query Generation service through the app they are using.

    None, but applications that call Query Generation should contain this role in their own user roles.

    sn_query_gen.admin

    Allows the user to access the Query Generation tables like an admin user. Can access the Health Page. Can customize semantic metadata and create manual segments.

    • sn_nowassist_admin.nsa.admin
    • ais_admin
    • sn_query_gen.user

    Scheduled jobs installed

    Scheduled job Description

    Default frequency

    Generate Semantic Layer

    Generates entities, dimensions, and segments. Cleans up unused segments and Entity and Source records. Segment generation works like the Sync Segments job.Runs when Query Generation is first installed and then on demand.

    When first installed, then on demand

    [Query Generation] Sync Segments Job Generates segments from report sources, reports, indicator sources, modules, and filters. Synchronizes manual segments with segment table. Cleans up unused segments. Cleans up segments based on unused or otherwise ineligible reports, report sources, and indicator sources.

    When first installed, then weekly, on Sundays

    [Query Generation] Semantic Entity Auto-Scaling Job

    Synchronizes entity activation states and helps with semantic entity scaling.

    When first installed, then daily, at 20:23:00

    Tables installed

    All tables require the admin role for access and are available under Query Generation in the Navigator.

    Table Description

    Entity

    [sn_query_gen_entity]

    Representations of the tables that have semantic generation enabled for them (explicitly or through their parent tables) on the Semantic Table Configuration [sn_query_gen_table_config] table. Each Entity record corresponds to one supported table. Entity records are generated automatically, and this table is read-only.

    Dimension

    [sn_query_gen_dimension]

    Representation of queryable columns for every table that an Entity record references. Each record corresponds to one column. Dimension records are generated automatically, and this table is read-only.
    Segments

    [sn_query_gen_segment]

    Reusable definitions that provide non-obvious context, to assist the semantic layer or LLM to select the correct entity, dimension, and values. For example, in the utterance "How many open emergency change requests are there?", a segment identifies that "open" means "active=true" and "emergency" is a Type, not a Priority. Admins can add new segments, delete existing segments, or edit segment names and descriptions.
    Manual Segment Configs

    [sn_query_gen_segment_table_config]

    Manually created segments. The [Query Generation] Sync Segments job syncs this table up to the Segments table.
    Utterance bank

    [sn_query_gen_utterance_bank]

    Predefined sentences and phrases mapped to database contexts and queries. User questions are compared to the utterance bank to see if a predefined mapping can apply. Admins can create, edit, and delete utterance banks.
    AI Search Search Profile

    [ais_search_profile]

    A container for all search experience configurations. A search profile is mapped to a specific experience you would like to expose in your app. Search Profile is  linked to a search box and can be used across applications. Admins can create, clone, and publish search profiles.
    AI Search Indexed Sources

    [ais_datasource]

    Records on this table reflect what content users can search on. The content can be tables on the instance or external tables. You have the necessary indexed sources by default. The sn_query_gen.admin role or higher is necessary to edit this table. The most likely use case is if the system cannot find the correct table and not all the indexed queries are fully applied. For more information, see Common AI Data Explorer issues and fixes.
    Logs

    [sn_query_gen_log]

    A log of every call to Query Generation. For more information, see Query Generation logs.
    Semantic table configurations

    [sn_query_gen_table_config]

    List of tables that Query Generation can search, whether semantic generation is enabled for that table, and whether child tables are included. Admins can create, edit, and delete these records. For more information, see Add a table to the semantic data layer.
    Semantic column configurations

    [sn_query_gen_column_config]

    Records for setting the domain, active status, and custom semantic descriptions and usage instructions for table columns. Must reference a table in sn_query_gen_table_config. For more information, see Customize column descriptions and usage instructions.