Knowledge graphs for operational data

A knowledge graph connects business records: a supplier fulfills a contract, an invoice references that contract, and an approval relies on its terms. Model the paths needed to answer a specific operational question.

Invoice relationships

An example graph linking an invoice to its supplier and contract.

Invoice · subjectinv_1042
issuedBy
Supplier · objectsupplier_73

The source invoice identifies supplier_73 as its issuer.

Source field
supplier_key
referencesContract
Contract · objectcontract_91

The invoice references contract_91. Its terms and approval status require separate checks.

Source field
contract_key

Shared provenance

Evidence source
ERP invoice header · revision 7
Observed
08:55 UTC
Assertion type
Source asserted

Begin with the question the graph must answer

For an invoice review, a traversal may run from invoice to supplier, contract, governing entity and current restriction. Define that path before building the graph, and distinguish relationships recorded by a source from those derived by rules.

Graph design should make the critical path understandable and bounded. Define expected fanout, permitted traversal depth, and the freshness required for each edge. Some questions are better served by a relational aggregate. Choose a graph when relationship structure helps explain or discover information that the decision actually needs.

Choose a representation that matches interoperability needs

RDF represents a graph as subject, predicate, and object triples, with IRIs identifying resources and predicates. Property graphs commonly attach properties to vertices and edges. These are different modeling choices with different query languages and implementation tradeoffs. Do not assume a graph database automatically supports an ontology or a particular inference regime.

Use stable identifiers and explicit relationship names. The Turtle record connects an invoice to its supplier and governing contract. A display label is useful for a person, but the identifier anchors relationships when names change. Keep source lineage separately identifiable so a disputed relationship can be traced and corrected.

turtle
@prefix ex: <https://example.com/model/> .
@prefix id: <https://example.com/entity/> .

id:inv_1042 a ex:Invoice ;
  ex:issuedBy id:supplier_73 ;
  ex:referencesContract id:contract_91 .

An invoice, its supplier and the referenced contract expressed as RDF.

Attach evidence to relationships

A relationship may change or be uncertain. Track its source, observation time, effective interval, and derivation where relevant. A historical contract relationship should remain distinguishable from the current relationship. Inferred connections need their rule or model version and an explanation suitable for review.

Avoid collapsing every source assertion into an unquestionable fact. Conflicting records may require a precedence rule or a review queue. Named graphs, statement metadata patterns, or explicit assertion entities can help organize provenance, but the representation should fit the chosen query engine and access model rather than an abstract preference.

Govern traversal cost and information exposure

A user permitted to view one entity is not automatically permitted to traverse all of its relationships. Enforce authorization when assembling results, including relationship properties and counts that might reveal sensitive information. Tenant constraints must remain effective through every expansion, cache, and export.

Set execution limits and test high fanout entities, missing relationships and cycles. Compare results with known business cases and record the model version. Include source references with the result and indicate any missing or uncertain relationships.

References