semantica.seed gives your knowledge graph a reliable, verified starting point:
- Load verified reference data first: ISO codes, employee rosters, product catalogs, domain taxonomies
SeedDataManagermerges freshly extracted data onto foundation nodes without creating duplicates- Supports JSON, CSV, and programmatic registration of seed sources
- Deterministic test graph generation from structured seed data
- Anchors entity extraction to known entities, reducing hallucination and duplicate nodes
Exported Classes
What You Get
- SeedDataManager — Register sources, build a foundation graph, validate quality, and merge with extracted data.
- SeedDataSource — Typed source definition supporting CSV, JSON, SQL, and API with format-specific config.
- Foundation Graph — Build a foundation graph from all registered sources in one pass, ready to merge with extracted data.
- Merge Strategies —
seed_first,extracted_first, andmergewith property-level conflict detection. - Validation — Required field checks, ID uniqueness, type consistency, reference integrity, and encoding validation before loading.
- Versioning — Track seed data versions across pipeline runs and diff changes between versions.
Quick Start
1
Register your seed sources
2
Build the foundation graph
3
Validate before loading
4
Merge with extracted data
SeedDataSource Types
- CSV
- JSON
- Database
- API
SeedDataManager Reference
Different strategies for resolving conflicts during
integrate_with_extracted():
- seed_first
- extracted_first
- merge
Seed data wins conflicts: preserves curated relationships over extracted ones.Use when seed data is high-confidence and extraction is exploratory.
Full Pipeline Example
YAML Configuration
Define sources in YAML for production deployments: no code changes needed to switch environments:- Ingest — Load unstructured data alongside seed data.
- Knowledge Graph — The target graph that seed data populates.
- Deduplication — Handle duplicates during seed-extracted merge.
- Pipeline — Incorporate seed loading as a named pipeline step.
