---
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


---

# Tuning the semantic layer

# Tuning the semantic layer {#ariaid-title1}

Release version: Australia  
Updated March 25, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 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 Tuning the semantic layer

The semantic layer in ServiceNow AI Platform® translates natural language questions into queries by mapping them to specific tables, fields, and filters.
Proper tuning of the semantic layer enhances the accuracy of AI Data Explorer by aligning it with your organization's unique terminology and data structures, ensuring users receive precise and relevant query results.
Show full answer Show less  

## How the Semantic Layer Works

* **Entities:** Represent database tables like Incident or Change Request.
* **Dimensions:** Represent fields within those tables, including fields accessed via references (e.g., caller's department).
* **Segments:** Predefined filter conditions that reflect business terminology (e.g., "Open incidents").

When a user submits a question, the semantic layer identifies the best matching entities, dimensions, and segments, and passes this context to the query generation process.

## When and Why to Tune the Semantic Layer

Tuning is necessary when the semantic layer consistently misinterprets queries, such as:

* Selecting incorrect or missing tables, especially when queries involve referenced tables or multiple tables not included in the semantic layer.
* Omitting or mislabeling fields, or when organizational terminology differs from default labels.
* Incorrect query construction despite correct entity and field selection.
* Failure to accurately translate specialized organizational terms into filters.

Before tuning, confirm issues are reproducible by testing repeated or similar questions.

## Validation and Tuning Process

* Engage users to understand their query intent, expected results, and discrepancies with actual responses.
* Use Query Generation logs to review the specific query, response, and any errors linked to the user's input.
* Check access control (ACL) permissions to ensure users have the necessary read access to tables and fields.
* Classify issues as related to entities, dimensions, segments, or ACLs and apply targeted tuning changes accordingly.
* Retest queries and verify improvements via logs, iterating only if needed.

## Supporting Tools and Customization

* **Query Generation Health Page:** Monitor the status of the LLM, AI Search, system properties, enabled products, and dependencies.
* **Semantic Metadata Customization:** Modify descriptions, labels, and usage instructions to better reflect your organization's terminology and improve natural language interpretation.
* **Database Views:** Incorporate database views that aggregate fields from multiple tables into a single semantic entity, enabling cross-table queries with one question.
* **Segments:** Utilize predefined filters that map business language to database query conditions, enhancing filter accuracy in question interpretation.  
The semantic layer maps natural language questions to ServiceNow AI Platform® tables and fields. Tune the semantic layer to improve AI Data Explorer accuracy for your organization's terminology and data structure.

The [semantic layer](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-semantic-layer "A flat representation of database tables and columns used by Query Generation to identify the correct data sources when processing a natural language question. The semantic layer consists of entities (tables), dimensions (columns), and segments (filter conditions).") identifies the best matching [entities](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-entity "A semantic layer record that represents a database table. Query Generation uses entities to identify the correct facts table when processing a natural language question.") (tables), [dimensions](https://www.servicenow.com/docs/4q6x4QEhbrGjzdIOBwTbMw#gloss-dimension "A semantic layer record that represents a column on a database table. Dimensions can follow reference fields across tables. Query Generation uses dimensions to identify the correct fields when processing a natural language question.") (fields), and [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.") (filters) when users ask questions in AI Data Explorer. Tuning improves these matches so users consistently get the right table, field, and filter.{#semantic-layer-tuning-overview__semantic-layer-tuning-overview-para-1}

## How the semantic layer works

When a user asks a question, the system identifies the best matching components and passes that context into query generation. The semantic layer has three building blocks:{#semantic-layer-tuning-overview__semantic-layer-tuning-overview-para-2}

Entities
:   Represent tables such as Incident \[incident\], Change Request \[change_request\], or CMDB Class Information \[cmdb_class_info\].

Dimensions
:   Represent fields on those tables such as Priority, Assigned to, or State. Dimensions can follow reference fields across tables. For example, caller_id.department traverses from an incident's caller to their department.

Segments
:   Pre-defined filter conditions such as "Open incidents" = active=true.

## When to tune the semantic layer

Before you tune, verify that the issue is repeatable. 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.") occasionally makes incorrect decisions. Try the same question or a similar one multiple times first. Only tune if the problem is consistent.{#semantic-layer-tuning-overview__semantic-layer-tuning-overview-para-3}

Tune the semantic layer when:{#semantic-layer-tuning-overview__semantic-layer-tuning-overview-para-4}

* The system selects the wrong table or cannot find one. For example, the system could be processing queries on reference fields, and the referenced tables are missing from the semantic layer. For another example, the query could span more than one table, but not all the tables are included in the semantic layer.
* A field is missing or the wrong field is selected.
* Your organization uses different terminology than the auto-generated labels.
* The right table or field is selected, but the query is constructed incorrectly.
* Special terminology of your organization is not translated accurately to filter conditions.

## Validation and iteration process

1. Through communication with the user who is reporting an issue, find out what their query ([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.")) is, what sort of response they expected, and how the actual response differed from their expectations.
2. Open Query GenerationLogs and find the log that matches the user name, utterance, and date submitted. Capture the response and any error message. See [Query Generation logs](https://www.servicenow.com/docs/L3WBnv87fPS8yQlUBhj0Uw "Every call to a Query Generator and its results are logged in the Query Generation Log [sn_query_gen_log] table.").
3. If results are wrong for only some users, verify read ACL access to the intended table and fields before retuning. Also see [Enabling access to protected scope applications for AI Data Explorer and Query Generation](https://www.servicenow.com/docs/KX8pB2qZXRSxQV9Oi~mx8g "AI Data Explorer and Query Generation require additional security configuration to access tables in protected scopes such as Human Resources or Employee Profile scopes.").
4. Classify the failure as entity, dimension, segment, or ACL.
5. Apply one targeted tuning change.
6. Retest the same utterance.
7. Check Query GenerationLogs and confirm the improved match path.
8. Repeat only if still incorrect.
* **[Query Generation Health page](https://www.servicenow.com/docs/oyW7zLXpEP5ef5YiPhWQTA)**   
  The health page shows the state of the Now LLM and AI Search, along with the states of Query Generation system properties, enabled products, and dependency plugins.
* **[Customizing semantic metadata](https://www.servicenow.com/docs/O3Y7Uu3hCjMaE72_ztLaFA)**   
  Semantic metadata --- descriptions, labels, and usage instructions --- control how Query Generation interprets natural language questions. Customize these metadata to improve accuracy for your organization's terminology and data.
* **[Database views for cross-table data](https://www.servicenow.com/docs/SJW3BkhCAHtS5_zlrIaUUQ)**   
  Database views combine fields from multiple tables into a single queryable entity. Add views to the semantic layer to answer cross-table questions in one query instead of requiring separate questions.
* **[Segments in the Query Generation semantic layer](https://www.servicenow.com/docs/6VRzFwC7xzGFmHfFjjwedg)**   
  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.

*[\>]: and then


