Skip to main content

Knowledge Graph Fundamentals

A knowledge graph records statements about identified things. In the Resource Description Framework (RDF), an asserted graph is a set of subject–predicate–object triples. The predicate is not merely an unlabeled network edge: it names the relationship's meaning. This semantic layer is different from the interaction graph's event records and from a database product that might store either model.

Prerequisites​

Complete temporal and evolving networks. Keep node identity, edge identity, observation time, and missingness separate.

Learning goals​

  • Distinguish RDF-style triples from event edges and property-graph records.
  • Separate asserted facts, schema statements, and inferred statements.
  • Treat identifiers, literals, provenance, and validation as explicit contracts.
  • Avoid reading an absent triple as a false proposition.

Representation contract​

  • Statement unit: one ordered (subject, predicate, object) triple; this lesson uses readable local identifiers, not production IRIs.
  • Semantics: predicates such as knows and memberOf retain distinct meanings and are never collapsed into a generic adjacency.
  • Inference: the example performs no RDFS or OWL entailment. Only listed triples are asserted.
  • Interpretation limit: an assertion is a recorded claim, not proof that it is complete, current, correct, or causal.

Triples, terms, and provenance​

RDF subjects and predicates are identified resources; objects may also be literals. A production graph normally uses globally scoped IRIs, language tags and datatypes. Blank nodes express unnamed resources but complicate reconciliation across sources. Named graphs or another provenance model can associate statements with a source or snapshot, but a graph name does not automatically guarantee trust.

Property graphs commonly attach properties to nodes and edges and may preserve repeated edge identities. RDF graphs are sets of triples, so inserting the same triple twice does not create two events. Converting the interaction fixture to RDF therefore requires a modeling choice: represent each interaction as its own identified event, or accept that identical triples collapse.

The open-world boundary matters. If (ada, knows, cy) is absent, the graph does not by itself assert that Ada does not know Cy. Closed-world validation rules can still reject incomplete records, but that is an application contract rather than base RDF semantics.

Worked example​

triples = {
("ada", "type", "Person"),
("ben", "type", "Person"),
("ada", "knows", "ben"),
("ada", "label", "Ada"),
("ben", "label", "Ben"),
("ada", "memberOf", "team-graph"),
}

subjects = sorted({subject for subject, _, _ in triples})
predicates = sorted({predicate for _, predicate, _ in triples})
ada_labels = sorted(
obj for subject, predicate, obj in triples
if subject == "ada" and predicate == "label"
)
print(f"triples={len(triples)} subjects={subjects}")
print(f"predicates={predicates} ada_labels={ada_labels}")
print(f"absent_ada_knows_cy={('ada', 'knows', 'cy') not in triples} meaning=unknown-not-false")

Expected output:

triples=6 subjects=['ada', 'ben']
predicates=['knows', 'label', 'memberOf', 'type'] ada_labels=['Ada']
absent_ada_knows_cy=True meaning=unknown-not-false

The Python set demonstrates triple identity and filtering, not RDF parsing, datatype handling, or entailment.

Limitations​

  • Shared spelling does not establish shared identity; entity resolution needs rules and review.
  • Ontology terms can conflict across sources or change over time.
  • Inference may produce additional statements, including unwanted or inconsistent ones, under a chosen entailment regime.
  • A knowledge graph can encode disputed, harmful, or privacy-sensitive claims with perfect syntax.

Practice​

Model r01 as an identified interaction event with actor, recipient, type, weight, and observation time. List which triples preserve information that a direct ada knows ben edge would discard.

Next steps​

Continue to graph query patterns to match and traverse typed relationships without assuming a particular database.

Primary sources​

Checked 2026-10-18: W3C, RDF 1.2 Concepts and Abstract Data Model; W3C, RDF 1.2 Semantics; W3C, Data Quality Vocabulary.