Using Natural Language Query
Summarize
Summary of Using Natural Language Query
Natural Language Query (NLQ) allows users to query data in ServiceNow tables using simple, everyday language. This feature eliminates the need for familiarity with the condition builder, as NLQ automatically formulates and displays the necessary conditions based on user input. Users with appropriate roles, such as itil, can access NLQ through the natural language filter icon on any list within the platform.
Show less
Key Features
- Easy Query Input: Users can enter queries in the "What do you want to see" field, and NLQ translates these into structured queries.
- Refinement and Suggestions: Users can refine queries further by entering additional requests, with NLQ providing suggestions for columns and fields as they type.
- Condition Builder: The conditions are displayed in the condition builder, helping users visualize the query structure.
- Resetting Queries: Users can easily reset their queries by clearing the condition builder.
Key Outcomes
By leveraging NLQ, ServiceNow customers can quickly and intuitively access data insights without needing technical expertise. This leads to improved efficiency in data retrieval and enhances the overall user experience. Customers can expect to easily create and modify queries to meet their specific information needs, ultimately driving more informed decision-making.
Useful Information
When using NLQ, users should note that:
- Requests can include periods and apostrophes, but not wildcard characters.
- Columns must be visible in the list view to group by them.
- The personalize list icon can be used to show or hide columns.
Tips for Improving Queries
Utilize the "Tips for improving your queries" feature to enhance query effectiveness. The modal window provides guidance on:
- Sorting/Grouping: Use terms like "grouped by" or "sorted by".
- Dates: Incorporate terms such as "today", "last month", or "next year".
- Filtering: Apply filters like "starts with", "more than", or "unassigned".
- Other Information: Use context-based terms like "my" or "created by".
Example queries can include sorting incidents by category or filtering unassigned tickets, providing users with flexible options to extract relevant data efficiently.
With Natural Language Query (NLQ), you can query data in your tables by entering requests in natural, everyday language.
NLQ overview
NLQ turns your plain-language requests into structured queries of your data. You don't need to know how to use the condition builder, because NLQ constructs and displays the conditions for you.
If you have a role such as itil that can view and interact with tables, you can use NLQ by selecting the natural language filter icon.
NLQ works on any list on the platform. It returns results only from the table or list you query on.
Find and use the natural language filter
Selecting the natural language filter icon brings up the NLQ interface.
Enter your request in the What do you want to see field, then select Ask. NLQ parses your request, then displays the query in the condition builder. The results of the query are displayed in the list.
This example image and procedure illustrates how to build a query using NLQ:
- On the Incident table in the natural language filter, enter show me active hardware tickets and select the Ask button.
- The condition builder displays as the query. The filtered results are displayed in the list.
- To narrow down the list of results further, enter without assignment group. Notice that as you type, NLQ displays possible matches for columns and fields. Select assignment group from the list of suggestions, and then Ask.
- In the condition builder, NLQ adds >Assignment group is empty to the query. The list refreshes to display only the matching rows.
- To reset and start a new query, delete everything in the condition builder so that only All remains.
Useful information
- Your requests can contain periods and apostrophes, but not wildcard characters such as asterisks or regex.
- To group by a field or column, that column must be visible in the list view. Use the personalize list icon (
) to hide or display columns.
- For information about querying CMDB tables, see Querying the CMDB.
Tips for improving your queries
- Sorting or grouping: grouped by; sorted by; A-Z; z-a
- Dates: today; yesterday; last; this; next day(s); week(s); quarter(s); year(s)
- Filtering: starts with; ends with; more than; less than; empty; not empty; and; or
- Other information: my; my team; created by; unassigned
| Query | Example |
|---|---|
| Sorting or grouping | incidents grouped by category |
| Dates | created last month |
| Filtering | short description starts with computer |
| Other information | unassigned tickets |
| Single number | INC0777 |