Holons, Context Graphs, and Ontologies
Learn how context graphs provide the three-layer architecture that enables trustworthy, explainable AI through systems of intelligence, records, and temporal feedback.
The era of LLMs has introduced a paradigm shift in how we interact with information. Yet, anyone who has used a standard RAG pipeline knows its limitations: isolated chunks of text, lost relational context, and the occasional confident hallucination.
TrustGraph was built to solve this. By moving beyond flat vector embeddings and embracing a true graph-based architecture, TrustGraph structures knowledge the way the human mind does—relationally and contextually. Crucially, TrustGraph does not reinvent the wheel; it builds upon decades of proven knowledge representation by adhering to W3C Semantic Web standards.
To understand how TrustGraph achieves explainable, highly accurate AI, we need to explore three foundational concepts that power its architecture—Ontologies, Holons, and Context Graphs—and how standards like RDF, OWL, SKOS, and SHACL make them robust.
Ontologies: The Structural Blueprint
If a knowledge graph is a city, the ontology is the zoning law and map legend. It defines the rules of the road, the types of buildings that exist, and how they connect.
In TrustGraph, an Ontology is the formal representation of a domain of knowledge. Before an LLM can extract knowledge from a document, it needs to understand the schema it is populating. Standard RAG systems treat text as a bag of words; TrustGraph, guided by a formal ontology, treats text as a source of structured data.
To ensure semantic rigor, TrustGraph leverages industry-standard Semantic Web technologies:
- OWL (Web Ontology Language): TrustGraph uses OWL to define the classes, properties, and relationships within a domain. OWL allows the system to express complex logic—such as hierarchical classes and property restrictions—giving the LLM a strict blueprint to follow when extracting entities and edges.
- SKOS (Simple Knowledge Organization System): For organizing controlled vocabularies, taxonomies, and thesauri, TrustGraph utilizes SKOS. This allows the graph to represent conceptual hierarchies and synonyms, ensuring that an LLM knows "AI" and "Artificial Intelligence" refer to the same underlying concept.
- SHACL (Shapes Constraint Language): An ontology is only as good as its enforcement. TrustGraph uses SHACL to validate the data extracted by the LLM. SHACL defines "shapes" that the data must conform to. If the LLM attempts to extract a relationship that violates the ontology's rules, SHACL catches it, ensuring the knowledge graph remains structurally sound and free of malformed data.
By enforcing ontologies through OWL, SKOS, and SHACL, TrustGraph ensures that extracted knowledge is standardized, queryable, and semantically rigorous.
Holons: Autonomous Yet Connected Knowledge
The concept of a holon originates from philosopher Arthur Koestler. A holon is something that is simultaneously a whole in itself and a part of a larger whole. Think of a cell: it is a complete, functioning organism on its own, but it is also a fundamental building block of a larger organ.
In TrustGraph, a holon represents a self-contained unit of extracted meaning. When TrustGraph processes a document, it doesn't just dump raw text into a database. It extracts semantic triples (Subject-Predicate-Object) and the surrounding context, packaging them into holons.
At the core of this process is the RDF (Resource Description Framework) data model. All knowledge in TrustGraph is stored as RDF triples. However, standard RDF triples alone do not capture the full context of where or how a fact was stated. To solve this, TrustGraph utilizes RDF 1.2 (RDF-star) for graph reification.
RDF 1.2 allows TrustGraph to make statements about statements. Instead of losing the connection between a fact and its source, the system can nest the extracted triple inside a "Holon" node.
A knowledge holon in TrustGraph has two defining characteristics enabled by this architecture:
- Autonomy: Using RDF 1.2 reification, a Holon contains a complete piece of information along with its metadata. It packages the triple ("The Eiffel Tower is located in Paris") with its provenance (the source document), chunk reference, and confidence score. It is coherent and self-describing on its own.
- Cooperation: The Holon is explicitly linked to the global RDF graph. The "Eiffel Tower" Holon connects to the "Paris" Holon, which connects to "France." Because knowledge is stored as reified RDF Holons, TrustGraph preserves the local, granular meaning of individual facts while simultaneously participating in the macro-structure of the global Knowledge Graph.
Context Graphs: The Engine of GraphRAG
Traditional RAG retrieves isolated "chunks" of a document. The LLM is handed a few paragraphs and asked to synthesize an answer. Often, the critical relationship connecting those paragraphs is lost because it existed between the chunks.
TrustGraph solves this using Context Graphs. When a user asks a question, TrustGraph doesn't just retrieve text; it traverses the RDF Knowledge Graph, hopping from holon to holon via the relationships defined by the OWL ontology.
The result of this traversal is a Context Graph — a bespoke, temporary subgraph constructed specifically to answer the user's query.
How Context Graphs Transform Generation:
- Relational Accuracy: If you ask, "Who are the competitors of the company that acquired Startup X?", standard RAG might fail if the acquisition and the competitor list are in different documents. TrustGraph traverses from Startup X -> acquired_by -> Company Y -> competitor_of -> Company Z. The Context Graph supplies this exact path to the LLM.
- Explainability: Because the Context Graph is a structured map of RDF nodes and edges, you can trace exactly why the LLM generated its answer. You can visually inspect the path the system took to arrive at its conclusion, and because of RDF 1.2 reification, you can see the exact source documents that contributed to each step in the path.
- Reduced Hallucinations: By feeding the LLM a structured Context Graph rather than loose text fragments, the model is constrained by explicit relational facts. It acts as a synthesizer of the graph rather than a creative writer filling in the blanks.
The Synergy: Putting It All Together
TrustGraph's power emerges from the interplay of these three concepts, grounded in Semantic Web standards.
The Ontology (defined in OWL and SKOS, enforced by SHACL) provides the rules and structure, acting as the grammatical blueprint for the universe of data. As unstructured data flows into the system, the LLM extracts facts and packages them into Holons using the RDF 1.2 data model—discrete, meaningful units of knowledge that carry their own context and provenance. When a query is initiated, these holons are dynamically traversed and assembled into a Context Graph, providing the LLM with a rich, relationally accurate, and explainable map of the answer space.
By structuring AI knowledge this way, TrustGraph moves beyond the fragile guesswork of traditional RAG. It creates a system where AI doesn't just "read" documents, but truly understands the interconnected web of information within them. Start building with TrustGraph on GitHub today.