Inferensys

Glossary

RDF (Resource Description Framework)

RDF (Resource Description Framework) is a W3C standard data model for representing information as a directed graph of subject-predicate-object triples, forming the foundational layer of the Semantic Web and enterprise knowledge graphs.
Knowledge manager reviewing enterprise knowledge management system on laptop, document library visible, casual office.
KNOWLEDGE REPRESENTATION LANGUAGES

What is RDF (Resource Description Framework)?

A formal definition of the foundational data model for the Semantic Web and enterprise knowledge graphs.

The Resource Description Framework (RDF) is a W3C standard data model for representing information as a directed graph of subject-predicate-object triples. Each triple forms a machine-readable statement where a subject (a resource identified by a URI) is linked to an object (another resource or a literal value) via a predicate (a property or relationship). This model provides a universal, flexible format for integrating heterogeneous data from disparate sources into a unified, interconnected knowledge structure, forming the essential layer for semantic data integration and logical inference.

RDF's core abstraction enables deterministic data interchange and is the foundation for the Linked Data principles and the broader Semantic Web stack. It is serialized in formats like Turtle, JSON-LD, and RDF/XML. The model is extended by RDF Schema (RDFS) for basic taxonomies and the Web Ontology Language (OWL) for expressive ontologies, while SPARQL serves as its standard query language. In enterprise contexts, RDF graphs are stored in specialized databases called triplestores, which are optimized for complex graph pattern matching and form the backbone of deterministic knowledge graphs used for factual grounding in reasoning systems.

FOUNDATIONAL CONCEPTS

Core Components of the RDF Model

The Resource Description Framework (RDF) structures information as a directed graph of interconnected statements. Its core components define how knowledge is atomically represented, uniquely identified, and logically structured.

01

The RDF Triple

An RDF triple is the fundamental, atomic data unit, forming a single statement or fact. It consists of three components:

  • Subject: The resource being described (a URI or blank node).
  • Predicate: The property or relationship (always a URI).
  • Object: The value of the property (a URI, literal, or blank node).

This structure creates a machine-readable assertion, such as (ex:ProductX, ex:manufacturedBy, ex:CompanyY). Billions of interconnected triples form a global knowledge graph.

02

Uniform Resource Identifiers (URIs)

