Skip to main content

Knowledge Graph

References

RDF vs LPG

Source: RDF is a Knowledge Representation — Sergey Vasiliev

RDF and LPG are not competing technologies — they serve different architectural purposes. RDF formalises meaning; LPG operationalises context.

Data Model

  • RDF: Atomic subject-predicate-object triples. Relationships are predicates within statements, not first-class objects.
  • LPG: Nodes and relationships are explicit, property-bearing primitives with direct structural connections.

Relationship Attributes

  • RDF: Encoding metadata on relationships (validity dates, confidence scores) requires reification — creating intermediate nodes to represent the relationship itself, increasing query complexity.
  • LPG: Relationship properties attach natively to edges without indirection (e.g., [:WORKS_FOR {confidence: 0.92}]).

Traversal & Adjacency

  • RDF: Adjacency is implicit, reconstructed at query time through triple joins. Multi-hop queries involve joining multiple triples on shared identifiers.
  • LPG: Adjacency is explicit and physically aligned with storage, making traversal structurally direct.

Schema & Reasoning

  • RDF: Formal semantics grounded in model theory. Enables logical entailment and inference through RDFS/OWL. Globally unique IRIs support cross-system integration.
  • LPG: Lightweight typing through labels, allowing iterative schema evolution. No built-in reasoning — requires external governance to prevent conceptual drift.

Mutation Handling

  • RDF: Changes require reconstructing declarative statement sets.
  • LPG: Supports efficient incremental updates at node and edge level.

When to Use Which

  • RDF: Semantic interoperability, ontological rigor, regulatory compliance, distributed integration across the web.
  • LPG: Traversal-heavy workloads, graph algorithms (centrality, community detection), GraphRAG pipelines, temporal modeling, and decision-oriented systems.

Architectural Layering (Author's Recommendation)

  1. Semantic Alignment Layer — RDF defines vocabularies, ontologies, and cross-domain mappings
  2. Operational Graph Layer — LPG materializes entities and relationships for traversal, scoring, and mutation
  3. Analytical/AI Layer — Graph algorithms, feature extraction, and GraphRAG orchestration consume the operational layer

Tools