---
sourceDocument: Australia Platform Analytics
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/now-intelligence

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Segments

# Segments in the Query Generation semantic layer {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) 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 Segments in the Query Generation semantic layer

Segments are predefined filter conditions in the Query Generation semantic layer that map business terminology to specific query filters.
They help translate natural language queries into accurate database queries by providing context that assists in selecting the correct entities, dimensions, and values.
For example, segments clarify terms like "open" or "emergency" by linking them to precise filters and classifications.
Show full answer Show less  
There are two segment types:

* **Automated Segments:** System-generated from reports, dashboards, filters, modules, and indicator sources with typically technical names (e.g., "Incidents.Open").
* **Manual Segments:** Created by administrators with user-friendly names (e.g., "Critical Open Incidents") and managed through a configuration table, allowing better control and customization.

## How Segments Work

The system uses AI search to find segments semantically similar to the user's query by indexing their names, descriptions, entities, and filters. The Query Generation engine then passes these segments to the large language model (LLM), which uses them as building blocks to generate precise executable queries.

For example, a query like "Unassigned Incidents located in San Diego" leverages the "Unassigned Incidents" segment filter as a base, adding location criteria on top.

## Manual Segments Specifics

* **Entity Discovery:** Manual segments help identify or boost relevant entities when no prior context exists, improving query understanding.
* **Filter Provision:** Manual segments are included in the LLM prompt with their detailed filters, guiding the model to fully or partially reuse these filters for query construction.
* **Scoring Boost:** Manual segments receive a configurable semantic similarity score boost by default (5%), ensuring domain-specific, admin-defined segments rank higher than automated ones when relevant.

## Automated Segments and Sources

Automated segments are generated on a schedule from sources such as saved reports, analytics data sources, Performance Analytics indicators, saved filters, and application modules. These segments are refreshed by a system job that runs initially at installation and weekly thereafter.

Only active and relevant records are used to create automated segments, based on criteria like recent usage and roles of report creators. There are restrictions on domain-separated instances and configurable recency thresholds for source data validity.

## Configuration and Management

* Segments can be disabled globally or by individual source type via system properties, useful for troubleshooting or reducing noise.
* Manual segments can be created and managed by admins and packaged within applications via plugins, enabling domain-specific saved searches that are available immediately after installation.
* The segment scoring process filters out low-relevance segments and ranks results based on boosted similarity scores to optimize query accuracy.

## Practical Benefits for ServiceNow Customers

* Segments enable the semantic layer to better interpret natural language queries by associating business terms with precise database filters.
* Manual segments give admins direct control to improve search relevance and query accuracy with domain-specific, user-friendly filters.
* Automated segments ensure ongoing, up-to-date coverage of common filters derived from existing reports and analytics sources, reducing manual effort.
* Configurable scoring and disabling options allow fine-tuning of segment behavior to optimize query generation performance and relevance.  
Segments are predefined filter conditions that map business terminology to specific query filters, helping the semantic layer translate natural language questions into accurate database queries.

[Segments](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-segment "A predefined filter condition in the Query Generation semantic layer that maps business terminology to specific query filters. Segments help the system translate natural language questions into accurate database queries. Segments can be automated or manual.") provide non-obvious context to assist the semantic layer in selecting the correct entity, dimension, and values. For example, in the [utterance](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-utterance "A natural language question or input submitted by a user to an AI system. Query Generation processes utterances to identify the correct entities, dimensions, and segments needed to construct an executable query.") "How many open emergency change requests
are there?", a segment identifies that "open" means "active=true" and "emergency" is a Type, not a Priority.{#querygen-segments__semantic-layer-segments-merged-para-1}

