RAG template → SHACL shape mapping
This file maps each RAG traversal template to the primary SHACL shapes that should be validated or enforced before using the template for reasoning or RAG responses.
Template T1 (Vulnerability Impact Explanation):
- Validate NodeShapes targeting:
kgcs:Vulnerability,kgcs:Weakness,kgcs:AttackPattern,kgcs:Technique,kgcs:Tactic
- Validate NodeShapes targeting:
Template T2 (Severity & Scoring Explanation):
- Validate NodeShapes targeting:
kgcs:Vulnerability,kgcs:VulnerabilityScore
- Validate NodeShapes targeting:
Template T3 (Detection-Centric Reasoning):
- Validate NodeShapes targeting:
kgcs:Technique,kgcs:DetectionAnalytic
- Validate NodeShapes targeting:
Template T4 (Mitigation-Centric Reasoning):
- Validate NodeShapes targeting:
kgcs:Techniqueandkgcs:DefensiveTechnique(if present)
- Validate NodeShapes targeting:
Template T5 (Deception & Adversary Disruption):
- Validate NodeShapes targeting:
kgcs:Technique,kgcs:Tactic, and deception classes (future)
- Validate NodeShapes targeting:
Template T6 (Reference & Evidence Grounding):
- Validate NodeShape targeting
kgcs:Vulnerabilityandkgcs:Referencepresence (viakgcs:references)
- Validate NodeShape targeting
Template T7 (End-to-End Defensive Reasoning):
- Validate: all classes from T1 plus
kgcs:DetectionAnalytic,kgcs:DefensiveTechnique, andkgcs:VulnerabilityScore
- Validate: all classes from T1 plus
Notes:
The SHACL bundle
kgcs-shapes.ttlprovides core coverage; project teams should extend it with additional shapes forDefensiveTechnique,Reference,DeceptionTechnique, and extension-specific constraints as needed.This repository baseline uses canonical
kgcs:*terms for Core concepts and validates against versioned shapes inshapes/.CI should run the relevant shape subset for the RAG path being used in retrieval/response.