trustgraph/trustgraph-base/trustgraph
Cyber MacGeddon e8407b3441 Replace per-triple provenance reification with subgraph model
Extraction provenance previously created a full reification (statement
URI, activity, agent) for every single extracted triple, producing ~13
provenance triples per knowledge triple.  Since each chunk is processed
by a single LLM call, this was both redundant and semantically
inaccurate.

Now one subgraph object is created per chunk extraction, with
tg:contains linking to each extracted triple.  For 20 extractions from
a chunk this reduces provenance from ~260 triples to ~33.

- Rename tg:reifies -> tg:contains, stmt_uri -> subgraph_uri
- Replace triple_provenance_triples() with subgraph_provenance_triples()
- Refactor kg-extract-definitions and kg-extract-relationships to
  generate provenance once per chunk instead of per triple
- Add subgraph provenance to kg-extract-ontology and kg-extract-agent
  (previously had none)
- Update CLI tools and tech specs to match

Also rename tg-show-document-hierarchy to tg-show-extraction-provenance.

Added extra typing for extraction provenance, fixed extraction prov CLI
2026-03-13 11:20:25 +00:00
..
api Add unified explainability support and librarian storage for (#693) 2026-03-12 21:40:09 +00:00
base Minor agent tweaks (#692) 2026-03-12 17:59:02 +00:00
clients Minor agent tweaks (#692) 2026-03-12 17:59:02 +00:00
knowledge Replace per-triple provenance reification with subgraph model 2026-03-13 11:20:25 +00:00
messaging Add unified explainability support and librarian storage for (#693) 2026-03-12 21:40:09 +00:00
objects Feature/pkgsplit (#83) 2024-09-30 19:36:09 +01:00
provenance Replace per-triple provenance reification with subgraph model 2026-03-13 11:20:25 +00:00
schema Add unified explainability support and librarian storage for (#693) 2026-03-12 21:40:09 +00:00
exceptions.py Librarian (#304) 2025-02-11 16:01:03 +00:00
log_level.py Feature/pkgsplit (#83) 2024-09-30 19:36:09 +01:00
rdf.py OntoRAG: Ontology-Based Knowledge Extraction and Query Technical Specification (#523) 2025-11-12 20:38:08 +00:00