---
sourceDocument: Brazil Enable AI
sourceDocumentLink: https://www.servicenow.com/docs/r/intelligent-experiences

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Improving Natural Language Queries with Tag configuration

# Improving Natural Language Queries with Tag configuration {#ariaid-title1}

Release version: Brazil  
Updated September 10, 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 Improving Natural Language Queries with Tag configuration

This content explains how to enhance natural language query accuracy in ServiceNow by using AI instructions within the knowledge graph.
AI instructions guide how the system interprets user queries, ensuring responses align closely with business context and user expectations.
These instructions operate at three levels: node (entity/table), property (column), and edge (relationship).
Show full answer Show less  

## Key Features

* **AI Instructions:** Declarative guidance that helps the knowledge graph interpret queries correctly by specifying traversal paths, prioritizing columns or tables, and filtering results based on business logic.
* **Always Include Flag:** A setting to enforce critical business filters unconditionally, such as always excluding certain asset statuses unless explicitly requested. This flag should be used carefully to avoid conflicts and duplication.
* **Examples of Usage:** Instructions can prevent incorrect table traversals, prioritize specific columns for context-sensitive queries, select the correct table when multiple similar tables exist, and clarify choice values to disambiguate user intent.
* **Synonyms:** Support for synonyms on tables, columns, and relationships allows users to query using alternate terms, enhancing flexibility. Each entity can have up to five synonyms, which should be managed to avoid ambiguity.
* **Data Filters:** Applied deterministically as post-processing rules after Cypher query generation, data filters refine results without altering the core query logic. They can adapt dynamically to user context for improved precision.
* **Hidden Columns:** Columns can be hidden from queries and results for privacy or simplification, such as hiding employee numbers in user tables.

## Best Practices

* Write clear, unambiguous instructions aligned with business logic and the underlying data model.
* Reference correct tables (nodes), columns (properties), and relationships (edges) explicitly.
* Use the Always Include flag only for essential default business behaviors.
* Avoid vague, contradictory, or duplicated instructions that could confuse query resolution.
* Apply conditional logic to instructions so they activate only when relevant, rather than universally.
* Keep instructions generalized to cover broad query intents, not just individual cases.

## Practical Benefits for ServiceNow Customers

By configuring AI instructions effectively, ServiceNow customers can ensure their natural language queries return accurate, context-aware results that respect business rules and data relationships. This reduces user confusion, improves query relevancy, and streamlines access to critical information across complex data models. The support for synonyms and data filters further enhances user experience by accommodating varied terminology and refining results dynamically.  
AI instructions add more business context to natural language queries. They guide users and promote responses that more closely align with their needs and expectations.

## AI instructions {#ai-instructiona-and-examples__section_idm_n5z_p3c}

AI instructions help clarify how the knowledge graph interprets user queries and accesses data. When a user submits a query, relevant instructions at all applicable levels like node, property, and edge are considered.  
AI Instructions are persistent, declarative guidance applied at three levels:

