- Created new YAML files for audience size and audience type slots, defining their properties and annotations. - Added archived capacity slots including cubic meters, linear meters, item count, and descriptions, with appropriate URIs and ranges. - Introduced a template specificity slot for context-aware RAG filtering. - Consolidated capacity-related slots into a unified structure, including has_or_had_capacity, capacity_type, and capacity_value, with detailed descriptions and examples.
114 lines
4.2 KiB
YAML
114 lines
4.2 KiB
YAML
# TemplateSpecificityScore - Score instance with type and value
|
|
#
|
|
# Created per slot_fixes.yaml migration for: template_specificity
|
|
# Replaces the previous TemplateSpecificityScores class (10 separate slots)
|
|
# with a structured class pattern using has_or_had_score + has_or_had_type
|
|
#
|
|
# Generation date: 2026-01-17
|
|
# Rule compliance: 0b, 37, 38, 39, 53, 56, 57
|
|
|
|
id: https://nde.nl/ontology/hc/class/TemplateSpecificityScore
|
|
name: TemplateSpecificityScore
|
|
title: Template Specificity Score
|
|
|
|
prefixes:
|
|
linkml: https://w3id.org/linkml/
|
|
hc: https://nde.nl/ontology/hc/
|
|
schema: http://schema.org/
|
|
|
|
default_prefix: hc
|
|
|
|
imports:
|
|
- linkml:types
|
|
- ../slots/has_or_had_score
|
|
- ../slots/has_or_had_type
|
|
- ./TemplateSpecificityType
|
|
- ./TemplateSpecificityTypes
|
|
|
|
classes:
|
|
TemplateSpecificityScore:
|
|
class_uri: schema:Rating
|
|
description: |
|
|
A single template specificity score associating a template type with a numeric value.
|
|
|
|
**Purpose** (Rule 37):
|
|
Enables context-aware RAG retrieval by assigning relevance scores
|
|
(0.0-1.0) to schema classes for different conversation templates.
|
|
|
|
**Design Pattern**:
|
|
Replaces the previous `TemplateSpecificityScores` class which had
|
|
10 separate score slots (one per template). The new pattern uses:
|
|
- `has_or_had_type` → `TemplateSpecificityType` (which template)
|
|
- `has_or_had_score` → float (the relevance score)
|
|
|
|
**Benefits**:
|
|
- Extensible: Adding new templates doesn't require new slots
|
|
- Consistent: Follows RiC-O naming conventions (Rule 39)
|
|
- Reusable: Uses generic slots per Rule 38 (slot centralization)
|
|
|
|
**Score Semantics** (LOWER = more broadly relevant):
|
|
| Score Range | Meaning | Examples |
|
|
|-------------|---------|----------|
|
|
| 0.00-0.20 | Universal | HeritageCustodian, Location |
|
|
| 0.20-0.40 | Broadly useful | Collection, Identifier |
|
|
| 0.40-0.60 | Moderately specific | ChangeEvent, PersonProfile |
|
|
| 0.60-0.80 | Fairly specific | Archive, Museum, Library |
|
|
| 0.80-1.00 | Highly specific | LinkedInConnectionExtraction |
|
|
|
|
**Migration Notes**:
|
|
- Old: `template_specificity` slot with `TemplateSpecificityScores` class
|
|
- New: `has_or_had_score` slot with `TemplateSpecificityScore` class (multivalued)
|
|
- Old class archived: TemplateSpecificityScores → archive/
|
|
|
|
slots:
|
|
- has_or_had_type
|
|
- has_or_had_score
|
|
|
|
slot_usage:
|
|
has_or_had_type:
|
|
description: The template type this score applies to.
|
|
range: TemplateSpecificityType
|
|
required: true
|
|
has_or_had_score:
|
|
description: |
|
|
The relevance score (0.0-1.0) for this template.
|
|
Lower scores indicate broader relevance.
|
|
range: float
|
|
required: true
|
|
minimum_value: 0.0
|
|
maximum_value: 1.0
|
|
|
|
annotations:
|
|
specificity_score: 0.15
|
|
specificity_rationale: |
|
|
Low specificity (meta-class) - TemplateSpecificityScore is part of the
|
|
RAG scoring infrastructure. Broadly relevant for understanding schema
|
|
organization but not for domain content queries.
|
|
migration_source: template_specificity
|
|
migration_date: "2026-01-17"
|
|
replaces_class: TemplateSpecificityScores
|
|
rule_compliance: "Rules 37, 38, 39, 53, 56 (specificity, slot centralization, RiC-O naming, full migration, semantic consistency)"
|
|
|
|
examples:
|
|
- value: |
|
|
archive_relevance:
|
|
has_or_had_type: ArchiveSearchTemplateType
|
|
has_or_had_score: 0.85
|
|
description: "High relevance for archive-specific class"
|
|
|
|
- value: |
|
|
museum_relevance:
|
|
has_or_had_type: MuseumSearchTemplateType
|
|
has_or_had_score: 0.20
|
|
description: "Low relevance (broadly applicable) for general class"
|
|
|
|
- value: |
|
|
# Multiple scores for a single class
|
|
scores:
|
|
- has_or_had_type: ArchiveSearchTemplateType
|
|
has_or_had_score: 0.95
|
|
- has_or_had_type: LibrarySearchTemplateType
|
|
has_or_had_score: 0.30
|
|
- has_or_had_type: GeneralHeritageTemplateType
|
|
has_or_had_score: 0.45
|
|
description: "Class with varying relevance across templates"
|