Add explainability CLI tools (#688)

Add explainability CLI tools for debugging provenance data
- tg-show-document-hierarchy: Display document → page → chunk → edge
  hierarchy by traversing prov:wasDerivedFrom relationships
- tg-list-explain-traces: List all GraphRAG sessions with questions
  and timestamps from the retrieval graph
- tg-show-explain-trace: Show full explainability cascade for a
  GraphRAG session (question → exploration → focus → synthesis)

These tools query the source and retrieval graphs to help debug
and explore provenance/explainability data stored during document
processing and GraphRAG queries.
This commit is contained in:
cybermaggedon 2026-03-11 13:44:29 +00:00 committed by GitHub
parent fda508fdae
commit a53ed41da2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1469 additions and 0 deletions

View file

@ -96,6 +96,9 @@ tg-delete-config-item = "trustgraph.cli.delete_config_item:main"
tg-list-collections = "trustgraph.cli.list_collections:main"
tg-set-collection = "trustgraph.cli.set_collection:main"
tg-delete-collection = "trustgraph.cli.delete_collection:main"
tg-show-document-hierarchy = "trustgraph.cli.show_document_hierarchy:main"
tg-list-explain-traces = "trustgraph.cli.list_explain_traces:main"
tg-show-explain-trace = "trustgraph.cli.show_explain_trace:main"
[tool.setuptools.packages.find]
include = ["trustgraph*"]