* Node (entity/table) level
* Property (column/attribute) level
* Edge (relationship) level
{#ai-instructiona-and-examples__ul_ztx_d5z_p3c}

## The Always Include flag {#ai-instructiona-and-examples__section_ybt_45z_p3c}

The option to set an Always include flag enables users to indicate that a particular instruction should be considered unconditionally. This is useful for enforcing critical business filters, such as
always excluding certain asset statuses unless requested otherwise.  
Instructions:

* Use Always include for business-critical filters that must apply regardless of user query phrasing.
* Omit Always include for context-sensitive instructions that should only apply when relevant.
* Verify that flagged instructions do not conflict with each other or produce duplicate results.
{#ai-instructiona-and-examples__ul_p4k_s5z_p3c}  
The following table shows common scenarios where AI instructions improve query accuracy and provide better business context.{#ai-instructiona-and-examples__ai-instructions-use-cases-intro}
{#ai-instructiona-and-examples__ai-instructions-examples-table__entry__6}

| No. | Instruction Pattern | Example Query | Behavior without AI instruction | Sample AI instructions | Behavior with AI instruction |
|-|-|-|-|-|-|
| 1 | Preventing incorrect traversal paths | Which companies are located in New York? | When no instructions are added, the query goes from core_company to cmn_location table and filters on city field by default. But if your use case requires to query location from city field of core_company table, you need to write an AI instruction to guide the system on the traversal path. | Table Instruction on `core_company` table: `For company-city queries, always use core_company.city directly. Do NOT traverse through cmn_location.` This instruction avoids the system from using cmn_location path for city-based company queries. | When instruction is added, the query matches with city field in core_company table and then filters city=New York and returns all matching companies. |
| 2 | Providing column specific context | Who hosted BBS0000013 brown bag session? | When there is no AI instruction, the system will return sys_id without traversing to host_s. You need to add an instruction on host_s column to provide business context to use this column when query is about host. | Column Instruction on `host_s` of `x_snc_brown_bags_sessions` table: `Use s.host_s or :host_s relationship for the host of a brown bag session, NOT s.sys_created_by` | When instructions are added, the query correctly returns the name from host_s column. |
| 3 | Providing column specific context | What is Kelsey Rodriguez's tenure in current role (months)? | When there is no AI instruction, the system may not give accurate result as it may provide incorrect information for tenure column. You need to add an instruction to guide the system to refer right column for such queries. | Column instruction on `time_in_current_role` column: `Prioritize this column when query contains 'tenure in current role'` | When instructions are added, the query correctly returns the time from `time_in_current_role` column. |
| 4 | Providing context on what to prioritize in case of similar tables | Give me name of Allison Hill's reports having goals pastdue \>0? | When there is no AI instruction, LLM will directly refer to "sys_user" table to fetch user details instead of traversing to WDF table where this information is stored. We need to add an instruction to guide LLM to refer right table when there are similar tables. | Table instruction on WDF table -- "x_snc_wdf_user" *"Always give more priority to "* x_snc_wdf_user"*over sys_user and other glide tables"* | When instructions are added, the query correctly refers to WDF table and return results. |
| 5 | Providing context on what to prioritize in case of similar tables | What is your job title? | When there is no AI instruction, LLM will directly refer to "*sn_hr_core_job* " table to fetch job details instead of traversing to*sn_hr_core_profile"* table where this information is stored. We need to add an instruction to guide LLM to refer right table when there are similar tables. | Table instruction on table -- "*sn_hr_core_profile*" *"Always give more priority to "sn_hr_core_profile" over "sn_hr_core_job" when user specifically asks about job titles.* | When instructions are added, the query correctly refers to "sn_hr_core_profile" table and return results. |
| 6 | Disambiguate among multiple similar and confusing choice values | What are the hardware models that are in normalized state? | When there is no AI instruction, LLM will refer to "normalized" choice value of "normalization status" column which could confuse LLM whether to use other choice values or not as "normalization status" field has 5 choice values (normalized, manufacturer normalized, manually normalized, partially normalized, match not found). We need to add instruction to guide LLM on which all choices to include in normalization status. | Column instruction on "Column- normalization status": *"Always consider normalization status as normalized when choice values is any of the following choices: "normalized, manufacturer normalized, manually normalized"* | When instructions are added, the query correctly considers all 3 choices "normalized, manufacturer normalized, manually normalized" as normalized state and return results. |
[Table 1. Examples of how to use AI instructions effectively]

{#ai-instructiona-and-examples__ai-instructions-examples-table}

## Best practices for AI instructions {#ai-instructiona-and-examples__ai-instructions-best-practices}

Follow these guidelines when creating AI instructions to verify optimal performance and accuracy:{#ai-instructiona-and-examples__ai-instructions-best-practices-intro}

* Write clear, unambiguous, and actionable instructions tied to business logic. Always reference the correct tables (nodes), columns (properties), and relationships (edges). Use flags like Always include only when enforcing true default business behavior.
* Avoid vague or contradictory instructions. Instructions that do not align with the underlying data model can confuse the system and lead to incorrect results. For example, an instruction like "Filter by manufacturer" without specifying the column or condition is ambiguous.
* Use conditions to control when logic applies. Clearly state when an instruction should be applied (for example, only when the user asks for host information), rather than applying logic universally.
* Keep instructions focused and generalized. Instructions should guide intent interpretation across similar queries, not solve a single one-off case.
* Do not duplicate logic already handled elsewhere. Avoid restating filters or constraints that are already enforced through data filters to avoid conflict.
{#ai-instructiona-and-examples__best-practices-list}

## Support for Synonyms, Data Filters and hidden columns {#ai-instructiona-and-examples__section_fkw_wvz_p3c}

Synonyms:  
Knowledge Graph supports configuring synonyms for tables, columns, edges, and reverse edges to enhance flexibility and user-friendliness. Synonyms enable users to define alternate names for these entities, accommodating different terminologies.

* Each entity can have up to five synonyms.
* Synonyms promote broad coverage for commonly used alternate terms.
* Maintaining a manageable synonym set reduces ambiguity in query resolution.
{#ai-instructiona-and-examples__ul_npr_yvz_p3c}

Data Filters:  
Data filters are applied deterministically as post-processing rules to refine query results. After initial Cypher generation, filters are systematically applied to promote consistency and reliability of outcomes.

* Filters are applied after Cypher generation, not during.
* Dynamic filters enable real-time adaptation based on user context.
* Improves precision and relevance of returned data. Does not modify the core graph query.
{#ai-instructiona-and-examples__ul_plf_bwz_p3c}

Hidden columns:

Hidden columns cannot be queried and do not appear in the result.

For example: add Employee number as hidden columns for sys_user table to hide the employee number from query results.

