Configuration item relationships and Knowledge Graph

  • Release version: Zurich
  • 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’s CMDB enable the Knowledge Graph to interpret and answer natural language questions regarding service dependencies and infrastructure topology. Relationships between CIs are stored in theCMDBRELCItable and define typed parent-child connections, allowing users to explore how services, servers, databases, and other CIs interrelate without needing to write queries or navigate raw CMDB tables.

    Show full answer Show less

    Enabling CI Relationship Support

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

    • snkg.descriptiongeneration.enablecmdbrelci – enables description generation for CI relationship data
    • snkg.query.enablecmdbrelci – enables querying the Knowledge Graph against CI relationship data

    After enabling, allow time for the CI relationship data to be fully indexed; incomplete indexing may yield partial query results.

    How CI Relationship Data is Stored

    Each record represents a bi-directional relationship between two CIs, defined by a relationship type in the format <parent descriptor>::<child descriptor>. This means relationships can be understood both from the parent to the child and vice versa. For example, “Depends on::Used by” signifies:

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

    Note: Queries phrased from the parent-to-child direction (e.g., “depends on”) tend to return more reliable results than child-to-parent queries.

    Knowledge Graph Querying with CI Relationships

    To leverage CI relationship data in Knowledge Graph queries, specify:

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

    Relationships defined at a specific CI class level automatically extend to all parent classes in the CI class hierarchy, allowing broader queries (e.g., querying for “servers” includes Linux, Windows, UNIX servers, etc.).

    Tip: If fewer results than expected appear, try using a broader parent class to include all subclasses.

    Supported Query Examples

    • “Which services depend on 'lnux100' Linux server?”
    • “'Bond Trading' service depends on which UNIX server?”
    • “'Bond Trading' service depends on which server?” (using hierarchy)
    • “Which databases are connected by computers?”
    • Multi-hop queries, e.g., “What database runs on UNIX server that connects to 'nc6500-a01' network gear?”

    Unsupported Query Patterns and Alternatives

    The Knowledge Graph does not currently support:

    • Negation of relationships (e.g., “Which business capabilities have no related business applications?”). Instead, rephrase queries to ask what relationships do exist.
    • Queries without specifying relationship types (e.g., “Show me services related to Linux servers.”). Specify the exact relationship, such as “depending on.”
    • Skipping steps in multi-hop paths (e.g., “Show me servers in New York.”). Instead, specify the full path, such as “servers in racks present in datacenters located 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 the 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 descriptor or child descriptor (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.