π§ RAG Traversal Templates
For Cybersecurity Core Ontology v1.0
Baseline: frozen Core OWL v1.0 semantics only.
Below is a clean, formal definition of RAG traversal templates that is strictly derived from Core Ontology v1.0 and aligned with its authoritative class/edge tables and invariants.
These templates align with the Core v1.0 specification in docs/02-ontology/core-ontology-v1.0.md and the namespace policy in docs/02-ontology/namespace-policy-v1.0.md.
This is not prose guidance β these are machine-usable reasoning contracts.
0. What a βTraversal Templateβ Is (Formal Definition)
A RAG Traversal Template is a bounded, directional, typed graph walk with:
- Allowed start node types
- Allowed edge sequence
- Explicit stop conditions
- Guaranteed semantic outcome
- Forbidden shortcuts
If a traversal violates a template, the answer must be rejected, not rephrased.
1. Canonical Constraints (Global)
These apply to all templates.
1.1 Allowed Node Set
Only Core Ontology classes:
PlatformConfiguration
Vulnerability
VulnerabilityScore
Weakness
AttackPattern
Technique
SubTechnique
Tactic
DefensiveTechnique
DetectionAnalytic
DeceptionTechnique
EngagementConcept
Reference
1.2 Forbidden Nodes
Asset
ThreatActor
Incident
Exploit
AttackInstance
RiskAssessment
Probability / Likelihood
1.3 Edge Integrity Rule
Every traversed edge must exist verbatim in the Core Ontology edge table .
2. Template T1 β Vulnerability Impact Explanation
Intent
Explain what a vulnerability is, why it exists, and how it manifests β without operational advice.
Start
Vulnerability (CVE)
Traversal
Vulnerability
β caused_by β Weakness
β exploited_by β AttackPattern
β implemented_as β Technique
β belongs_to β Tactic
Stop Conditions
- First
Tacticreached - Do not traverse mitigations or detections
Guaranteed Output
- Root cause (CWE)
- Abstract exploitation logic (CAPEC)
- Concrete adversary behavior (ATT&CK)
- Operational intent (Tactic)
Forbidden
β CVSS interpretation β Mitigation advice β Threat actor attribution
3. Template T2 β Severity & Scoring Explanation
Intent
Explain how severe a vulnerability is and why, without prioritization.
Start
Vulnerability
Traversal
Vulnerability
β scored_by β VulnerabilityScore (one or more)
Stop Conditions
- One node per CVSS version
Guaranteed Output
- Versioned severity values
- Vector strings
- Score provenance
Forbidden
β Risk ranking β Asset context β βCritical for youβ language
4. Template T3 β Detection-Centric Reasoning
Intent
Answer: βHow could this be detected?β (not is it detected now)
Start (one of)
Vulnerability
Technique
Traversal (expanded)
Vulnerability
β caused_by β Weakness
β exploited_by β AttackPattern
β implemented_as β Technique
β detected_by β DetectionAnalytic
Alternative (if starting at Technique)
Technique
β detected_by β DetectionAnalytic
Stop Conditions
- DetectionAnalytic reached
Guaranteed Output
- Detection logic references (CAR)
- Technique-level observability
Forbidden
β Telemetry availability β Log source guarantees β SOC-specific logic
5. Template T4 β Mitigation-Centric Reasoning
Intent
Answer: βWhat mitigates this behavior?β at a knowledge level.
Start
Vulnerability
Traversal
Vulnerability
β caused_by β Weakness
β exploited_by β AttackPattern
β implemented_as β Technique
β mitigated_by β DefensiveTechnique
Stop Conditions
- DefensiveTechnique reached
Guaranteed Output
- Abstract defensive controls (D3FEND)
- Technique-to-defense mapping
Forbidden
β Configuration steps β Product recommendations β Effectiveness claims
6. Template T5 β Deception & Adversary Disruption
Intent
Explain how an adversary could be disrupted or deceived.
Start
Technique
Traversal
Technique
β countered_by β DeceptionTechnique
Optional Extension
DeceptionTechnique
β disrupts β EngagementConcept
Stop Conditions
- EngagementConcept reached
Guaranteed Output
- Deception options (SHIELD)
- Strategic engagement framing (ENGAGE)
Forbidden
β Active defense execution β Attribution β Campaign claims
7. Template T6 β Reference & Evidence Grounding
Intent
Provide primary sources supporting any claim.
Start
Vulnerability
Traversal
Vulnerability
β references β Reference
Stop Conditions
- All references collected
Guaranteed Output
- URLs
- Source authority
- Verifiability
Forbidden
β External enrichment β Blog summaries β Analyst opinion
8. Template T7 β End-to-End Defensive Reasoning (Gold Path)
Intent
Answer:
βWhat is this issue, how is it exploited, and how is it detected and mitigated?β
Traversal (full chain)
Vulnerability
β caused_by β Weakness
β exploited_by β AttackPattern
β implemented_as β Technique
ββ detected_by β DetectionAnalytic
ββ mitigated_by β DefensiveTechnique
Stop Conditions
- Both detection and mitigation branches resolved
Guarantees
- Fully explainable
- No hallucinated causality
- Standards-only grounding
9. Template Violation Matrix (Hard Fail)
| Violation | Result |
|---|---|
| Skipping Weakness | β Reject answer |
| CVE β Technique direct | β Reject |
| Adding probability | β Reject |
| Asset-based inference | β Reject |
| Threat actor naming | β Reject |
10. Why These Templates Work for RAG
Derived directly from:
- Core class table
- Authoritative edge table
- Provenance guarantees
They ensure:
- Deterministic traversal
- Explainable answers
- Zero semantic leakage
- Safe LLM grounding