From e851c56e67cda3d1ac8127e515325b2b0cd8f848 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Mon, 5 Oct 2026 16:57:19 +0100 Subject: [PATCH] fix: add rdfs:label and rdfs:comment to ontology types and properties GraphRAG's reranker filter drops edges where predicates or types lack human-readable labels, resulting in empty prompts. Add ontology definitions with rdfs:label and rdfs:comment for all custom types and properties in the bletchley and aerosentinel test datasets. --- .../policy-test-data/aerosentinel-graph.ttl | 200 ++++++++++++++++++ .../policy-test-data/bletchley-graph.ttl | 132 ++++++++++++ 2 files changed, 332 insertions(+) diff --git a/docs/tech-specs/policy-test-data/aerosentinel-graph.ttl b/docs/tech-specs/policy-test-data/aerosentinel-graph.ttl index c2b4b6f7b..dd3192c3d 100644 --- a/docs/tech-specs/policy-test-data/aerosentinel-graph.ttl +++ b/docs/tech-specs/policy-test-data/aerosentinel-graph.ttl @@ -11,6 +11,206 @@ # IP and client relationships, and classified defense systems. # ============================================================= +# ============================================================= +# Ontology — Classes +# ============================================================= + +aso:Company a rdfs:Class ; + rdfs:label "Company" ; + rdfs:comment "A corporate entity." . + +aso:OrganisationalUnit a rdfs:Class ; + rdfs:label "Organisational Unit" ; + rdfs:comment "A division or department within a company." . + +aso:Classification a rdfs:Class ; + rdfs:label "Classification" ; + rdfs:comment "A security classification level for information." . + +aso:Product a rdfs:Class ; + rdfs:label "Product" ; + rdfs:comment "A product manufactured or developed by the company." . + +aso:Specification a rdfs:Class ; + rdfs:label "Specification" ; + rdfs:comment "Technical specifications for a product." . + +aso:Office a rdfs:Class ; + rdfs:label "Office" ; + rdfs:comment "A physical office or facility." . + +aso:SourceCode a rdfs:Class ; + rdfs:label "Source Code" ; + rdfs:comment "A software source code repository or module." . + +aso:Schematic a rdfs:Class ; + rdfs:label "Schematic" ; + rdfs:comment "An engineering schematic or design diagram." . + +aso:Client a rdfs:Class ; + rdfs:label "Client" ; + rdfs:comment "A customer or client of the company." . + +aso:Technology a rdfs:Class ; + rdfs:label "Technology" ; + rdfs:comment "A proprietary technology or material." . + +aso:TestData a rdfs:Class ; + rdfs:label "Test Data" ; + rdfs:comment "Test results and telemetry data." . + +aso:Briefing a rdfs:Class ; + rdfs:label "Briefing" ; + rdfs:comment "A project status briefing document." . + +aso:Contract a rdfs:Class ; + rdfs:label "Contract" ; + rdfs:comment "A procurement or evaluation contract." . + +aso:Supplier a rdfs:Class ; + rdfs:label "Supplier" ; + rdfs:comment "An external supplier of components or materials." . + +# ============================================================= +# Ontology — Properties +# ============================================================= + +aso:founded a rdf:Property ; + rdfs:label "founded" ; + rdfs:comment "The year the company was founded." . + +aso:headquarters a rdf:Property ; + rdfs:label "headquarters" ; + rdfs:comment "The location of the company headquarters." . + +aso:partOf a rdf:Property ; + rdfs:label "part of" ; + rdfs:comment "Indicates that an organisational unit belongs to a parent entity." . + +aso:classification a rdf:Property ; + rdfs:label "classification" ; + rdfs:comment "The security classification level assigned to a resource." . + +aso:organisationalUnit a rdf:Property ; + rdfs:label "organisational unit" ; + rdfs:comment "The organisational unit responsible for a resource." . + +aso:productCategory a rdf:Property ; + rdfs:label "product category" ; + rdfs:comment "The market category of a product." . + +aso:status a rdf:Property ; + rdfs:label "status" ; + rdfs:comment "The current production or development status." . + +aso:specFor a rdf:Property ; + rdfs:label "specification for" ; + rdfs:comment "The product that a specification describes." . + +aso:flightTime a rdf:Property ; + rdfs:label "flight time" ; + rdfs:comment "The maximum flight duration." . + +aso:maxPayload a rdf:Property ; + rdfs:label "max payload" ; + rdfs:comment "The maximum payload capacity." . + +aso:cameraResolution a rdf:Property ; + rdfs:label "camera resolution" ; + rdfs:comment "The resolution of the onboard camera." . + +aso:batteryType a rdf:Property ; + rdfs:label "battery type" ; + rdfs:comment "The type of battery used." . + +aso:wingspan a rdf:Property ; + rdfs:label "wingspan" ; + rdfs:comment "The wingspan of the aircraft." . + +aso:address a rdf:Property ; + rdfs:label "address" ; + rdfs:comment "The physical address of a location." . + +aso:range a rdf:Property ; + rdfs:label "range" ; + rdfs:comment "The maximum operational range." . + +aso:navigationSystem a rdf:Property ; + rdfs:label "navigation system" ; + rdfs:comment "The navigation system used by the aircraft." . + +aso:codeFor a rdf:Property ; + rdfs:label "code for" ; + rdfs:comment "The product that a source code module belongs to." . + +aso:language a rdf:Property ; + rdfs:label "language" ; + rdfs:comment "The programming language used." . + +aso:repository a rdf:Property ; + rdfs:label "repository" ; + rdfs:comment "The source code repository location." . + +aso:schematicFor a rdf:Property ; + rdfs:label "schematic for" ; + rdfs:comment "The product that a schematic describes." . + +aso:contractValue a rdf:Property ; + rdfs:label "contract value" ; + rdfs:comment "The monetary value of a contract." . + +aso:contractStatus a rdf:Property ; + rdfs:label "contract status" ; + rdfs:comment "The current status of a contract." . + +aso:product a rdf:Property ; + rdfs:label "product" ; + rdfs:comment "The product associated with a client relationship." . + +aso:technologyFor a rdf:Property ; + rdfs:label "technology for" ; + rdfs:comment "The product that a technology is developed for." . + +aso:testFor a rdf:Property ; + rdfs:label "test for" ; + rdfs:comment "The product that test data relates to." . + +aso:testDate a rdf:Property ; + rdfs:label "test date" ; + rdfs:comment "The date a test was conducted." . + +aso:briefingFor a rdf:Property ; + rdfs:label "briefing for" ; + rdfs:comment "The product that a briefing covers." . + +aso:briefingDate a rdf:Property ; + rdfs:label "briefing date" ; + rdfs:comment "The date of a briefing." . + +aso:contractFor a rdf:Property ; + rdfs:label "contract for" ; + rdfs:comment "The product that a contract covers." . + +aso:counterparty a rdf:Property ; + rdfs:label "counterparty" ; + rdfs:comment "The external party to a contract." . + +aso:supplierFor a rdf:Property ; + rdfs:label "supplier for" ; + rdfs:comment "The product that a supplier provides components for." . + +aso:country a rdf:Property ; + rdfs:label "country" ; + rdfs:comment "The country where a supplier is based." . + +aso:exportControlStatus a rdf:Property ; + rdfs:label "export control status" ; + rdfs:comment "The export control clearance status of a supplier." . + +# ============================================================= +# Data +# ============================================================= + # ------------------------------------------------------------- # Company # ------------------------------------------------------------- diff --git a/docs/tech-specs/policy-test-data/bletchley-graph.ttl b/docs/tech-specs/policy-test-data/bletchley-graph.ttl index 464ec2388..d34bbbafa 100644 --- a/docs/tech-specs/policy-test-data/bletchley-graph.ttl +++ b/docs/tech-specs/policy-test-data/bletchley-graph.ttl @@ -14,6 +14,138 @@ # Based on the real organisational structure, 1941-1944. # ============================================================= +# ============================================================= +# Ontology — Types +# ============================================================= + +bpo:Organisation a rdfs:Class ; + rdfs:label "Organisation" ; + rdfs:comment "An organisational body or institution." . + +bpo:Section a rdfs:Class ; + rdfs:label "Section" ; + rdfs:comment "An operational section or Hut within the organisation." . + +bpo:Classification a rdfs:Class ; + rdfs:label "Classification" ; + rdfs:comment "A security classification level." . + +bpo:Person a rdfs:Class ; + rdfs:label "Person" ; + rdfs:comment "A member of personnel." . + +bpo:Operation a rdfs:Class ; + rdfs:label "Operation" ; + rdfs:comment "A signals intelligence operation or campaign." . + +bpo:IntelligenceReport a rdfs:Class ; + rdfs:label "Intelligence Report" ; + rdfs:comment "A translated or analysed intelligence product." . + +bpo:CryptanalyticMethod a rdfs:Class ; + rdfs:label "Cryptanalytic Method" ; + rdfs:comment "A technique or procedure used to break a cipher system." . + +bpo:CryptanalyticMaterial a rdfs:Class ; + rdfs:label "Cryptanalytic Material" ; + rdfs:comment "Working material produced during cryptanalysis, such as Bombe menus or key recoveries." . + +bpo:TechnicalDocument a rdfs:Class ; + rdfs:label "Technical Document" ; + rdfs:comment "An engineering or technical specification document." . + +bpo:AdministrativeRecord a rdfs:Class ; + rdfs:label "Administrative Record" ; + rdfs:comment "Administrative or logistical documentation." . + +bpo:PolicyDocument a rdfs:Class ; + rdfs:label "Policy Document" ; + rdfs:comment "A document defining rules, procedures, or dissemination protocols." . + +bpo:CounterIntelligence a rdfs:Class ; + rdfs:label "Counter-Intelligence" ; + rdfs:comment "Decrypted material relating to enemy intelligence services." . + +# ============================================================= +# Ontology — Properties +# ============================================================= + +bpo:section a rdf:Property ; + rdfs:label "section" ; + rdfs:comment "The section or Hut responsible for this item." . + +bpo:classification a rdf:Property ; + rdfs:label "classification" ; + rdfs:comment "The security classification level of this item." . + +bpo:partOf a rdf:Property ; + rdfs:label "part of" ; + rdfs:comment "The parent organisation this section belongs to." . + +bpo:parentOrganisation a rdf:Property ; + rdfs:label "parent organisation" ; + rdfs:comment "The parent body of this organisation." . + +bpo:sectionHead a rdf:Property ; + rdfs:label "section head" ; + rdfs:comment "The person leading this section." . + +bpo:function a rdf:Property ; + rdfs:label "function" ; + rdfs:comment "The operational role of this section." . + +bpo:target a rdf:Property ; + rdfs:label "target" ; + rdfs:comment "The signals intelligence target of this section." . + +bpo:receivesFrom a rdf:Property ; + rdfs:label "receives from" ; + rdfs:comment "The section from which this section receives decrypted material." . + +bpo:servesSection a rdf:Property ; + rdfs:label "serves section" ; + rdfs:comment "A section that this section provides operational support to." . + +bpo:covername a rdf:Property ; + rdfs:label "cover name" ; + rdfs:comment "An official cover name or code name." . + +bpo:date a rdf:Property ; + rdfs:label "date" ; + rdfs:comment "The date associated with this item." . + +bpo:derivedFrom a rdf:Property ; + rdfs:label "derived from" ; + rdfs:comment "The source material from which this item was produced." . + +bpo:relatesTo a rdf:Property ; + rdfs:label "relates to" ; + rdfs:comment "An operation or topic this item is connected to." . + +bpo:usedBy a rdf:Property ; + rdfs:label "used by" ; + rdfs:comment "The section that uses this material operationally." . + +bpo:operationName a rdf:Property ; + rdfs:label "operation name" ; + rdfs:comment "The name of the operation." . + +bpo:theatre a rdf:Property ; + rdfs:label "theatre" ; + rdfs:comment "The theatre of operations." . + +bpo:inventor a rdf:Property ; + rdfs:label "inventor" ; + rdfs:comment "The person who invented or devised this method." . + +bpo:designer a rdf:Property ; + rdfs:label "designer" ; + rdfs:comment "The person who designed this system." . + +bpo:rank a rdf:Property ; + rdfs:label "rank" ; + rdfs:comment "The military or civil rank of this person." . + # ------------------------------------------------------------- # Organisation # -------------------------------------------------------------