Merge 2.2 into master (#771)

This commit is contained in:
cybermaggedon 2026-04-08 14:17:18 +01:00 committed by GitHub
parent dc72ed3cca
commit befe951b2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 2840 additions and 32 deletions

View file

@ -0,0 +1,29 @@
# Explainable AI Demo
Demonstrates the TrustGraph streaming agent API with inline explainability
events. Sends an agent query, receives streaming thinking/observation/answer
chunks alongside RDF provenance events, then resolves the full provenance
chain from answer back to source documents.
## What it shows
- Streaming agent responses (thinking, observation, answer)
- Inline explainability events with RDF triples (W3C PROV + TrustGraph namespace)
- Label resolution for entity and predicate URIs
- Provenance chain traversal: subgraph → chunk → page → document
- Source text retrieval from the librarian using chunk IDs
## Prerequisites
A running TrustGraph instance with at least one loaded document and a
running flow. The default configuration connects to `ws://localhost:8088`.
## Usage
```bash
npm install
node index.js
```
Edit the `QUESTION` and `SOCKET_URL` constants at the top of `index.js`
to change the query or target instance.