GitHub - semantica-agi/semantica: Graph-Native Infrastructure for Context and Accountable AI Systems
Key Points
- 1Semantica provides an open-source, deterministic infrastructure layer that integrates with LLMs and agent frameworks to build queryable context graphs and knowledge graphs from enterprise data.
- 2The platform enhances AI accountability by recording every decision as a first-class, traceable object with full W3C PROV-O provenance, enabling transparent audit trails for highly regulated industries.
- 3By offering polyglot graph storage, robust conflict detection, and logical reasoning engines, Semantica enables explainable, rule-based inference without relying on black-box LLM processes.
Semantica is an open-source, deterministic infrastructure layer designed for building context-aware, accountable, and explainable AI systems. Positioned as an "Open Source Palantir for AI Agents," it provides the necessary tooling for regulated domains (finance, healthcare, defense, legal) to manage knowledge graphs (KGs), decision intelligence, and provenance, moving beyond the opaque, non-deterministic nature of traditional RAG (Retrieval-Augmented Generation) and black-box LLM systems.
Core Methodology and Technical Architecture
The framework operates as a modular, polyglot pipeline that processes raw data into a governed Context Graph. The methodology focuses on four key pillars:1. Context Graph Construction and Ingestion
Semantica implements a sophisticated ingestion pipeline that extracts structured knowledge from unstructured data. Using the semantica.semantic_extract module, it performs Named Entity Recognition (NER), relation extraction, and event detection to generate triplets. It employs semantica.split for GraphRAG-native chunking, utilizing entity_aware and relation_aware strategies to ensure that entity boundaries and semantic triplets remain intact during processing. A critical differentiator is the Conflict Detection and Deduplication layer, which flags contradictory facts across heterogeneous sources before they are persisted, preventing the "silent overwrite" issues common in vector-only RAG.
2. Decision Intelligence and Provenance
The platform treats every AI decision as a first-class graph node. Each decision is recorded via record_decision() and stored with causal linkages (e.g., CAUSED, INFLUENCED, PRECEDENT_FOR). This allows for full causal tracing:
- Decision Chain Traceability: Queries such as provide the causal ancestry of a specific action.
- W3C PROV-O Lineage: Every fact and decision is instrumented with W3C PROV-O standard metadata, ensuring that the provenance is exportable and regulator-compliant.
3. Deterministic Reasoning Engine
Unlike LLM-based reasoning, Semantica employs explicit logical engines that provide explainable outcomes:
- Rete/Datalog: The framework utilizes a
ReteEnginefor forward chaining and aDatalogReasonerfor recursive logical queries. Rules are defined as implications, such as , where and are conditions extracted from the KG. - Explainable Paths: By using an
ExplanationGenerator, the system provides a structured justification of the reasoning steps taken, mapping logical conclusions back to the specific source facts in the KG.
4. Storage and Interoperability
The storage layer is "polyglot by design," supporting:
- RDF/Triple Stores: Including Oxigraph, Blazegraph, and Apache Jena.
- Labeled Property Graphs (LPG): Including Neo4j, FalkorDB, and AWS Neptune.
- Vector Integration: Supports multiple backends (FAISS, Qdrant, Milvus) for hybrid search capabilities, enabling a fusion of semantic similarity with deterministic graph traversal.