Semantic Policy Governance in TrustGraph 2.10
San Francisco, CA — TrustGraph 2.10 is here. This release is led by policy-based access control for the knowledge graph: SHACL-AF policies, stored in the graph itself, now decide node by node what each user is allowed to
San Francisco, CA — TrustGraph 2.10 is here. This release is led by policy-based access control for the knowledge graph: SHACL-AF policies, stored in the graph itself, now decide node by node what each user is allowed to see, with every decision captured as a structured audit event.
Around that foundation, TrustGraph 2.10 adds precise control over how GraphRAG walks the graph, two new fast inference services for classification and decision-making, metadata-aware embedding search, and model discovery across all twelve LLM backends. The Workbench gains an interactive VOWL ontology visualiser, in-app version and security advisory notifications, and server-side RDF type filtering for search.
Whether you are putting a knowledge graph in front of users with different clearances, steering retrieval toward the parts of the graph that matter, or wiring structured decisions into agent workflows at millisecond latency, TrustGraph 2.10 delivers a more governed and more controllable platform.
SHACL-AF Policy-Based Query Filtering
Graph queries can now be governed by policy. TrustGraph 2.10 evaluates SHACL-AF policies stored in the urn:graph:policy named graph against every node a query touches, so the same graph can safely serve users with different access rights.
-
Policies as data: The
PolicyFilterloads SHACL-AFNodeShapepolicies withsh:prefixesnamespace resolution, hydrates candidate nodes, and runs each policy's SPARQL SELECT target in precedence order. -
Tri-state determinations: Every node resolves to Allowed, Filtered, or Violation.
sh:SPARQLRuleCONSTRUCT execution parsessh:ValidationResultfor severity, message, andtg-pol:blocks, so determinations are generic IRIs with ablocksflag rather than hard-coded strings. -
Enforcement mode: When policies exist in
urn:graph:policy, queries require auser_context. With no policies loaded, the graph runs in open mode. -
Drop-in service: The new
triples-query-policyservice wraps any triples query backend with per-node policy evaluation, streaming triples through the filter rather than batch processing them. -
End-to-end user context: User context is threaded through the REST API, gateway translators,
TriplesClient, the SPARQL service, and GraphRAG. -
Auditable by design: Structured
policy.evaluationaudit events, correlated byrequest_id, are published tonotify:tg:policy-events. -
Token minting: Administrators can mint user context tokens with the
tg-mint-tokenCLI for testing and service-to-service authentication. - Built for speed: An LRU+TTL query cache (30s, 256 entries), a compiled SPARQL cache (64 entries), a node determination cache, and parallel policy evaluation and hydration keep policy checks off the critical path.
Two reference datasets, AeroSentinel and Bletchley Park, ship with policy rules and multi-persona verification so teams can see policy filtering at work before writing their own.
Major Features & Platform Upgrades
Guided Graph Traversal
GraphRAG traversal can now be steered with optional parameters:
- Grounding seeds bypass LLM concept extraction; graph seeds bypass grounding and entity lookup entirely.
- Language filtering restricts traversal to edges with matching language tags.
- Per-hop traversal instructions apply type, relationship, and named graph restrictions before reranking, so the cross-encoder only scores eligible edges.
Guided traversal is supported across the full stack: the TraversalStep schema, translators, core logic, processor, Python API, socket client, and CLI (--grounding-seeds, --graph-seeds, --languages, --traversal-instructions).
Cloze Model Classification
A new service auto-trains a masked language model (DistilBERT) from labeled examples stored in config and serves single-label classification with confidence scores.
- Multiple independent model instances per workspace.
- Stratified train/test splitting and configurable minimum accuracy thresholds.
- A new
trustgraph-clozepackage built onFlowProcessor. - Gateway dispatch, REST API, WebSocket client, and CLI tools (
tg-invoke-cloze,tg-list-cloze-models).
Decision Scoring with Laya
TrustGraph 2.10 adds a fast, structured decision-making service that answers in roughly 35ms per call, with three output types evaluated in a single request:
- Choice: select from a list of options with per-option probabilities.
- Score: a probability distribution over ordered levels such as low, medium, high, and critical.
- Noul: a binary yes/no confidence score.
Requests are auto-routed by input language (English or multilingual). The new trustgraph-laya package runs on ONNX Runtime against onnx-community/laya-multilingual-ONNX, which drops around 2GB of PyTorch dependencies and lets the service run in the standard flow container. It is available through gateway dispatch, the REST API, the WebSocket client, and the tg-invoke-decision-scoring CLI.
Embedding Search Attributes
Graph, document, and row embeddings in Qdrant can now carry optional metadata attributes, such as rdf_type and generic key-value pairs, enabling payload-based filtering alongside vector similarity search.
- The primary use case is filtering graph embedding queries by RDF type to return entities of a specific kind.
- Row embeddings now use payload-based schema filtering instead of per-schema Qdrant collections.
- Support spans schemas, ontology extraction, embeddings processors, Qdrant read/write, query services, the REST API, Python clients, the CLI, and wire translators.
List Models
Any text-completion backend can now report the models it offers, with normalised metadata:
- Multiplexed onto the existing text-completion channel via an
operationfield, which defaults to"completion"for backward compatibility. - Returns
ModelInfowith id, name, context limits, modalities, pricing, and local runtime metadata. - Implemented across all 12 LLM backends.
- A new
tg-list-modelsCLI command with table and--jsonoutput.
Named Graph and TriG Loading
tg-load-knowledge gains a --graph flag for loading triples into a specific named graph, and now accepts TriG files, preserving named graph structure on import. It also extracts rdf:type triples and passes them through the entity context pipeline for type-aware embeddings.
TrustGraph Workbench 2.3.6
TrustGraph 2.10 ships with Workbench 2.3.6, which brings ontologies to life visually and keeps deployments informed about upgrades.
VOWL Ontology Visualiser
A new plugin renders ontologies using the Visual Notation for OWL Ontologies (VOWL), with a force-directed layout and animated simulation:
-
owl:Classas circles with wrapped labels,owl:ObjectPropertyas arrows with auto-sized label boxes,owl:DatatypePropertyas green rectangles, andrdfs:subClassOfas dashed edges. - Bidirectional relationships drawn as curved bezier arcs, and self-referencing object properties (such as
substitutes for) drawn as loop arcs above the node. - Pan (shift+drag), zoom (scroll), and draggable nodes.
- A click-to-select detail panel with “add related classes”, a search panel, Show All / Clear controls, and tooltips on every element.
- Delivered as a plugin integrated into the build pipeline and route config.
Version Check and Upgrade Notifications
The Workbench now checks its version against the TrustGraph config service at startup:
- A status bar indicator shows amber for available patches and red for major upgrades, and opens an overlay when clicked.
- The overlay shows the version diff, a description, and links to release notes and the deployment guide.
- Security advisories are displayed with severity colour coding (red for critical/high, amber for medium), the fix version, and a summary linking to the advisory.
-
X-TimezoneandX-Languageheaders are sent with the check for locale-aware messaging. - The overlay opens automatically on first detection and remembers dismissed versions, and the check stays silent when version information or the config service is unavailable.
RDF Type Filter for Search
Semantic search can now be filtered by entity type on the server side, building on the new embedding search attributes:
- A dropdown selector when the ontology has 15 classes or fewer, and SPARQL-backed autocomplete for larger ontologies, with a “Searching…” indicator.
- A new
rdf_typeparameter onGraphEmbeddingsQueryRequestandFlowApi.graphEmbeddingsQuery().
Workbench Improvements
- GraphRAG explainability labels: Node labels are truncated at 20 characters and edge labels at 16, with full text in hover tooltips.
-
Ontology data loading: The
useOntologySchemahook now uses targetedrdfs:label,rdfs:domain,rdfs:range,rdfs:comment, andrdfs:subClassOfqueries instead of a broadallTriplesquery. -
Named graph queries:
useRawGraphDatanow searches across all named graphs by default. -
Cleanup: The unused legacy
Socketinterface has been removed from@trustgraph/client.
Performance
- SPARQL BGP query cache: A per-BGP cache eliminates redundant triple-store round trips when intermediate solutions resolve to the same (s, p, o) query, cutting triple-store calls by around 70% for typical join patterns.
- Policy filter caching and parallelism: Node determination caching plus parallel policy evaluation and hydration.
- ONNX Runtime for decision scoring: Around 2GB less container weight, with Laya running in the standard flow container.
Platform Improvements
-
Schema refactoring:
schema/services/andschema/knowledge/have been flattened into domain-based modules (llm.py,embeddings.py,triples.py,structured.py, and more) for easier navigation. -
Simpler literals:
datatypeandlanguagenow live directly on theLiteraltype. -
Container restructuring:
trustgraph-hfis renamed totrustgraph-torchto reflect its role as the torch-dependent services container, andtrustgraph-layais extracted as a separate package. -
Resilient Loki logging: A custom Loki handler replaces
python-logging-loki, falling back to stderr when Loki is unavailable, retrying periodically, and losing no messages on transient failures.
Reliability and Correctness Fixes
-
Claude temperature: Streaming now uses
messages.create(stream=True)and temperature is passed viaextra_bodyfor Anthropic SDK v1.x compatibility. - VertexAI and Google AI Studio: Fixed async model listing and metadata derivation.
-
GraphRAG label fallback: Label resolution now falls back gracefully when
rdfs:labelis missing, the IRI name heuristic is removed, and a named graph parameter is supported. -
Policy filter hardening: Fixed error propagation and cache reuse in the policy response translator, handled
URIRefgraph context from rdflibDataset.quads(), corrected streaming versus batch processing, and hardened SPARQL evaluation and caching. -
Ontology extraction:
rdfs:labelandrdfs:commentare now included in ontology type and property extraction. -
User context propagation:
user_contextnow flows correctly from the SPARQL service to triples queries. -
IAM mint-token routing: Mint-token is routed through
/api/v1/iam, user lookup by username/self is resolved, and the WebSocketuser_contextkey is fixed. -
Ontology definition parsing: Removed
eval()usage from ontology definition parsing.
Infrastructure & Developer Experience
-
Testing: Mock signatures updated across the test suite for the new
user_contextparameter. - Cleanup: Stale test scripts, legacy docs, and root directory clutter removed.
- Tech specs: New specifications for policy filtering, embedding search attributes, guided graph traversal, user context, model listing, the cloze model service, and the decision scoring service.
Breaking Changes
Please review these changes before upgrading to TrustGraph 2.10:
-
Schema directory restructure:
schema/services/andschema/knowledge/have been flattened into domain modules. Imports from the old paths will break. -
Literal fields:
o_datatypeando_languageare removed fromTriple. UseLiteral.datatypeandLiteral.languageinstead. -
Container rename: The
trustgraph-hfcontainer and package are nowtrustgraph-torch. Update container references and docker-compose configurations. -
Policy enforcement: Once policies are loaded into
urn:graph:policy, queries require auser_context. Deployments without policies continue to run in open mode.
Get Started
TrustGraph 2.10 is available now on GitHub.
Load SHACL-AF policies to govern who sees what in your graph, steer GraphRAG with guided traversal, add millisecond decision scoring and trainable classification to your workflows, and explore your ontologies visually in the Workbench.
For more information:
- TrustGraph changelog: https://docs.trustgraph.ai/changelog/trustgraph.html
- Workbench changelog: https://docs.trustgraph.ai/changelog/trustgraph-ui.html
- Documentation: https://docs.trustgraph.ai
- GitHub Repository: https://github.com/trustgraph-ai/trustgraph
- Discord Community: https://discord.gg/sQMwkRz5GX
- Website: https://trustgraph.ai
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.