Knowledge Representation Formats
debt(d8/e7/b7/t7)
Closest to 'silent in production until users hit it' (d9), pulled to d8 because detection_hints.automated is 'no' and the only signal is a regex code_pattern matching @context/rdf:/owl:. Missing IRIs or a broken @context produce JSON that looks valid and parses fine; the absence of resolvable semantics stays silent until another consumer tries to merge or reason over the data.
Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix ('adopt RDF triples with IRIs and a standard vocabulary, serialize as JSON-LD/Turtle with explicit @context') is not a one-line swap — replacing ad-hoc JSON or table rows with an IRI-based model touches every emission point and consumer, redefining the data shape across the integration surface.
Closest to 'strong gravitational pull' (b7). applies_to spans library/web/node and the choice of representation model (and which vocabularies) is load-bearing: every downstream query, link, and reasoning step is shaped by it. Choosing OWL DL vs lightweight RDFS, or private predicates vs schema.org, propagates through the whole graph and is costly to reverse.
Closest to 'serious trap' (t7). The misconception is that any JSON or database table already represents knowledge so a dedicated format is redundant; common_mistakes show developers emitting JSON-LD without @context or confusing the abstract RDF model with a single serialization — the 'obvious' record-based mental model contradicts how linked-data semantics actually work.
Also Known As
TL;DR
Explanation
Knowledge representation formats are the standardized syntaxes and data models used to encode facts, entities, relationships, and the rules that govern them in a machine-readable, semantically explicit way. In the semantic web and linked data world the foundation is RDF (Resource Description Framework), which models everything as triples of subject-predicate-object, where each part is identified by a globally unique IRI so that statements from different sources can be merged unambiguously. RDF is an abstract data model with several concrete serializations: Turtle and N-Triples for compact human-readable text, RDF/XML for legacy XML toolchains, and JSON-LD for embedding linked data in ordinary JSON so web APIs and search engines can consume it.
Layered on top of RDF are vocabularies and schema languages. RDFS adds lightweight class and property hierarchies, while OWL (Web Ontology Language) adds rich logical constructs - cardinality, disjointness, transitivity, equivalence - that let reasoners infer new facts and detect contradictions. SKOS encodes taxonomies and controlled vocabularies. SPARQL is the query language that traverses these graphs. Together these formats make data self-describing: a triple does not just say a value, it says what relationship the value participates in, anchored to a shared ontology.
The distinguishing value of these formats over plain database rows or JSON documents is global identity and merge-ability. Because every entity and predicate is an IRI, two datasets published independently can be linked into one graph without a central schema authority, which is the entire premise of linked open data and projects like Wikidata, DBpedia, and schema.org. JSON-LD in particular powers structured data for search engines, letting a page declare that a string is a Person, an Event, or a Product in a globally agreed vocabulary.
The common failure modes are using bare strings instead of IRIs (destroying linkability), inventing private predicates when a standard vocabulary exists (fragmenting the graph), conflating the abstract RDF model with one serialization, and over-reaching into OWL's expressive logic when a simple RDFS hierarchy would do, which makes reasoning expensive or undecidable. Chosen well, these formats turn isolated data into a connected, queryable, inference-capable knowledge graph.
Common Misconception
Why It Matters
Common Mistakes
- Using bare string literals where an IRI is required, so entities cannot be linked across datasets or dereferenced.
- Inventing private predicates instead of reusing standard vocabularies like schema.org, Dublin Core, or FOAF, fragmenting the graph.
- Confusing the abstract RDF data model with a single serialization, treating Turtle or RDF/XML as if it were the model itself.
- Reaching for full OWL DL logic when a lightweight RDFS hierarchy suffices, making reasoning slow or undecidable.
- Emitting JSON-LD without a proper @context, producing JSON that looks linked but carries no resolvable semantics.
Avoid When
- Data stays inside one application with no need to link or merge across independently published sources.
- A relational or document store with simple keys fully meets the query needs and semantic interoperability is not a goal.
- The team lacks the tooling and expertise to maintain ontologies, and the overhead outweighs the linking benefit.
- Latency-critical paths cannot afford triple-store or reasoner overhead for what is essentially flat lookup data.
When To Use
- Building or contributing to a knowledge graph that must merge entities from many independent datasets.
- Publishing linked open data or structured data for search engines via JSON-LD and schema.org.
- Modeling a domain where explicit ontologies and automated reasoning over relationships add real value.
- Integrating heterogeneous sources where global IRIs avoid the need for a single central schema authority.
Code Examples
// Plain JSON: looks structured but is not linked data.
// 'author' is a bare string, 'type' is a private label, nothing is
// globally identified, so this cannot merge with any other dataset.
const record = {
"id": 42,
"type": "article",
"title": "Linked Data Basics",
"author": "Ada Lovelace"
// who is this Ada? no IRI, no vocabulary, no way to dereference
};
console.log(JSON.stringify(record));
// JSON-LD: same data, but self-describing and linkable.
// @context maps terms to a shared vocabulary; entities are IRIs
// so a reasoner or search engine can resolve and merge them.
const record = {
"@context": "https://schema.org/",
"@type": "Article",
"@id": "https://example.org/articles/42",
"headline": "Linked Data Basics",
"author": {
"@type": "Person",
"@id": "https://www.wikidata.org/entity/Q7259",
"name": "Ada Lovelace"
}
};
console.log(JSON.stringify(record));
// Now 'author' points at a globally agreed Wikidata entity, so this
// document joins the wider linked-data graph instead of being a silo.