---
sourceDocument: Brazil Platform Analytics
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/now-intelligence

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Tuning the semantic layer

# Tuning the semantic layer {#ariaid-title1}

Release version: Brazil  
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® maps natural language questions to tables and fields, enabling accurate data queries in AI Data Explorer.
Tuning this layer helps improve how well the system matches user questions to the correct tables (entities), fields (dimensions), and filters (segments), ensuring more precise and relevant query results tailored to your organization's specific terminology and data structure.
Show full answer Show less  

## How the semantic layer works

* **Entities:** Represent tables such as Incident, Change Request, or CMDB Class Information.
* **Dimensions:** Represent fields within those tables (e.g., Priority, Assigned to). They can also traverse reference fields across tables.
* **Segments:** Predefined filter conditions (e.g., "Open incidents" as active=true) that help translate natural language filters.

The semantic layer uses these components to identify the best matches for a user's question, which then guides query generation.

## When to tune the semantic layer

Only tune after confirming issues are consistent and reproducible. Tune in cases such as:

* The system selects incorrect or no tables, especially with reference fields or multi-table queries.
* Fields are missing or incorrectly matched.
* Your organization uses terminology different from auto-generated labels.
* Queries are constructed incorrectly despite correct table or field selection.
* Specialized organizational terminology is not properly translated into filters.

## Validation and tuning process

* Communicate with users to understand their question (utterance), expected results, and differences from actual results.
* Use Query Generation logs to find matching queries and analyze errors.
* Check access control (ACL) to ensure users have permission to view intended data.
* Classify the problem as related to entities, dimensions, segments, or ACL, then apply targeted tuning changes.
* Retest and verify improvements through logs; repeat if necessary.

## Additional tools and customization

* **Query Generation Health page:** Monitor the health and configuration of the Now LLM, AI Search, and related Query Generation components.
* **Customizing semantic metadata:** Modify descriptions, labels, and usage instructions to align query interpretation with your organization's terminology.
* **Database views:** Add views that combine multiple tables to enable queries spanning cross-table data in a single request.
* **Segments:** Use predefined filter segments to translate business language filters into accurate query conditions.

By tuning and customizing the semantic layer, ServiceNow customers can enhance AI Data Explorer's accuracy and relevance, ensuring users receive precise information aligned with organizational data and terminology.  
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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/IdnWqSqSuznwHmUlqWEvYg#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://servicenow-prod.fluidtopics.net/Ym4uQ0MkOpeh2IzdG_uWWA "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://servicenow-prod.fluidtopics.net/OSIvck0g675MxcYZ9GHeUQ "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://servicenow-prod.fluidtopics.net/RwE7aFrVCnbmqSYs~MEJlA)**   
  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://servicenow-prod.fluidtopics.net/ljK5GP6kqKFjnMx6ZWDiig)**   
  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://servicenow-prod.fluidtopics.net/HI0niNp6IQwYLNLzLokYeA)**   
  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://servicenow-prod.fluidtopics.net/NOC1a9gHlH7q9p__xcmuLQ)**   
  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


