Skip to content

Getting Started

Semantica is the context and intelligence layer for AI — turning raw data into explainable, auditable knowledge graphs for high-stakes domains.

Just here for code?

Jump straight to the Quick Start or explore the Cookbook for interactive notebooks.


What You Can Build

  • GraphRAG Systems — enhanced retrieval with semantic graph reasoning
  • AI Agents — accountable agents with structured decision history and memory
  • Knowledge Graphs — production-ready semantic knowledge bases
  • Compliance-Ready AI — auditable systems with full W3C PROV-O provenance

Installation

pip install semantica

With all optional dependencies:

pip install semantica[all]

Verify:

import semantica
print(semantica.__version__)

Quick Start

from semantica.context import AgentContext, ContextGraph
from semantica.vector_store import VectorStore

context = AgentContext(
    vector_store=VectorStore(backend="inmemory"),
    knowledge_graph=ContextGraph(advanced_analytics=True),
    decision_tracking=True,
)

# Store a memory
context.store("GPT-4 outperforms GPT-3.5 on reasoning benchmarks by 40%")

# Record a decision
decision_id = context.record_decision(
    category="model_selection",
    scenario="Choose LLM for production pipeline",
    reasoning="GPT-4 benchmark advantage justifies cost increase",
    outcome="selected_gpt4",
    confidence=0.91,
)

# Find similar past decisions
precedents = context.find_precedents("model selection", limit=5)

Core Architecture

Semantica uses a modular, layered architecture — import only what you need.

Layer Modules Purpose
Input ingest, parse, split, normalize Load and prepare data
Semantic semantic_extract, kg, ontology, reasoning Extract meaning
Storage embeddings, vector_store, graph_store Persist knowledge
Quality deduplication, conflicts Validate and clean
Context context, provenance, change_management Track decisions and lineage
Output export, visualization, pipeline Deliver results

Next Steps


Help