Configuring knowledge graph relationships
Entities within the knowledge graph are linked to each other by relationships.
Two types of relationships are supported:
mentions relationships are detected without any additional configuration if any of an entity’s node name values are found in the content of another entity.
user-defined relationships are configured as part of the profile-level configuration and are detected if any of an entity’s node name values are found as a value in a specified metadata field of another entity.
Mentions relationships are automatically created whenever one entity makes a reference to another entity in the body text or within a metadata class which is not defined as representing a more specific relationship type. This is done by searching the summarisable text and metadata content for occurrences of a value in any other node’s
FUNkgNodeNames metadata (case is ignored such that MSMITH is equivalent to msmith). The matching for mentions relationships will match any occurrence of a declared node name within the target as long as it falls on a word boundary (e.g. msmith would be found in I think her username is msmith. but not in How many msmiths do we have?).
Mentions relationships are detected in a document’s summarisable text. This text can be exposed in the data model by setting the query processor option
-all_summary_text=true. See: query processor option.
e.g. Given the following XML which represents entities:
Superhero entity - S1
<document> <id>S1</id> <FUNkgNodeLabel>Superhero</FUNkgNodeLabel> <FUNkgNodeNames>Bruce Wayne</FUNkgNodeNames> <FUNkgNodeNames>Batman</FUNkgNodeNames> <Name>Bruce Wayne</Name> <Alias>Batman</Alias> </document>
Movie entity - M5
<document> <id>M5</id> <FUNkgNodeLabel>Movie</FUNkgNodeLabel> <FUNkgNodeNames>Dawn of Justice</FUNkgNodeNames> <Title>Batman v Superman: Dawn of Justice</Title> <Description><![CDATA[Batman v Superman: Dawn of Justice is a 2016 American superhero film featuring the DC Comics characters Batman and Superman.]]></Description> </document>
A mentions relationship between
M5 will automatically be created when the knowledge graph is updated as one of the names of S1 (Batman) appears within the description of M5.
Only one mentions relationship is ever created between any two entities. i.e. In the scenario that one entity has multiple references to another, only one @mentions relationship will be created.
When working with XML documents, knowledge graph will only create mentions relationships based on fields mapped as indexable document content.
User-defined relationships provide a connection between two entities referred to as the source and target.
User-defined relationships are configured at the profile level from the graph tab of administration interface.
Every relationship is directional:
Outgoing relationships are created from a source entity to a target entity
Incoming relationships are created from a target entity to a source entity
This is important when it comes to customising the knowledge graph widget presentation.
The custom relationship is created when the source node name fully matches a value within the specified metadata field of the target entity. Note: the target metadata field can contain multiple values, and the relationship will be created as long as the source node name fully matches one of these values.
Given entities of type
document, we can configure a
created relationship between them:
person -> created -> document
document -> created (by) -> person
person is the source entity and
document is the target entity.
There is also a special
all.undirected relationship that appears within the knowledge graph, which contains all the related entities for the current entity.