trustgraph/tests/unit
cybermaggedon 64e3f6bd0d
Subgraph provenance (#694)
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:37:59 +00:00
..
test_agent Add unified explainability support and librarian storage for (#693) 2026-03-12 21:40:09 +00:00
test_base Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
test_chunking Fix ontology RAG pipeline + add query concurrency (#691) 2026-03-12 11:34:42 +00:00
test_cli Fix/tests (#647) 2026-02-23 22:01:47 +00:00
test_clients Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
test_config Structure data mvp (#452) 2025-08-07 20:47:20 +01:00
test_cores Remove redundant metadata (#685) 2026-03-11 10:51:39 +00:00
test_decoding Extract-time provenance (#661) 2026-03-05 18:36:10 +00:00
test_direct Fix Cassandra schema and graph filter semantics (#680) 2026-03-10 12:52:51 +00:00
test_embeddings Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
test_extract Changed schema for Value -> Term, majorly breaking change (#622) 2026-01-27 13:48:08 +00:00
test_gateway Remove redundant metadata (#685) 2026-03-11 10:51:39 +00:00
test_knowledge_graph Subgraph provenance (#694) 2026-03-13 11:37:59 +00:00
test_query Knowledge core processing updated for embeddings interface change (#681) 2026-03-10 13:28:16 +00:00
test_retrieval Add unified explainability support and librarian storage for (#693) 2026-03-12 21:40:09 +00:00
test_rev_gateway Fix tests (#593) 2025-12-19 08:53:21 +00:00
test_storage Remove redundant metadata (#685) 2026-03-11 10:51:39 +00:00
test_text_completion Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
__init__.py Test suite executed from CI pipeline (#433) 2025-07-14 14:57:44 +01:00
test_prompt_manager.py Feature/prompts jsonl (#619) 2026-01-26 17:38:00 +00:00
test_prompt_manager_edge_cases.py Update to enable knowledge extraction using the agent framework (#439) 2025-07-21 14:31:57 +01:00
test_python_api_client.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00