Using Natural Language Query

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    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 Using Natural Language Query

    Natural Language Query (NLQ) enables you to query data in ServiceNow tables using plain, everyday language without needing to manually build conditions. With roles likeitil, you can access NLQ on any list by selecting the natural language filter icon. NLQ interprets your natural language requests, translates them into structured queries, and displays both the query conditions and results dynamically within the list view.

    Show full answer Show less

    How to Use NLQ

    • Select the natural language filter icon on any list to open the NLQ interface.
    • Enter your query in the What do you want to see field and select Ask.
    • NLQ parses your input, displays corresponding conditions in the condition builder, and shows the filtered results.
    • You can refine queries by entering additional natural language requests, building upon previous filters.
    • To start a new query, clear the condition builder so only All remains.

    For example, on the Incident table, entering “show me active hardware tickets” creates conditions filtering active tickets in the Hardware category. Further refining with “without assignment group” filters tickets without an assignment group.

    Key Considerations

    • NLQ supports periods and apostrophes but does not support wildcard characters like asterisks or regex.
    • To group results by a field, ensure that the column is visible in the list view; use the personalize list icon to manage column visibility.
    • NLQ queries only apply to the table or list you are currently working on.
    • For specific querying of Configuration Management Database (CMDB) tables, refer to the CMDB querying documentation.

    Tips for Improving Queries

    Access the Tips for improving your queries button to see guidance on supported terms for enhanced query construction, including:

    • Sorting or grouping: grouped by, sorted by, A-Z, z-a
    • Dates: today, yesterday, last, this, next (days/weeks/quarters/years)
    • Filtering: starts with, ends with, more than, less than, empty, not empty, and, or
    • Other useful terms: my, my team, created by, unassigned

    Example queries include:

    • “incidents grouped by category” (sorting/grouping)
    • “created last month” (date filtering)
    • “short description starts with computer” (text filtering)
    • “unassigned tickets” (other filters)
    • Query by single record number, e.g., INC0777

    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.

    NLQ interface in list view.

    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.

    With the default configuration of NLQ, you can continue to refine your query by entering another request into the What do you want to see field.
    Figure 1. Using NLQ to build on a previous query
    Using NLQ to append a query to a previous query

    This example image and procedure illustrates how to build a query using NLQ:

    1. On the Incident table in the natural language filter, enter show me active hardware tickets and select the Ask button.
    2. The condition builder displays All > Active = true > Category = Hardware as the query. The filtered results are displayed in the list.
    3. 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.
    4. In the condition builder, NLQ adds >Assignment group is empty to the query. The list refreshes to display only the matching rows.
    5. To reset and start a new query, delete everything in the condition builder so that only All remains.

    Useful information

    Keep the following information in mind when using NLQ.
    • 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 (Personalize list icon.) to hide or display columns.
    • For information about querying CMDB tables, see Querying the CMDB.

    Tips for improving your queries

    When you select the Tips for improving your queries button, a modal window appears in the user interface. This window offers the following information about terms you can use in your NLQ questions and requests:
    • 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