mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
Fixes #433 - ContextGraph.add_decision() now accepts keyword arguments (category, scenario, reasoning, outcome, confidence, entities, decision_maker) in addition to a Decision object, matching documented behaviour. Both call forms return the decision ID string. - Quickstart snippets in README, getting-started.md, and index.md changed from VectorStore(backend="faiss") to VectorStore(backend="inmemory") so they work without faiss-cpu installed. - docs/reference/context.md methods table updated to reflect the dual signature of add_decision(). - docs/bugs/quickstart_api_mismatch.md added to track the issue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.8 KiB
2.8 KiB
Getting Started
Semantica is the context and intelligence layer for AI — turning raw data into explainable, auditable knowledge graphs for high-stakes domains.
!!! tip "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
- Core Concepts — knowledge graphs, ontologies, reasoning explained
- Quickstart Tutorial — build a full pipeline step by step
- Cookbook — 14 domain-specific Jupyter notebook tutorials
- API Reference — complete module documentation
Help
- Discord Community — ask questions, share projects
- GitHub Issues — report bugs or request features
- FAQ — common questions answered