Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

docs: address review feedback across 7 modules

KaifAhmad1850f47625f7a
diff --git a/docs/cli-setup.md b/docs/cli-setup.md
index 70dce7ae..b139b1d7 100644
--- a/docs/cli-setup.md
+++ b/docs/cli-setup.md
@@ -54,7 +54,7 @@ python -c "import semantica; print(semantica.__version__)"
Starts the REST API server. Binds to `0.0.0.0:8000`. Use this when another service or application needs programmatic access to Semantica over HTTP.
</Card>
<Card title="semantica-worker" icon="gears">
- Background worker process entry point for Semantica deployments. Use alongside `semantica-server` for async task processing.
+ Background task processor. Run alongside `semantica-server` when you need async pipeline execution outside the request cycle. Start the server first, then start one or more workers pointing at the same backend.
</Card>
<Card title="semantica-explorer" icon="map">
Launches the browser dashboard. Requires `pip install semantica[explorer]`. Use this to explore a saved knowledge graph interactively. See [Explorer Setup](explorer-setup).
diff --git a/docs/explorer-setup.md b/docs/explorer-setup.md
index bdf9e43e..47195ac4 100644
--- a/docs/explorer-setup.md
+++ b/docs/explorer-setup.md
@@ -125,7 +125,7 @@ The startup sequence prints:
╰───────────────────────────────────────────────╯
```
-The browser opens automatically at `http://127.0.0.1:8000` approximately 1.5 seconds after the server starts.
+The browser opens automatically at `http://127.0.0.1:8000` shortly after the server starts.
## CLI Flags
@@ -170,7 +170,7 @@ Once the server is running:
| `http://127.0.0.1:8000/docs` | Swagger UI — every REST endpoint, interactive |
| `http://127.0.0.1:8000/api/health` | Health check — `{"status": "healthy"}` |
-The browser tab opens 1.5 seconds after startup. If it does not open, navigate to the URL manually or pass `--no-browser` and open it yourself.
+The browser tab opens shortly after startup. If it does not open, navigate to the URL manually or pass `--no-browser` and open it yourself.
## Running as a Python Module
diff --git a/docs/reference/ingest.md b/docs/reference/ingest.md
index b2e75404..af1133bc 100644
--- a/docs/reference/ingest.md
+++ b/docs/reference/ingest.md
@@ -159,6 +159,10 @@ result = ingest("ontology.ttl") # -> {"ontology": OntologyData}
Supported formats: PDF, DOCX, TXT, HTML, JSON, CSV, Excel (XLSX/XLS), PPTX, ZIP/TAR archives.
+ <Note>
+ Glob patterns (e.g. `"data/**/*.docx"`) are **not** supported. `ingest()` accepts a file path or a directory path only. To filter by extension inside a directory, use `ingest_directory()` with the `pattern=` filter option.
+ </Note>
+
### ParquetIngestor
PyArrow-based ingestion for Apache Parquet files, including Hive-style partitioned datasets:
diff --git a/docs/reference/llms.md b/docs/reference/llms.md
index 86946a52..8caaf25e 100644
--- a/docs/reference/llms.md
+++ b/docs/reference/llms.md
@@ -38,7 +38,7 @@ Use this decision matrix to select the right LLM provider for your use case:
| Priority | Recommended Provider | Model | Why |
|----------|---------------------|-------|-----|
| **Getting Started** | Groq | `llama-3.1-8b-instant` | Free tier, fast inference, no complex setup |
-| **Production Quality** | OpenAI | `gpt-3.5-turbo` | Reliable, battle-tested, extensive documentation |
+| **Production Quality** | OpenAI | `gpt-4o` | Highest capability, function calling, JSON mode |
| **Cost Optimization** | LiteLLM + DeepSeek | `deepseek/deepseek-chat` | Lowest cost per token for high-volume workloads |
| **Privacy/On-Premise** | Ollama (via LiteLLM) | `ollama/llama3.2:3b` | Fully local, no data leaves your infrastructure |
| **Advanced Reasoning** | Anthropic Claude (via LiteLLM) | `anthropic/claude-sonnet-4-20250514` | Highest quality for complex analysis |
@@ -127,7 +127,7 @@ import os
from semantica.llms import Groq
llm = Groq(
- model="llama-3.1-8b-instant", # default
+ model="llama-3.3-70b-versatile", # recommended; implementation default: llama-3.1-8b-instant
api_key=os.getenv("GROQ_API_KEY"),
max_tokens=64000,
temperature=0.0,
@@ -140,7 +140,7 @@ import os
from semantica.llms import OpenAI
llm = OpenAI(
- model="gpt-3.5-turbo",
+ model="gpt-4o", # recommended; implementation default: gpt-3.5-turbo
api_key=os.getenv("OPENAI_API_KEY"),
temperature=0.0,
)
@@ -245,7 +245,7 @@ import os
from semantica.semantic_extract import NERExtractor, RelationExtractor, TripletExtractor
from semantica.llms import Groq
-llm = Groq(model="llama-3.1-8b-instant", api_key=os.getenv("GROQ_API_KEY"))
+llm = Groq(model="llama-3.3-70b-versatile", api_key=os.getenv("GROQ_API_KEY"))
ner = NERExtractor(method="llm", llm_provider=llm, max_retries=3)
rel = RelationExtractor(method="llm", llm_provider=llm)
@@ -276,13 +276,13 @@ Documentation examples may showcase stronger models for better developer experie
**Verified Implementation Defaults:**
-| Provider | Default Model | Reasoning |
-|----------|---------------|-----------|
-| `Groq` | `llama-3.1-8b-instant` | Fast inference, generous free tier |
-| `OpenAI` | `gpt-3.5-turbo` | Stable, widely supported, cost-effective |
-| `HuggingFaceLLM` | `gpt2` | Lightweight, widely compatible default |
+| Provider | Default Model | Notes |
+|----------|---------------|-------|
+| `Groq` | `llama-3.1-8b-instant` | Implementation default; examples use `llama-3.3-70b-versatile` for showcase |
+| `OpenAI` | `gpt-3.5-turbo` | Implementation default; examples use `gpt-4o` for showcase |
+| `HuggingFaceLLM` | `gpt2` | Lightweight, widely compatible |
-These defaults are chosen for stability and broad compatibility. Examples throughout this documentation may use different models to demonstrate capabilities, but when you initialize providers without specifying a model, you'll get these proven defaults.
+These are the models used when you construct a provider without specifying `model=`. Examples throughout this documentation use stronger showcase models. Always pass `model=` explicitly in production for reproducible results.
**Why This Matters:**
- Reproducible extraction results across environments
@@ -298,7 +298,7 @@ import os
from semantica.semantic_extract import NERExtractor
from semantica.llms import Groq
-llm = Groq(model="llama-3.1-8b-instant", api_key=os.getenv("GROQ_API_KEY"))
+llm = Groq(model="llama-3.3-70b-versatile", api_key=os.getenv("GROQ_API_KEY"))
ner = NERExtractor(method="llm", llm_provider=llm, max_retries=3)
# Process multiple texts with automatic retries
@@ -316,8 +316,8 @@ for text in texts:
| Use Case | Recommended Provider/Model | Reasoning |
|----------|---------------------------|-----------|
-| **Entity Extraction** | `Groq("llama-3.1-8b-instant")` | Fast, good accuracy for structured tasks |
-| **Relation Extraction** | `OpenAI("gpt-3.5-turbo")` | Better at complex relationship reasoning |
+| **Entity Extraction** | `Groq("llama-3.3-70b-versatile")` | Fast, good accuracy for structured tasks |
+| **Relation Extraction** | `OpenAI("gpt-4o")` | Best at complex relationship reasoning |
| **Complex Analysis** | `LiteLLM("anthropic/claude-sonnet-4-20250514")` | Highest reasoning capability |
| **High Volume/Cost** | `LiteLLM("deepseek/deepseek-chat")` | Lowest cost per token |
@@ -329,7 +329,7 @@ from semantica.llms import Groq
from semantica.semantic_extract import NERExtractor
llm = Groq(
- model="llama-3.1-8b-instant",
+ model="llama-3.3-70b-versatile",
api_key=os.getenv("GROQ_API_KEY")
)
diff --git a/docs/reference/mcp_server.md b/docs/reference/mcp_server.md
index c8869d1e..63ec640b 100644
--- a/docs/reference/mcp_server.md
+++ b/docs/reference/mcp_server.md
@@ -172,7 +172,7 @@ The MCP server exposes 12 tools that any connected AI assistant can call:
| `get_graph_summary` | Graph Operations | Node count, decision count, graph status |
| `get_graph_analytics` | Graph Operations | PageRank centrality and community detection |
| `run_reasoning` | Reasoning | Forward-chain IF/THEN rules over facts |
-| `export_graph` | Reasoning & Export | Serialise the graph (turtle, ttl, nt, xml, json-ld, json) |
+| `export_graph` | Reasoning & Export | Serialise the graph (`turtle`/`ttl` — RDF Turtle aliases, `nt`, `xml`, `json-ld`, `json`) |
### Knowledge Extraction
diff --git a/docs/reference/semantic_extract.md b/docs/reference/semantic_extract.md
index 4d8d9233..70c7239d 100644
--- a/docs/reference/semantic_extract.md
+++ b/docs/reference/semantic_extract.md
@@ -81,17 +81,17 @@ Choose the right extraction method based on your requirements:
### Quick Recommendations
```python
-# 🚀 Getting started - no setup required
+# No setup required
ner = NERExtractor(method="pattern")
-# 🎯 Best accuracy - requires API key
+# Best accuracy - requires API key
from semantica.llms import Groq
import os
llm = Groq(api_key=os.getenv("GROQ_API_KEY"))
ner = NERExtractor(method="llm", llm_provider=llm)
-# 🔧 Custom models - domain-specific
-ner = NERExtractor(method="huggingface")
+# Custom models - domain-specific
+ner = NERExtractor(method="huggingface")
entities = ner.extract(text, model="dslim/bert-base-NER", device="cpu")
```
diff --git a/docs/reference/split.md b/docs/reference/split.md
index 36a9caba..71e70f6a 100644
--- a/docs/reference/split.md
+++ b/docs/reference/split.md
@@ -164,7 +164,7 @@ splitter = TextSplitter(
| Parameter | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| `method` | `str \| list[str]` | `"recursive"` | Chunking strategy, or list of methods as fallback chain |
-| `chunk_size` | `int` | `1000` | Target size in characters |
+| `chunk_size` | `int` | `1000` | Target size in **characters** (not tokens — if you were using token-based sizing before, multiply by ~4 to approximate the same boundary) |
| `chunk_overlap` | `int` | `200` | Character overlap between adjacent chunks |
| `similarity_threshold` | `float` | `0.7` | Cosine similarity cutoff for `semantic_transformer` — lower = more splits |
| `model` | `str` | `"all-MiniLM-L6-v2"` | Sentence-transformers model name for `semantic_transformer` |