Skip to content

feat(envited-x): add AttributeProvenance for metadata derivation tracking#75

Open
jdsika wants to merge 7 commits into
mainfrom
feat/attribute-provenance
Open

feat(envited-x): add AttributeProvenance for metadata derivation tracking#75
jdsika wants to merge 7 commits into
mainfrom
feat/attribute-provenance

Conversation

@jdsika

@jdsika jdsika commented May 8, 2026

Copy link
Copy Markdown

Summary

Extend the envited-x base ontology with AttributeProvenance — a formal mechanism to declare how individual metadata attributes were derived and which software agent (tool or LLM model) produced them.

Motivation

Automated metadata enrichment tools (e.g. llm_enricher in sl-5-8-asset-tools) can fill empty metadata fields by analyzing source simulation files. Downstream consumers need to know:

  1. Which fields were automatically derived vs. manually curated
  2. What method was used (direct extraction, calculation, rule-based heuristic, LLM inference, manual)
  3. Which tool produced the values (name, version, and optionally which LLM model)
  4. What confidence the tool assigns to each derived value

Without a standardized provenance mechanism, there is no way to distinguish machine-derived metadata from human-curated metadata, undermining trust and auditability.

Design Decisions

Placement in envited-x (not a separate ontology)

AttributeProvenance is placed in the envited-x base ontology because:

  • It applies to all asset types (scenario, hdmap, environment-model, etc.)
  • It attaches to envited-x:DomainSpecification — the universal container for domain metadata
  • It follows the same pattern as hasDataSource, hasQuality, hasQuantity (optional sections on DomainSpecification)

Reuse of existing vocabularies (not redefining them)

External Vocabulary What we USE from it
W3C PROV-O (prov:) prov:SoftwareAgent (class), prov:wasAssociatedWith (property), prov:endedAtTime (property)
Schema.org (schema:) schema:name (agent name)
Gaia-X (gx:) gx:version (software version — matches gx:SoftwareResourceShape pattern)

We do NOT redefine these — we reference them as property paths in SHACL constraints.

New ENVITED-X terms (what we DEFINE)

Term Type Purpose
envited-x:AttributeProvenance Class (subclass of prov:Activity) Container for per-attribute provenance
envited-x:hasAttributeProvenance ObjectProperty Links DomainSpecification → AttributeProvenance
envited-x:attributeName DatatypeProperty Which field was derived
envited-x:derivationMethod DatatypeProperty How it was derived (enum)
envited-x:confidence DatatypeProperty How confident (enum)
envited-x:llmModel DatatypeProperty Which LLM model (on SoftwareAgent)

Derivation Method Enum

Value Meaning Example
extraction Directly parsed from source file (deterministic) weatherSummary from XML element
calculation Computed/derived from multiple source values bounding box from road geometry
rule-based-inference Heuristic keyword-based mapping scenarioCategory from filename keywords
llm-inference LLM model generated the value aim from natural language analysis
manual Human input via wizard or editor User-entered sourceDescription

Instance Example

{
  "envited-x:hasAttributeProvenance": [
    {
      "@type": "envited-x:AttributeProvenance",
      "envited-x:attributeName": "scenarioCategory",
      "envited-x:derivationMethod": "rule-based-inference",
      "envited-x:confidence": "high",
      "prov:wasAssociatedWith": {
        "@type": "prov:SoftwareAgent",
        "schema:name": "sl-5-8-asset-tools/llm_enricher",
        "gx:version": "0.1.0"
      },
      "prov:endedAtTime": {"@type": "xsd:dateTime", "@value": "2026-05-08T16:00:00Z"}
    },
    {
      "@type": "envited-x:AttributeProvenance",
      "envited-x:attributeName": "aim",
      "envited-x:derivationMethod": "llm-inference",
      "envited-x:confidence": "medium",
      "prov:wasAssociatedWith": {
        "@type": "prov:SoftwareAgent",
        "schema:name": "sl-5-8-asset-tools/llm_enricher",
        "gx:version": "0.2.0",
        "envited-x:llmModel": "claude-sonnet-4"
      }
    }
  ]
}

Changes

  • envited-x.owl.ttl: Added AttributeProvenance class, hasAttributeProvenance object property, and 4 datatype properties
  • envited-x.shacl.ttl: Added AttributeProvenanceShape, SoftwareAgentShape, and property constraint on DomainSpecificationShape
  • envited-x.context.jsonld: Auto-regenerated by hook (adds prov: prefix + new terms)
  • PROPERTIES.md: Auto-regenerated by hook

Compatibility

  • Non-breaking: hasAttributeProvenance has sh:minCount 0 — existing assets without provenance remain valid
  • Open shapes: Both new shapes are sh:closed false — extensible for future properties
  • Backward compatible: No existing properties or shapes are modified

…n tracking

Extend the envited-x base ontology with a formal mechanism to declare
how individual metadata attributes were derived and which software
agent (tool or LLM model) produced them.

New OWL classes and properties:
- envited-x:AttributeProvenance (subclass of prov:Activity)
- envited-x:hasAttributeProvenance (on DomainSpecification)
- envited-x:attributeName, derivationMethod, confidence, llmModel

New SHACL shapes:
- envited-x:AttributeProvenanceShape — validates provenance entries
- envited-x:SoftwareAgentShape — validates tool identity (schema:name,
  gx:version, optional envited-x:llmModel)

Derivation method enum:
- extraction: directly parsed from source file
- calculation: computed from multiple source values
- rule-based-inference: heuristic/keyword-based mapping
- llm-inference: LLM model generated the value
- manual: human input (e.g. wizard)

Reuses existing external vocabularies:
- prov:SoftwareAgent, prov:wasAssociatedWith, prov:endedAtTime (W3C PROV-O)
- schema:name (Schema.org)
- gx:version (Gaia-X Trust Framework)

Motivation: automated metadata enrichment tools (e.g. llm_enricher in
sl-5-8-asset-tools) need a standardized way to declare which fields
they filled and with what confidence, enabling downstream consumers to
distinguish human-curated from machine-derived values.

Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
@jdsika
jdsika force-pushed the feat/attribute-provenance branch from 076465b to e7824dd Compare May 8, 2026 14:39
@jdsika jdsika self-assigned this May 8, 2026
jdsika added 6 commits May 8, 2026 17:04
Add ASCS-eV/asam-openx-standards as a submodule at submodules/asam-openx-standards.
Contains version-pinned markdown copies of all publicly available ASAM OpenX
simulation standards, redistributed under the ASAM Unrestricted Distribution Clause.

Standards included (251 chapter files across 8 domains):
- ASAM OpenDRIVE v1.9.0 (95 chapters)
- ASAM OpenSCENARIO DSL v2.2.0 (59 chapters)
- ASAM OpenODD v1.0.0 (62 chapters)
- ASAM OpenMATERIAL 3D BS 1.0.0 (27 chapters)
- ASAM OpenLABEL v1.0.0 (overview + JSON schema reference)
- ASAM OSI (nested submodule, MPL-2.0)
- ASAM OpenCRG (nested submodule, Apache-2.0)
- ASAM TrafficParticipants v1.0.2 (overview only)
- ISO 34503 (paraphrased summary)

Legal basis: each ASAM OpenX standard carries an Unrestricted Distribution
exception replacing the restrictive section 2(1) of the ASAM license, granting everyone
a basic, non-exclusive and unlimited license to use the standard.

Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant