Knowledge Substrate
Intelligence-plane component implementing the Knowledge Graph + GraphRAG retrieval surface.
GraphRAG retrieval over a snapshot-pinned Knowledge Graph — every hop carries provenance; conflicts surface, never silenced.
- Ontology + Identity Layer references from the active Context Pack
- Retrieval parameters (mode, seed_strategy, max_hops, top_k, freshness_window, evidence_required)
- Run Context (tenant_id, role, classification scope)
- EvidenceBundle (snapshot_version, ontology_version, seed, hops[], conflicts[], truncated)
- Aggregate confidence and per-hop confidence
- EvidenceBundle
- EvidenceHop
- EvidenceConflictMarker
The Knowledge Substrate is the reference component profile that backs the Knowledge Graph spec. A deployment adopting this profile serves typed evidence bundles to the Compiler under hop budgets, snapshot pinning, and tenant scoping. Direct evidence sources remain valid when they provide equivalent provenance and replay controls.
This repository consumes supplied evidence and validates context admission; it does not implement this storage/retrieval service. Retrieval adapters enforce query/hop limits and actual source access before the pure compiler runs. Confidence and a self-declared verified label cannot authenticate evidence, identities or data rights.
Definition
A read-side service for the LPG (typed labeled-property graph). Owns vector / BM25 / graph indices kept in sync against a single snapshot_version; serves GraphRAG retrieval; enforces tenant isolation at the storage layer.
Why it exists
Naive RAG returns opaque chunks. Decisions need typed evidence the Critic can validate and the audit can reproduce. This component is the substrate that produces evidence bundles (hops[], evidence_refs, conflicts, snapshot pin) instead.
Inputs
- Ontology + Identity Layer references from the active Context Pack
- Retrieval parameters from the pack (
mode,seed_strategy,max_hops,top_k,freshness_window,evidence_required) - Run Context (
tenant_id, role, classification scope)
Outputs
EvidenceBundle:snapshot_version,ontology_versionseed,hops[]withevidence_refper hopconflicts[](subject + predicate + values)truncatedflag (always explicit; never silent)
- Aggregate confidence and per-hop confidence
How it works
- Resolves
snapshot_pin_rule→ fixedsnapshot_versionfor replay. - Seeds expansion from the intent + extracted entities.
- Walks permitted relationships under
max_hopsandtop_kconstraints. - Filters by
tenant_id, role, anddata_classificationfrom the Run Context. - Surfaces conflicting facts as
EvidenceConflictMarkervalues with stable evidence refs and affected requirements—does not silently resolve. - Returns the typed bundle with
truncatedset explicitly if the budget capped expansion.
Apply data-flow policy to the actual purpose, verified source labels, recipient/processor and residency at collection, inference, tools, telemetry, cache, memory, export and delegation. Graph-edge filtering alone does not authorize a vector service, reviewer model or exported bundle. Namespace/readers and correction/deletion propagation cover derived indexes/caches as applicable; approved transformations need exact bound proof rather than a redaction flag.
Failure modes
- Edge missing
evidence_ref— write rejected at the boundary. - Cross-tenant traversal — denied at the storage layer; emitted as a security event.
- Snapshot outside the workflow freshness window — reject current-decision use or explicitly pin a newly admitted snapshot and reevaluate dependent evidence/approvals. Do not silently advance a historical replay pin because live data changed.
- Hop budget truncates a relevant hop — mitigated by
truncated: trueflag the planner must handle. - Vector index drift vs. structured edges — alerting on disagreement; reindex on drift.
Operational concerns
- Per-environment snapshot pinning; promotion deliberate.
- Reindex cost when ontology version advances.
- Eviction of edges past
valid_torequires audit trail. - Backfill jobs replay against ontology versions and an explicit effective time, not ambient wall-clock time.
Evaluation metrics
- Evidence coverage (fraction of decisions whose
evidence_refsresolve). - Retrieval precision/recall on golden sets per intent.
- Conflict rate by
(entity_type, relationship_type). - Unauthorized cross-tenant successful access rate (target: zero); separately track denied attempts and coverage of denial tests.
- Deterministic retrieval artifact agreement under complete pinned query/index/embedding inputs; record model-assisted query artifacts and compare declared properties where applicable.