When a user asks a question, the Query Generation engine searches for matching segments and includes their filters in the [LLM](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-llm "An AI model trained on large volumes of text data to understand and generate natural language. Query Generation uses an LLM to interpret user questions and produce semantic queries.") prompt so the model can reuse them to construct accurate queries.{#querygen-segments__manual-segments-overview}

There are two types of segments:{#querygen-segments__segment-types}

Automated Segments
:   System-generated from reports, dashboards, filters, modules, and indicator sources. Names are often technical---for example, "Incidents.Open".

Manual Segments
:   Created by admins via the Manual Segment Config table. Names are user-friendly--- for example, "Critical Open Incidents". Manual segments use a two-table data model with automatic synchronization and can be shipped with applications via plugins.
{#querygen-segments__segment-type-list} {#querygen-segments__manual-vs-automated-comparison__entry__3}

|   | Manual Segments | Automated Segments |
|-|-|-|
| Created by | Admin, shipped via update set | System-generated from reports, dashboards, filters, modules |
| Name quality | User-friendly, tuned for search | Often technical---for example, "Incidents.Open" |
| Search priority | 5% boost over automated (adjustable insn_query_gen.segments.manual_segment_scale_factor) | Standard scoring |
| LLM treatment | Retain all filters unless irrelevant | Critique each filter individually |
| Prompt label | `user_defined_segment` | `automated_segment` |
| Lifecycle | Fully controlled by admin | Tied to source record activity/usage |
| Shipped with app | Yes (update set) | No (generated at runtime) |
[Table 1. Comparison: Manual vs automated segments]

{#querygen-segments__manual-vs-automated-comparison}

## How segments work {#querygen-segments__how-segments-work}

The system uses AI search to find segments that are semantically similar to the user's query. AI search indexes the Name, Description, Entity, and Filter fields in the Segments table, comparing
them to the user's query to produce a subset of relevant segments.{#querygen-segments__semantic-layer-segments-merged-para-2}

In the LLM call, the system passes the Name, Description, Entity, and Filters. The LLM uses the segments as building blocks for generating a new query. For example, if a user asks "Unassigned
Incidents located in San Diego" and the segment "Unassigned Incidents" is passed to the LLM, the LLM uses the segment's filter as the starting point and attaches the location filter "San Diego" on top of the segment.{#querygen-segments__semantic-layer-segments-merged-para-3}
{#querygen-segments__segment-process-table__entry__3}

| Step | Purpose | Output |
|-|-|-|
| 1: Input | Capture user's natural language query | Raw query text |
| 2: Search | Find semantically similar prebuilt segments | Subset of relevant segments |
| 3: Scoring | Rank the set of relevant segments based on their semantic similarity scores | The subset of relevant segments, now ranked and sorted |
| 4: Context | Provide segment metadata to LLM | Structured segment data |
| 5: Generate | Combine segment logic with new conditions | Complete executable query |
[Table 2. Segment process summary]

{#querygen-segments__segment-process-table}

## How manual segments work {#querygen-segments__section_xbb_rlc_y3c}

Manual segments serve two roles at query time:{#querygen-segments__manual-segments-intro}

Entity discovery
:   On first-time queries with no previous context, segment matches can add or boost entities in the entity list. A match against a manual segment name helps identify the intended entity by adding or boosting it in the candidate list.
    If a user asks "Show me critical open incidents" and a manual segment named "Critical Open Incidents" exists on the Incident \[incident\] table, the `incident` entity gets boosted in the results.

Filter provision
:   Matching segments are formatted into the LLM prompt context. The LLM sees:

        **Related Segments**:
        - **Critical Open Incidents** (user_defined_segment)
          - description : High priority incidents that are open and unresolved
          - entity : incident
          - filter : { conditions : [{"field":"incident.priority","operator":"=","value":"1"}, ...] }

    {#querygen-segments__llm-prompt-example} The LLM then decides whether to reuse the segment's filters fully or partially when constructing the query. Manual segments are
    labeled `user_defined_segment` in the prompt, which tells the LLM to retain all filters unless completely irrelevant.
{#querygen-segments__manual-segment-roles}

## Manual segment scoring boost {#querygen-segments__section_shf_l4c_y3c}

Manual segments receive a priority boost. When the engine searches for relevant segments, it scores each result by semantic similarity---how closely the segment's name and description match the user's question. By
default, manual segments receive a 5% boost applied on top of their raw similarity score.{#querygen-segments__priority-boost-para}

The boost factor is configurable via the system property sn_query_gen.segments.manual_segment_scale_factor. Increasing it, for example to `1.10`, elevates manual segments more
strongly. Setting it to `1.0` removes the boost entirely.{#querygen-segments__boost-configuration}

In practice, automated segments often have names that partially match user utterances. For example, a report called "Open Incidents" may score similarly to a manual segment called "Critical Open Incidents". The
boost ensures that your handmade, domain-tuned segments surface ahead of system-generated ones when both are close matches.{#querygen-segments__boost-importance}

## How segment scoring works {#querygen-segments__section_vp5_xlc_y3c}

1. AI Search returns a raw semantic similarity score (0.0--1.0) for each candidate segment.
2. Segments below the match threshold (default `0.70`) are discarded.
3. Manual segment scores are multiplied by the scale factor (default `1.05`).
4. Results are sorted by boosted score and capped at the result limit.
{#querygen-segments__scoring-steps}

## Automatic segment sources {#querygen-segments__automatic-segments}

The system auto-generates segments from existing data sources on a schedule. The Query Generation Sync Segments job creates segments automatically, running at installation and then weekly by default.{#querygen-segments__semantic-layer-segments-merged-para-4}
{#querygen-segments__segment-sources-table__entry__2}

| Source | What it pulls |
|-|-|
| Saved Reports (sys_report) | Report filters from recently viewed reports |
| Report Sources (sys_report_source) | Analytics data source filters |
| PA Indicators (pa_cubes) | Performance Analytics indicator conditions |
| Saved Filters (sys_filter) | Global saved filters only (excludes user-specific and group-specific filters) |
| App Modules (sys_app_module) | Module-level list view filters |
[Table 3. Automatic segment sources]

{#querygen-segments__segment-sources-table}

## Automated segment rules {#querygen-segments__section_jjz_xq3_s3c}

To reduce noise from outdated and irrelevant segments, the job follows specific rules. Segments based on reports, report sources, or indicator sources are active only if the records meet
certain criteria:{#querygen-segments__semantic-layer-segments-merged-para-5}

* Reports must be shared, created by a user with an analytics manager role (admin, dashboard_admin, report_admin, pa_admin, or viz_admin), and have run recently (within 180 days by default).
* Report sources must be included in a data visualization or used in a report that has run recently.
* Indicator sources must be linked to indicators with scores that have recently changed.

{#querygen-segments__segment-criteria-list}  
Important:  
Segments cannot be created from indicator sources or modules on domain-separated instances.

For reports, "run recently" is defined by the sn_query_gen.segments.reports.last_viewed_threshold_days system property. The default value is 180 days.{#querygen-segments__semantic-layer-segments-merged-para-11}

For indicator sources, the time span for "recently changed" depends on the indicator frequency:{#querygen-segments__semantic-layer-segments-merged-para-12}

* Daily: last 7 days
* Weekly: last 30 days
* Bi-weekly: last 30 days
* Monthly: last 90 days
* Four weeks: last 90 days
* Bi-monthly: last 90 days
* Quarterly: last 180 days
* Fiscal quarterly: last 180 days
* Six months: last 12 months
* Yearly: last 24 months
* Fiscal yearly: last 24 months

{#querygen-segments__indicator-timing-list}

You can change the time spans for indicator sources by applying a multiplier using the sn_query_gen.segments.indicator.inactivity_threshold_multiplier system property. The
value must be an integer, meaning you can only lengthen the periods, not shorten them.{#querygen-segments__semantic-layer-segments-merged-para-13}

## Disabling segment sources {#querygen-segments__section_pk5_4q3_s3c}

You can disable segment creation altogether, or for individual source types. You might disable segment generation to troubleshoot, or if segments from a source are "noisy." Each source type has
a corresponding sn_query_gen.segments.disable.\* system property. Disable segments for that source by setting the corresponding system property to true. All existing segments created from
sources of that type are excluded from AI Data Explorer search results. No new segments of that type are created. During the next Sync Segments job, all segments of that type are deactivated. For more information, see [Query Generation properties](https://www.servicenow.com/docs/zkRx3uAT0Sa4Zf7lTp4Gww "The properties included with Query Generation apply to segments. They define whether the record or indicator that is the basis for a segment has been recently used or changed.").{#querygen-segments__semantic-layer-segments-merged-para-6}
* **[Guidelines for segments](https://www.servicenow.com/docs/DW44GxCqzayzCfuz4rPtCA)**   
  Follow these suggestions to help you use segments in the semantic layer effectively.
* **[Create a manual segment](https://www.servicenow.com/docs/aPVzsc7wyGsf2jz7ThwDlA)**   
  Manual segments are admin-created saved searches with friendly names that bridge natural language questions and database filters for the Query Generation semantic layer.
* **[Manual segment data model and sync behavior](https://www.servicenow.com/docs/wi4RahSzmKRMDbOZszvYLA)**   
  Manual segments use a two-table data model with automatic synchronization between the configuration table and the runtime table used for search operations.
* **[Shipping manual segments via plugins](https://www.servicenow.com/docs/LVUOH6Um2VqZu_SlsoWs6w)**   
  Business unit application developers can ship manual segments with their applications to provide domain-specific saved searches that work from the moment the app is installed.

**Related concepts**   

* [Manual segment data model and sync behavior](https://www.servicenow.com/docs/wi4RahSzmKRMDbOZszvYLA "Manual segments use a two-table data model with automatic synchronization between the configuration table and the runtime table used for search operations.")
* [Shipping manual segments via plugins](https://www.servicenow.com/docs/LVUOH6Um2VqZu_SlsoWs6w "Business unit application developers can ship manual segments with their applications to provide domain-specific saved searches that work from the moment the app is installed.")
* [Guidelines for segments](https://www.servicenow.com/docs/DW44GxCqzayzCfuz4rPtCA "Follow these suggestions to help you use segments in the semantic layer effectively.")  
**Related tasks**   

* [Create a manual segment](https://www.servicenow.com/docs/aPVzsc7wyGsf2jz7ThwDlA "Manual segments are admin-created saved searches with friendly names that bridge natural language questions and database filters for the Query Generation semantic layer.")  
**Related reference**   

* [Roles, tables, and scheduled jobs included with Query Generation](https://www.servicenow.com/docs/aK39momxE_OECDBz6aOoiA "Several types of components are installed with Query Generation, including tables and scheduled jobs.")
* [Query Generation properties](https://www.servicenow.com/docs/zkRx3uAT0Sa4Zf7lTp4Gww "The properties included with Query Generation apply to segments. They define whether the record or indicator that is the basis for a segment has been recently used or changed.")

