An RDF triple is the fundamental, indivisible statement in the Resource Description Framework (RDF), consisting of three components: a subject (the resource being described), a predicate (a property or relationship), and an object (the value or target resource). This structure forms a directed, labeled edge from subject to object, creating a machine-readable assertion. Collectively, interconnected triples form a directed graph that represents knowledge, enabling data integration and logical inference across disparate systems.
Glossary
RDF Triple

What is an RDF Triple?
The atomic unit of data in the Resource Description Framework (RDF) and the foundational building block of semantic knowledge graphs.
The power of the RDF model lies in its use of Uniform Resource Identifiers (URIs) to identify subjects and predicates, ensuring global uniqueness and enabling the Linked Data web. Objects can be either URIs (linking to other resources) or literal values like strings and numbers. This simple, universal data model allows diverse information to be connected into a cohesive knowledge graph, serving as the deterministic factual layer for reasoning systems and Retrieval-Augmented Generation (RAG) architectures.
The Three Components of an RDF Triple
An RDF triple is the fundamental, indivisible statement in the Resource Description Framework. It forms a directed edge in a knowledge graph, connecting two nodes with a labeled relationship.
Subject: The Resource Being Described
The subject is the first component of an RDF triple and represents the resource or entity about which a statement is made. It is always a URI (Uniform Resource Identifier) or a blank node. The subject is the starting point of the graph edge.
- URI Subjects: Provide a globally unique, dereferenceable identifier (e.g.,
http://example.org/person/Alice). - Blank Node Subjects: Represent an anonymous resource or a "something" that exists but doesn't need a global name (e.g.,
_:bnode1). - In a graph visualization, the subject is always the source node from which the relationship arrow originates.
Predicate: The Property or Relationship
The predicate is the second component and defines the type of relationship or property that links the subject to the object. It is always a URI, which ensures the relationship's meaning is unambiguous and defined in a shared vocabulary or ontology.
- Core Function: Acts as the labeled edge or arc in the graph.
- Standard Vocabularies: Predicates often come from well-known schemas like Dublin Core (
dc:creator), FOAF (foaf:knows), or Schema.org (schema:worksFor). - Custom Properties: Organizations define their own predicate URIs within their namespace to model domain-specific relationships (e.g.,
https://mycorp.com/ontology#manufacturedIn).
Object: The Value or Target Resource
The object is the third component and is the value of the property for the given subject. It can be one of two types:
- URI Object: Another named resource, creating a link between two nodes in the graph (e.g.,
http://example.org/city/London). This forms a relationship triple. - Literal Object: A raw data value, such as a string, number, or date (e.g.,
"Alice",42,"2023-10-27"^^xsd:date). This forms an attribute triple. Literals can have an optional datatype URI (e.g.,xsd:integer) or a language tag (e.g.,"Bonjour"@fr).
In the graph, a URI object is a target node, while a literal object is typically displayed as text attached to the subject node.
The Triple as a Complete Statement
When combined, the three components form a complete, machine-readable statement of fact. The structure (Subject, Predicate, Object) is analogous to the grammatical structure of a simple sentence: (Alice, worksFor, AcmeCorp) or (Alice, hasAge, "30"^^xsd:integer).
- Atomicity: The triple is the smallest unit of meaning in RDF; you cannot have a valid statement with fewer than three components.
- Mergeability: Triples from different sources can be merged into a single graph if they share URIs, enabling data integration.
- Example: The triple
<http://example.org/Book1> <http://purl.org/dc/terms/title> "Semantic Web Primer" .states a definitive fact that can be combined with other facts aboutBook1.
Serialization: How Triples Are Written
RDF triples can be written (serialized) in multiple concrete syntaxes while preserving the same logical model. Common formats include:
- Turtle (
.ttl): A compact, human-readable format using prefixes and shorthand. Example:ex:Book1 dc:title "Semantic Web Primer" . - N-Triples (
.nt): A simple, line-based format where every triple is fully written. One triple per line. Example:<http://example.org/Book1> <http://purl.org/dc/terms/title> "Semantic Web Primer" . - RDF/XML: An XML-based syntax, historically important but less readable.
- JSON-LD: Serializes RDF as JSON, ideal for web APIs.
Despite different syntaxes, the underlying triple structure of subject, predicate, and object remains constant.
From Triples to a Knowledge Graph
A collection of interconnected RDF triples forms a directed, labeled graph—the core of a knowledge graph. The power comes from linking subjects and objects via shared URIs.
- Graph Formation: If the object of one triple is the subject of another, they connect, creating a path. For example:
(ex:Alice, ex:worksFor, ex:AcmeCorp)and(ex:AcmeCorp, ex:locatedIn, ex:London). - Inference: New triples can be inferred from existing ones using rules (e.g., RDFS or OWL semantics). If a rule states
worksForis a subproperty ofassociatedWith, a reasoner can infer(ex:Alice, ex:associatedWith, ex:AcmeCorp). - Querying: The SPARQL query language is designed to match patterns across these interconnected triples, enabling powerful graph traversal queries.
How RDF Triples Form a Knowledge Graph
An RDF triple is the fundamental atomic data unit in the Resource Description Framework (RDF), consisting of a subject, predicate, and object. It is the basic building block from which all semantic knowledge graphs are constructed.
An RDF triple is a directed, labeled statement that asserts a single fact, structured as a subject-predicate-object relationship. The subject is a resource (identified by a URI), the predicate is 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, universal structure allows for the unambiguous representation of any piece of information, enabling machines to process and link data from diverse sources. Each triple forms a single edge in a larger graph, connecting two nodes.
A knowledge graph emerges from the aggregation of millions of interconnected RDF triples. The subjects and objects become the graph's nodes (entities), while the predicates form the labeled edges (relationships) connecting them. This creates a vast, machine-readable network of facts. The power of this model lies in its use of globally unique URIs for resources, which allows different datasets to refer to the same real-world entity, enabling automatic linking and integration. This interconnected web of triples forms a cohesive, queryable knowledge base that supports semantic search, reasoning, and advanced analytics.
RDF Triple Syntax Examples
An RDF triple is expressed in various concrete syntaxes for storage, transmission, and human readability. These examples illustrate how the same atomic fact is represented across different serialization formats.
Turtle (Terse RDF Triple Language)
Turtle is the predominant human-readable syntax for authoring RDF. It uses prefix declarations (like @prefix) to abbreviate URIs and supports shorthand for lists and nested blank nodes.
Example:
turtle@prefix ex: <http://example.org/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . ex:alice ex:hasAge "30"^^xsd:integer . ex:alice ex:knows ex:bob .
- The
@prefixlines define shortcuts for long URIs. - The
^^notation specifies a datatype for a literal. - A triple ends with a period.
N-Triples
N-Triples is a simple, line-based format where each triple is fully specified on a single line using absolute URIs. It is often used for dataset exchange and processing due to its lack of ambiguity.
Example:
ntriples<http://example.org/alice> <http://example.org/name> "Alice" . <http://example.org/alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Person> .
- Every URI is written in full, enclosed in angle brackets
<...>. - Literals are enclosed in double quotes.
- Each line contains exactly one triple and ends with a period and a newline.
RDF/XML
RDF/XML is the original W3C-standardized XML syntax for RDF. It represents triples as nested XML elements, which can be verbose but is processable by standard XML tools.
Example:
xml<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ex="http://example.org/"> <rdf:Description rdf:about="http://example.org/book1"> <ex:title>Semantic Web Primer</ex:title> <ex:author rdf:resource="http://example.org/author1"/> </rdf:Description> </rdf:RDF>
- The
rdf:Descriptionelement represents the subject. - Child elements like
ex:titlerepresent predicates, with their content orrdf:resourceattribute as the object. - Namespace declarations (
xmlns:...) define prefixes.
JSON-LD (JSON for Linked Data)
JSON-LD serializes RDF as JSON, making it easily consumable by web applications. It uses a context (@context) to map JSON terms to IRIs and defines the graph structure.
Example:
json{ "@context": { "ex": "http://example.org/", "name": "ex:name", "knows": {"@id": "ex:knows", "@type": "@id"} }, "@id": "ex:alice", "name": "Alice", "knows": { "@id": "ex:bob", "name": "Bob" } }
- The
@contextcompacts IRIs to simple keys like"name". - The
@idkeyword denotes a subject or object resource. - The
"@type": "@id"hint in the context indicates"knows"expects a resource object, not a literal.
SPARQL Query Results (SELECT & CONSTRUCT)
SPARQL queries return triples or bindings that represent matched graph patterns. The SELECT form returns variable bindings, while CONSTRUCT returns new RDF triples.
Example SELECT Results (JSON):
json{ "head": {"vars": ["person", "age"]}, "results": { "bindings": [ { "person": {"type": "uri", "value": "http://example.org/alice"}, "age": {"type": "literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "30"} } ] } }
Example CONSTRUCT Output (Turtle): A CONSTRUCT { ?s ex:isAdult true . } WHERE { ?s ex:age ?age . FILTER(?age >= 18) } query would generate new triples like ex:alice ex:isAdult true .
RDF-star for Statement-Level Metadata
RDF-star extends RDF syntax to allow triples themselves to be the subject or object of another triple, enabling native representation of provenance, confidence, or temporal context.
Example in Turtle-star:
turtle@prefix ex: <http://example.org/> . @prefix prov: <http://www.w3.org/ns/prov#> . << ex:alice ex:reported ex:incident123 >> prov:generatedAtTime "2024-01-15T10:30:00Z"^^xsd:dateTime . << ex:alice ex:reported ex:incident123 >> prov:wasDerivedFrom <http://internal.log/alert445> .
- The
<< ... >>syntax embeds a triple, making it a node that can be described. - This allows attaching metadata (like source and timestamp) directly to a factual assertion without redesigning the ontology.
RDF Triple Model vs. Property Graph Model
A comparison of the two primary graph data models used in enterprise knowledge graphs, highlighting their core architectural differences, query paradigms, and typical use cases.
| Feature / Characteristic | RDF Triple Model (Semantic Web Stack) | Property Graph Model (Labeled Property Graph) |
|---|---|---|
Atomic Data Unit | Triple (Subject-Predicate-Object) | Node and Relationship with Properties |
Global Identifier System | Mandatory: IRIs (Internationalized Resource Identifiers) | Optional: Internal IDs are typical; IRIs can be stored as properties |
Schema & Typing Mechanism | External Ontology (RDFS, OWL) defines classes and properties | Internal Labels (on nodes) and Relationship Types define schema |
Property Attachment | Properties are predicates connecting two resources or a resource to a literal. No properties on properties. | Properties (key-value pairs) can be attached directly to both Nodes and Relationships. |
Standard Query Language | SPARQL (W3C Standard) | Cypher (openCypher), Gremlin (Apache TinkerPop), GQL (upcoming ISO standard) |
Primary Reasoning Capability | Native support for logical inference via RDFS/OWL semantics and rule engines. | Primarily navigational; reasoning must be implemented via application logic or external libraries. |
Standard Serialization Formats | Turtle, RDF/XML, JSON-LD, N-Triples (W3C Standards) | No single universal standard; vendor-specific or generic formats like GraphML, CSV. |
Open World Assumption (OWA) | Yes. Absence of a fact does not imply it is false. | Typically No. Operates under a Closed World Assumption for practical querying. |
Typical Database System | Triplestore (e.g., Stardog, Ontotext GraphDB, Amazon Neptune with SPARQL) | Native Graph Database (e.g., Neo4j, Amazon Neptune with Gremlin, Memgraph) |
Metamodeling (Statements about Statements) | Requires reification or RDF-star (RDF*) for native support. | Native support via relationship properties (e.g., annotating a relationship with a confidence score). |
Interoperability & Federation | Designed for it. URIs enable global data linking; SPARQL supports federated queries across endpoints. | Federation is possible but more challenging; relies on aligning internal IDs or property values across systems. |
Primary Enterprise Use Case | Semantic integration, linked data, ontology-driven applications, regulatory compliance with rich taxonomies. | Network analysis, fraud detection, real-time recommendation engines, master data management with flexible schemas. |
Frequently Asked Questions
An RDF triple is the fundamental atomic data unit in the Resource Description Framework (RDF). This FAQ addresses common questions about its structure, purpose, and role in semantic technologies and enterprise knowledge graphs.
An RDF triple is the fundamental, indivisible unit of data in the Resource Description Framework (RDF), consisting of three components: a subject, a predicate, and an object. It forms a directed, labeled edge in a graph, where the subject is a node, the predicate is the edge's label defining the relationship, and the object is the target node or a literal value. This structure allows for the precise, machine-readable representation of facts as simple statements, such as <Company> <hasCEO> <JohnDoe> or <Product123> <price> "99.99"^^xsd:decimal. The collection of interconnected triples forms an RDF graph, which is the foundational data layer for the Semantic Web and enterprise knowledge graphs.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
An RDF triple is the fundamental atomic unit of the RDF data model. Understanding its components and related standards is essential for building interoperable semantic data layers.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us