Logging final AI outputs rarely makes it easy to trace which source facts and intermediate rules produced a conclusion weeks later. Semantica is an open-source Python framework that links facts and decisions inside a knowledge graph so teams can query why a specific outcome happened.

Recording Decisions Inside the Graph

According to the Semantica repository , the pipeline ingests documents and structured data, extracts entities and relations, and writes decisions as first-class graph nodes via record_decision(), linking upstream causes to downstream effects. Teams can later query precedent decisions or traverse causal chains.

Lineage metadata exports cleanly to W3C PROV-O, while rule-based inference supports Rete, Datalog, and SPARQL queries. Graph construction and deterministic reasoning run without an LLM, and optional connectors plug into existing models or agent frameworks when needed.

Validate Reasoning Against Real Domain Rules

The repository notes that pattern matching inside ReteEngine is currently simplified. Before wiring Semantica into compliance or production policy gates, teams should test match_patterns() against their real rule sets. Provenance tracking guarantees an audit trail, not automatic correctness of the inference rules themselves.

Summary

  • Models facts, AI decisions, and causal chains inside an open-source knowledge graph
  • Exports lineage metadata in W3C PROV-O format and supports Rete, Datalog, and SPARQL queries
  • Ships with simplified ReteEngine condition matching today, requiring validation on real business rules before production use