trustgraph/trustgraph-base/trustgraph/api
cybermaggedon ddd4bd7790
Deliver explainability triples inline in retrieval response stream (#763)
Provenance triples are now included directly in explain messages from
GraphRAG, DocumentRAG, and Agent services, eliminating the need for
follow-up knowledge graph queries to retrieve explainability details.

Each explain message in the response stream now carries:
- explain_id: root URI for this provenance step (unchanged)
- explain_graph: named graph where triples are stored (unchanged)
- explain_triples: the actual provenance triples for this step (new)

Changes across the stack:
- Schema: added explain_triples field to GraphRagResponse,
  DocumentRagResponse, and AgentResponse
- Services: all explain message call sites pass triples through
  (graph_rag, document_rag, agent react, agent orchestrator)
- Translators: encode explain_triples via TripleTranslator for
  gateway wire format
- Python SDK: ProvenanceEvent now includes parsed ExplainEntity
  and raw triples; expanded event_type detection
- CLI: invoke_graph_rag, invoke_agent, invoke_document_rag use
  inline entity when available, fall back to graph query
- Tech specs updated

Additional explainability test
2026-04-07 12:19:05 +01:00
..
__init__.py Split Analysis into Analysis+ToolUse and Observation, add message_id (#747) 2026-03-31 17:51:22 +01:00
api.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
async_bulk_client.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
async_flow.py Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
async_metrics.py Python API implements streaming interfaces (#577) 2025-12-04 17:38:57 +00:00
async_socket_client.py Persistent websocket connections for socket clients and CLI tools (#723) 2026-03-26 16:46:28 +00:00
bulk_client.py Document chunks not stored in vector store (#665) 2026-03-07 23:10:45 +00:00
collection.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
config.py Python API docs (#614) 2026-01-15 15:12:32 +00:00
exceptions.py Structured data 2 (#645) 2026-02-23 15:56:29 +00:00
explainability.py Wire message_id on all answer chunks, fix DAG structure (#748) 2026-04-01 13:27:41 +01:00
flow.py SPARQL query service (#754) 2026-04-02 17:21:39 +01:00
knowledge.py Fix/extraction prov (#662) 2026-03-06 12:23:58 +00:00
library.py RabbitMQ pub/sub backend with topic exchange architecture (#752) 2026-04-02 12:47:16 +01:00
metrics.py Python API implements streaming interfaces (#577) 2025-12-04 17:38:57 +00:00
socket_client.py Deliver explainability triples inline in retrieval response stream (#763) 2026-04-07 12:19:05 +01:00
types.py Deliver explainability triples inline in retrieval response stream (#763) 2026-04-07 12:19:05 +01:00