URIs provide global, unambiguous names for resources, ensuring entities and relationships are uniquely identifiable across systems. They are the backbone of Linked Data.

  • Subjects and Predicates are almost always identified by URIs (e.g., http://schema.org/Person).
  • This allows decentralized data from different sources to be seamlessly connected by referencing the same URI.
  • Unlike database primary keys, URIs are web-accessible, enabling both identification and potential dereferencing to obtain more information.
03

Literals and Datatypes

Literals are values used as the object in a triple to represent raw data like strings, numbers, or dates. They are not resources themselves but concrete values.

  • A plain literal is a simple string: "Inferensys".
  • A typed literal includes an explicit datatype URI (e.g., "42"^^xsd:integer, "2024-05-15"^^xsd:date).
  • An optional language tag can be attached to string literals for internationalization: "Hello"@en, "Bonjour"@fr. This precision is critical for data validation, sorting, and mathematical operations.
04

Blank Nodes

A blank node (or bnode) is an anonymous resource used as a subject or object when a distinct URI is unnecessary or unknown. It represents an existential variable—"a thing that exists."

  • Used for complex values: describing an address without needing to give the address itself a global URI.
  • Used for intermediate structures: ex:Report ex:authoredBy [ a ex:Person; ex:name "Jane Doe" ].
  • Their scope is typically limited to the specific RDF document or dataset. They are locally unique identifiers, not globally dereferenceable.
05

The RDF Graph

The collection of all triples forms a directed, labeled graph.

  • Nodes: Subjects and objects (URIs, blank nodes, literals).
  • Directed Edges: Predicates (URIs), linking subjects to objects.
  • This graph-based model is inherently flexible, allowing new types of relationships and entities to be added without schema alteration.
  • The graph can be queried by traversing these edges, enabling powerful pattern-matching operations that are difficult in relational databases.
06

RDF Serialization Formats

An abstract RDF graph must be serialized into a concrete syntax for exchange. Common formats include:

  • Turtle (TTL): A compact, human-readable text format using prefixes. The preferred choice for authoring and documentation.
  • RDF/XML: The original XML-based syntax, standardized by the W3C.
  • JSON-LD: Serializes RDF as JSON, ideal for web APIs and JavaScript integration.
  • N-Triples: A very simple line-based format with one triple per line; easy to parse.
  • RDFa: Embeds RDF within HTML attributes for semantic markup of web pages. Each format represents the same underlying graph model.
FOUNDATIONAL DATA MODEL

How RDF Works: The Triple-Based Graph

The Resource Description Framework (RDF) is the foundational data model for the Semantic Web and enterprise knowledge graphs, structuring information as a directed graph of interconnected statements.

RDF (Resource Description Framework) is a standard data model for representing information as a directed graph composed of subject-predicate-object triples. Each triple forms a single, atomic statement where the subject is a resource identified by a URI, the predicate defines a property or relationship (also a URI), and the object is either another resource or a literal value like text or a number. This simple, uniform structure allows disparate data sources to be merged into a single, interconnected knowledge graph where meaning emerges from the connections themselves.

The power of RDF lies in its use of globally unique URIs for identifying resources and properties, which enables unambiguous data integration across organizational boundaries. Triples are stored in a specialized database called a triplestore and queried using the SPARQL language. By formally defining vocabularies with RDFS and OWL, the basic graph can support automated reasoning to infer new, logically entailed facts, transforming raw data into a computable web of knowledge.

DATA INTERCHANGE

Common RDF Serialization Formats

RDF's abstract graph model must be converted into concrete syntax for storage and exchange. These formats provide different trade-offs between human readability, machine processing efficiency, and web integration.

01

Turtle (Terse RDF Triple Language)

Turtle is the predominant human-readable text format for authoring and exchanging RDF. It uses a compact syntax with prefixes to abbreviate URIs, supports shorthand for lists and nested blank nodes, and is the recommended format for most RDF work.

  • Key Feature: Uses @prefix declarations (e.g., @prefix ex: <http://example.org/>) to enable concise ex:subject ex:predicate ex:object . triples.
  • Example: ex:Alice ex:knows ex:Bob ; ex:age 30 .
  • Primary Use: Manual editing, documentation, and clear data dumps.
02

JSON-LD (JSON for Linked Data)

JSON-LD serializes RDF as JSON, making it the ideal format for integrating semantic data into modern web APIs and JavaScript applications. It uses a @context to map JSON keys to global URIs, allowing the same data to be processed as plain JSON or as a full RDF graph.

  • Key Feature: The @context provides semantic meaning to JSON structures, enabling round-tripping between linked data and application-specific JSON.
  • Example: {"@context":{"name":"http://xmlns.com/foaf/0.1/name"}, "@id":"http://me.example.com", "name":"Alice"}
  • Primary Use: Web APIs, microservices, and applications where JSON is the native data format.
03

RDF/XML

RDF/XML is the original, canonical XML-based serialization defined in the 2004 RDF specification. It represents the RDF graph as an XML document, which can be validated and processed by standard XML tools.

  • Key Feature: Official W3C standard format; any compliant RDF processor must be able to read and write RDF/XML.
  • Drawback: The XML syntax can be verbose and complex for representing graph structures, making it less human-friendly than Turtle.
  • Primary Use: Legacy systems, environments with mandated XML interchange, and formal W3C specifications.
04

N-Triples & N-Quads

N-Triples is a simple, line-based format where each line contains exactly one triple in fully expanded form (no prefixes). N-Quads extends N-Triples by adding an optional fourth field for a graph name, aligning with the RDF Dataset concept.

  • Key Feature: Simplicity and predictability. The lack of abbreviations makes it ideal for stream processing, automated parsing, and large-scale data dumps where consistency is critical.
  • Example (N-Triples): <http://example.org/Alice> <http://xmlns.com/foaf/0.1/name> "Alice" .
  • Example (N-Quads): ... "Alice" <http://example.org/graph1> .
  • Primary Use: Large dataset exchange, stream processing, and intermediate format for RDF parsers.
05

RDFa (RDF in Attributes)

RDFa is a markup language for embedding RDF data directly into HTML, XHTML, and XML documents using attributes. It allows publishers to add machine-readable metadata to human-readable web pages without duplicating content.

  • Key Feature: Co-locates data and presentation. Uses HTML attributes like property, resource, and typeof to annotate existing page elements.
  • Example: <div resource="http://example.org/Alice" typeof="foaf:Person"> <span property="foaf:name">Alice</span> </div>
  • Primary Use: Search engine optimization (SEO) via schema.org, publishing linked data on the web, and enabling rich snippets.
06

TriG & TriX

TriG is a format that extends Turtle to serialize an entire RDF Dataset (a collection of named graphs and a default graph). TriX (Triples in XML) is an XML-based format for serializing RDF datasets.

  • Key Feature (TriG): Uses Turtle syntax with the addition of graph labels wrapped in curly braces { } to group triples. Provides a compact, readable way to exchange multi-graph data.
  • Example (TriG): ex:defaultTriple . GRAPH ex:Graph1 { ex:Alice ex:knows ex:Bob . }
  • Primary Use: Exchanging datasets with provenance, context, or access control information stored in named graphs.
DATA MODEL

RDF vs. Property Graph: A Comparison

A technical comparison of the two primary graph data models used in enterprise knowledge graphs, highlighting foundational differences in structure, semantics, and typical use cases.

FeatureRDF (Resource Description Framework)Property Graph (e.g., Neo4j, Gremlin)

Core Data Unit

Triple (Subject-Predicate-Object)

Node and Edge with Properties

Global Identity

URI (Uniform Resource Identifier)

Internal ID (often numeric)

Schema & Typing

External ontology (RDFS, OWL). Schema is data.

Optional labels and property keys. Schema is often implicit.

Edge Semantics

Edges are first-class predicates with global meaning (URIs).

Edges are typed relationships, often with local, application-specific semantics.

Property Location

Properties are triples (predicates). Objects can be literals or resources.

Properties are key-value pairs attached directly to nodes and edges.

Standard Query Language

SPARQL (W3C Standard)

Vendor-specific (Cypher, Gremlin). OpenCypher is a partial standard.

Inference & Reasoning

Native support via RDFS/OWL semantics and rule engines.

Typically requires external libraries or application logic.

Primary Use Case

Semantic Web, Linked Data, open-world integration, formal reasoning.

Network analysis, transactional applications, closed-world domain modeling.

RDF (RESOURCE DESCRIPTION FRAMEWORK)

Frequently Asked Questions

RDF (Resource Description Framework) is the foundational data model for the Semantic Web and enterprise knowledge graphs. It structures information as a graph of subject-predicate-object triples, enabling machines to understand and connect data across disparate sources. This FAQ addresses core technical concepts, practical applications, and its role in modern data architectures.

RDF (Resource Description Framework) is a standard data model for representing information as a directed graph composed of subject-predicate-object triples. It works by using URIs (Uniform Resource Identifiers) to uniquely identify resources and relationships, and literals for values like strings or numbers. Each triple forms a statement (e.g., <ex:Product123> <ex:hasManufacturer> <ex:CompanyXYZ>), and a collection of these triples creates a machine-readable graph. This model enables the unambiguous linking of data across different systems, forming the basis for Linked Data and semantic integration.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.