Configuration item relationships and Knowledge Graph

  • Release version: Australia
  • Updated May 27, 2026
  • 3 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 Configuration item relationships and Knowledge Graph

    Configuration item (CI) Relationships in ServiceNow enable the Knowledge Graph to answer natural language queries about service dependencies and IT infrastructure topology. This is achieved by storing typed parent-child relationships between CIs in the CMDBRELCI table, connecting parent and child CIs through defined relationship types. This functionality allows users to explore how services, servers, databases, and other CIs interrelate without writing queries or directly navigating CMDB tables.

    Show full answer Show less

    Enabling CI Relationship Support

    CI relationship support in Knowledge Graph is disabled by default. To activate it, two system properties must be set to true:

    • snkg.descriptiongeneration.enablecmdbrelci: Enables description generation for CI relationship data.
    • snkg.query.enablecmdbrelci: Enables Knowledge Graph querying against CI relationship data.

    After enabling these properties, allow sufficient time for CI relationship data to be fully indexed to ensure complete query results.

    How CI Relationship Data is Stored

    Each record in the CI relationship table represents a bi-directional relationship between two CIs, described by a relationship type with parent-to-child and child-to-parent descriptors separated by double colons (e.g., Depends on::Used by). This enables reading the relationship in both directions, for example:

    • Parent → Child: "Bond Trading depends on lnux100"
    • Child → Parent: "lnux100 is used by Bond Trading"

    Note that queries phrased from parent to child (e.g., "depends on") typically yield more reliable results than child to parent.

    Knowledge Graph Query Requirements and Behavior

    For the Knowledge Graph to answer questions involving CI relationships, queries must clearly specify:

    • The class of the parent CI (e.g., service)
    • The relationship direction/type (e.g., depends on)
    • The class of the child CI (e.g., Linux server)

    The Knowledge Graph supports class hierarchy inheritance, meaning relationships defined between specific CI classes automatically apply to their parent classes. This enables broader queries (e.g., querying for "server" includes Linux, Windows, and UNIX servers).

    Supported Query Patterns

    The Knowledge Graph can handle queries such as:

    • Finding services depending on a specific Linux server.
    • Discovering servers that a particular service depends on.
    • Listing all server types a service depends on using class hierarchies.
    • Identifying computers connected to databases.
    • Multi-hop queries across three CI types (e.g., databases running on UNIX servers connected to specific network gear).

    Unsupported Query Patterns and Alternatives

    Some query types are not supported, including:

    • Negation of relationships: Queries asking for the absence of relationships should be reframed to ask for existing relationships.
    • Unspecified relationship types: Queries must specify the relationship type to get accurate results (e.g., "depending on" instead of just "related to").
    • Skipping steps in multi-hop paths: Queries should explicitly include intermediate CI types for accurate results (e.g., specify racks and datacenters when querying for servers in New York).

    Configuration item (CI) Relationships enable Knowledge Graph to answer natural language questions about service dependencies and infrastructure topology by storing typed parent-child relationships between CMDB configuration items.

    The CMDB_REL_CI table stores relationships between configuration items (CIs) in ServiceNow CMDB. Each relationship connects a parent CI to a child CI through a defined relationship type, enabling the Knowledge Graph to understand and traverse the topology of your IT environment.

    CI relationship support in Knowledge Graph allows users to ask natural language questions about how services, servers, databases, and other CIs relate to one another without writing queries or navigating CMDB tables directly.

    Enabling CI relationship for Knowledge Graph

    CI relationship support for the Knowledge Graph is inactive by default. Set both of the following system properties to true to enable it

    Table 1. System properties for CI relationship support
    System Property Purpose
    sn_kg.description_generation.enable_cmdb_rel_ci Enables description generation for CI relationship data
    sn_kg.query.enable_cmdb_rel_ci Enables Knowledge Graph querying against CI relationship data
    Note:
    After enabling both properties, allow time for CI relationship data to be fully indexed before running queries. Results may be incomplete until indexing is complete.

    How CI relationship data is stored

    Each record in the CI relationship table represents a bi-directional relationship between two CIs. Relationships are described by a relationship type that consists of a parent to child relationship and child to parent relationship, separated by double colons:

    <parent descriptor>::<child descriptor>

    This means every relationship can be read in two directions:

    • Parent → child: read using the parent to child relationship (parent descriptor)
    • Child → parent: read using the child to parent relationship (child descriptor)

    For example, a record in the CI relationship table has Bond Trading (cmdb_ci_service) as the parent, lnux100 (cmdb_ci_linux_server) as the child, and a relationship type of Depends on::Used by. This relationship is read as:

    • Bond Trading depends on lnux100
    • lnux100 is used by Bond Trading
    Note:
    The direction of the relationship affects how you phrase queries to the Knowledge Graph. Parent-to-child queries (for example, "depends on") return more reliable results than child-to-parent queries (for example, "used by").

    Knowledge Graph support for CI relationships

    The Knowledge Graph can answer questions about CI relationships when the query clearly specifies all three of the following:

    • The class of the parent CI (for example, service)
    • The relationship direction — either the parent to child relationship or child to parent relationship (for example, depends on)
    • The class of the child CI (for example, Linux server)

    Class hierarchy inheritance

    When you define a relationship between two CI classes, the Knowledge Graph automatically extends that relationship to all classes higher up in the CI class hierarchy. This means users can query at a more general class level and still get results across all matching subclasses.

    For example, a relationship defined between service and linux server also applies to server, which is a parent class of Linux server in the hierarchy. Querying for servers rather than Linux servers returns results across all server subclasses — including Linux server, windows server, UNIX server, and others.

    Note:
    If a query returns fewer results than expected, try using a broader parent class in the hierarchy (for example, "server" instead of "Linux server") to include all inherited CI types.

    Supported query patterns

    The following table shows examples of queries the Knowledge Graph can answer using CI relationship data. Each query specifies a parent class, a relationship descriptor, and a child class.

    Table 2. Supported query patterns
    Scenario Example Query
    Service that depends on a specific Linux server Which services depend on 'lnux100' Linux server?
    Servers that a specific service depends on 'Bond Trading' service depends on which UNIX server?
    All server types a service depends on (using hierarchy) 'Bond Trading' service depends on which server?
    Computers connected to a database Which databases are connected by computers?
    Multi-hop relationship across three CI types What database runs on UNIX server that connects to 'nc6500-a01' network gear?

    Unsupported query patterns

    The following query types are not currently supported. Use the recommended alternatives to get the results you need.

    Table 3. Unsupported query patterns
    Limitation Unsupported Query Recommended Alternative
    Negation of a relationship Which business capabilities have no related business applications? Rephrase to ask for what does exist rather than what does not.
    Unspecified relationship type Show me services related to Linux servers. Show me services depending on Linux servers.
    Skipping steps in a multi-hop path Show me servers in New York. Show me servers in racks present in datacenters located in New York.