Skip to content
Release: Australia · Updated: 2026-05-27 · Official documentation · View source

Configuration item relationships and Knowledge Graph

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

System PropertyPurpose
sn_kg.description_generation.enable_cmdb_rel_ciEnables description generation for CI relationship data
sn_kg.query.enable_cmdb_rel_ciEnables 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.

ScenarioExample Query
Service that depends on a specific Linux serverWhich 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 databaseWhich databases are connected by computers?
Multi-hop relationship across three CI typesWhat 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.

LimitationUnsupported QueryRecommended Alternative
Negation of a relationshipWhich business capabilities have no related business applications?Rephrase to ask for what does exist rather than what does not.
Unspecified relationship typeShow me services related to Linux servers.Show me services depending on Linux servers.
Skipping steps in a multi-hop pathShow me servers in New York.Show me servers in racks present in datacenters located in New York.