跪拜 Guibai
← All articles
Agent · Python · GitHub

Semantica Maps AI Decisions to a Graph So You Can Finally Ask 'Why'

By 苏灿烤鱼 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Agent frameworks are shipping decisions into production, but most leave behind only a log line. Semantica makes the decision chain a queryable graph with provenance and deterministic rules, giving compliance and platform teams an auditable alternative to black-box reasoning.

Summary

Semantica sits beneath LLMs and agent frameworks, ingesting data from files, databases, and enterprise platforms to build a knowledge graph. It treats AI decisions as first-class graph nodes, linking them to context, causal relationships, and W3C PROV-O provenance records. The system provides deterministic reasoning through Rete, Datalog, and SPARQL, and explicitly does not require an LLM for graph construction or inference.

Version 0.6.0 added Databricks and SQLite connectors, fixed seven correctness bugs in provenance tracking and rule reasoning, and patched a silent write failure for remote Fuseki stores. The release also brought named graph and CONSTRUCT query parity across Blazegraph, RDF4J, and Jena backends, signaling that cross-backend consistency is an active engineering concern.

The project targets regulated teams that cannot ship data to third-party SaaS and need an open-source, self-hosted way to answer why an agent made a specific decision. The trade-off is real: a broad surface area spanning ingestion, conflict detection, deduplication, four reasoning engines, and multiple storage backends, all still pre-1.0 with no published benchmarks.

Takeaways
Semantica records AI decisions as graph nodes with causal links, provenance, and policy checks, exportable as W3C PROV-O, CSV, or JSON.
Graph construction, reasoning, and provenance tracking run without an LLM, using Rete, Datalog, and SPARQL for deterministic inference.
v0.6.0 fixed seven correctness bugs in provenance tracking and rule reasoning, plus a silent write failure for remote Fuseki stores.
Named graph and CONSTRUCT query parity was added across Blazegraph, RDF4J, and Jena backends, showing cross-backend consistency is still being patched.
The project supports RDF stores (Oxigraph, Blazegraph, Jena, RDF4J), LPG stores (Neo4j, FalkorDB, AGE, Neptune), and vector stores, all replaceable without changing business code.
Databricks and SQLite connectors were added in v0.6.0, with Unity Catalog, Delta Lake, PAT, OAuth M2M, and table- and column-level lineage support.
The repository gained 967 stars in a single day, reaching #1 on GitHub Trending with 4,030 total stars.
53 open issues remain, and the project is still pre-1.0 with no published stability guarantees, benchmarks, or production SLAs.
Conclusions

The spike to 967 stars in one day suggests a market hungry for AI auditability, but the project's pre-1.0 version number and broad scope mean early adopters are signing up for integration work, not a finished product.

Decoupling graph construction and reasoning from the LLM is a deliberate architectural choice that avoids embedding model drift inside the audit trail, but it also means the graph's quality depends entirely on the deterministic extraction and resolution pipelines.

Cross-backend consistency is not a feature flag; v0.6.0's named graph and CONSTRUCT parity work shows that 'replaceable backends' is a promise that requires continuous, test-heavy engineering to keep.

Fixing a silent write failure in a provenance system is a self-referential warning: if the tool that records evidence can lose writes without error, the evidence chain itself is only as reliable as the regression suite.

Concepts & terms
W3C PROV-O
A W3C ontology for representing provenance information — who generated a piece of data, what process produced it, and which entities it was derived from. Semantica uses it to export auditable decision trails.
Rete Network
A pattern-matching algorithm for rule-based systems that builds a directed acyclic graph of conditions. It enables efficient forward-chaining inference, letting Semantica fire rules without an LLM.
SHACL
Shapes Constraint Language, a W3C standard for validating RDF graphs against a set of conditions. Semantica uses it to enforce policy gates and compliance rules on the knowledge graph.
Named Graph
An RDF concept that groups triples under a URI, effectively partitioning a graph into sub-graphs. Semantica's v0.6.0 release focused on making named graph queries work consistently across different SPARQL backends.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