v0.6.8: cryptographically signed releases (SLSA provenance + Sigstore), real vector-store enumeration across FAISS/Qdrant/Weaviate/Milvus, and first-class Anthropic/Gemini/Ollama/DeepSeek/Novita LLM provider wrappers. What’s new →
This guide walks you through the end-to-end pipeline for building your first knowledge graph. Start here after installation. An LLM API key is optional: pattern-based extraction works out of the box.

Install

Verify:

Full Pipeline

Semantica end-to-end pipeline: Ingest → Parse → Normalize → Extract → Build KG → QA → Store → Deliver
1

Ingest

Load a document from a file or directory. The rest of this walkthrough follows the file path; other sources are shown afterwards.
Other sources. WebIngestor().ingest_url(url) returns a WebContent whose .text you can feed straight into the Extract step (no parsing needed). ParquetIngestor().ingest(path) and XMLIngestor().ingest(path, schema_path=...) return structured records rather than documents; build a graph from those with GraphBuilder().build({"entities": [...], "relationships": [...]}) directly.
2

Parse

Extract structured text and layout from raw documents.
parse() returns a dict. full_text and metadata are present for every format; other keys depend on the parser (pages for PDF, tables and paragraphs for DOCX, tables for DoclingParser).
For PDFs with tables, charts, or multi-column layouts, use DoclingParser (pip install semantica[parse-docling]): it applies advanced layout analysis and returns structured table data alongside text.
3

Extract Entities & Relationships

Identify named entities and extract typed relationships between them.
4

Build the Knowledge Graph

Assemble extracted entities and relationships into a queryable knowledge graph.
merge_entities=True automatically resolves duplicate entity references: “Apple”, “Apple Inc.”, “AAPL”: using semantic similarity. No manual deduplication needed.
5

Visualize

Render an interactive, zoomable knowledge graph in the browser.
Open graph.html in any browser: pan, zoom, click nodes for details, filter by entity type.
6

Export

Export to any downstream format.

Add Decision Intelligence

Track every agent decision with full causal chains and provenance: one extra import:

Common Patterns

Troubleshooting

The document likely contains scanned images rather than machine-readable text. DocumentParser warns when a PDF has no text layer; switch to DoclingParser with OCR enabled:
Install the GPU extras so embedding and ML inference run on CUDA:
Scan the directory for paths first (no file contents are read), then handle one document at a time and write to a persistent graph backend instead of the in-memory graph:
For multi-step orchestration with configurable parallelism, see the Pipeline guide.
Switch from in-memory NetworkX to a persistent backend:
Fixed in v0.5.0. Upgrade:

Next Steps

  • Core Concepts: knowledge graphs, ontologies, and reasoning engines (the mental model behind Semantica).
  • Module Reference: every module explained with key classes and common chains.
  • API Reference: complete documentation for every module, class, and parameter.
  • Cookbook: 40+ interactive Jupyter notebooks with real-world datasets.