semantic-memory
A provenanced fact store with a declarative conflict-resolution layer.
Every fact records who asserted it and where from. When two sources disagree, a defined precedence order decides which value is served — and surfaces the disagreement rather than hiding it.
The problem
Most knowledge stores treat every fact as equal and anonymous. When two sources assert different values for the same thing, the store either overwrites silently (last write wins) or requires reconciliation upstream. Neither records why one value was chosen, and neither tells you a conflict occurred.
What this does
One primitive — the provenanced assertion:
Assertion { subject · predicate · object
layer authored | derived
source where it came from
asserted · confidence · active }
Two ways in, one graph:
prose ──/remember──▶ extract ─┐
├──▶ assertion ──▶ reconcile
files ──/sync─────▶ parse ────┘
Structured reads out:
GET /fact the served value for a subject + predicate, with provenance GET /disagreements where a lower-precedence source disagrees with the served value GET /conflicts ties the system will not resolve on its own
How conflicts resolve
A fixed precedence order, tried in sequence until one produces a winner:
layer-precedence → source-priority → confidence → recency
Resolved
A winner is served. Cross-layer losers are recorded and flagged for review.
Contested
No winner — for example two authored values of equal priority. Both are kept, the served value is frozen, and a human decides.
Authored facts (curated) outrank derived facts (mined). Recency may break a tie between two mined facts; it is never used to overrule a human assertion. On an unresolvable tie the system flags rather than guesses.
Properties
- Provenance. Every fact carries its layer, source, and confidence.
- Never blocks. A contradicting fact is stored and surfaced, not dropped.
- Deletion is scoped. Deleting a fact scans for dependents — facts inferred from it, rivals it was outranking, sources that re-assert it — and asks before removing them.
- Declarative policy. Precedence, cardinality, and ingest-gate behavior are set in a readable policy file, not in code.
- Runs without keys. An in-JVM model handles extraction; no external account or network is required on the ingest path. Supply a hosted-model key to use one instead.
Architecture
Two kinds of input. Facts you state in curated files are kept exactly as written, with no AI — authored and fully trusted. Documents are read by AI, which extracts facts from them — derived and lower trust. Both become labeled facts in one store, and when they disagree, stated facts win over extracted ones. Reading facts back is exact and rule-based, with no AI.
How it was built
Built with Akka Specify and Fluree, using loop-driven engineering and spec-driven development. Requirements were captured as an executable specification and driven to completion in a loop: each requirement is a checkable condition, and the build advances by running the checks, resolving failures, and repeating until every condition holds.