glam/schemas/20251121/linkml/modules/classes/TemplateSpecificityScore.yaml
kempersc ca4a54181e Refactor schema files to improve clarity and maintainability
- Updated WorldCatIdentifier.yaml to remove unnecessary description and ensure consistent formatting.
- Enhanced WorldHeritageSite.yaml by breaking long description into multiple lines for better readability and removed unused attributes.
- Simplified WritingSystem.yaml by removing redundant attributes and ensuring consistent formatting.
- Cleaned up XPathScore.yaml by removing unnecessary attributes and ensuring consistent formatting.
- Improved YoutubeChannel.yaml by breaking long description into multiple lines for better readability.
- Enhanced YoutubeEnrichment.yaml by breaking long description into multiple lines for better readability.
- Updated YoutubeVideo.yaml to break long description into multiple lines and removed legacy field name.
- Refined has_or_had_affiliation.yaml by removing unnecessary comments and ensuring clarity.
- Cleaned up is_or_was_retrieved_at.yaml by removing unnecessary comments and ensuring clarity.
- Added rules for generic slots and avoiding rough edits in schema files to maintain structural integrity.
- Introduced changes_or_changed_through.yaml to define a new slot for linking entities to change events.
2026-01-31 00:46:23 +01:00

49 lines
No EOL
3.2 KiB
YAML

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.\n\n**Purpose** (Rule 37):\nEnables context-aware RAG retrieval by assigning relevance scores\n(0.0-1.0) to schema classes for different conversation templates.\n\n**Design Pattern**:\nReplaces the previous `TemplateSpecificityScores` class which had\n10 separate score slots (one per template). The new pattern uses:\n- `has_or_had_type` \u2192 `TemplateSpecificityType` (which template)\n- `has_or_had_score` \u2192 float (the relevance score)\n\n**Benefits**:\n- Extensible: Adding new templates doesn't require new slots\n- Consistent: Follows RiC-O naming conventions (Rule 39)\n- Reusable: Uses generic slots per Rule 38 (slot centralization)\n\n**Score Semantics** (LOWER = more broadly relevant):\n| Score Range | Meaning | Examples |\n|-------------|---------|----------|\n| 0.00-0.20 | Universal | HeritageCustodian, Location |\n| 0.20-0.40 | Broadly useful | Collection, Identifier |\n| 0.40-0.60\
\ | Moderately specific | ChangeEvent, PersonProfile |\n| 0.60-0.80 | Fairly specific | Archive, Museum, Library |\n| 0.80-1.00 | Highly specific | LinkedInConnectionExtraction |\n\n**Migration Notes**:\n- Old: `template_specificity` slot with `TemplateSpecificityScores` class\n- New: `has_or_had_score` slot with `TemplateSpecificityScore` class (multivalued)\n- Old class archived: TemplateSpecificityScores \u2192 archive/\n"
slots:
- has_or_had_type
- has_or_had_score
slot_usage:
has_or_had_type:
range: TemplateSpecificityType
required: true
has_or_had_score:
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)
custodian_types: "['*']"
examples:
- value: "archive_relevance:\n has_or_had_type: ArchiveSearchTemplate\n has_or_had_score: 0.85\n"
- value: "museum_relevance:\n has_or_had_type: MuseumSearchTemplate\n has_or_had_score: 0.20\n"
- value: "# Multiple scores for a single class\nscores:\n - has_or_had_type: ArchiveSearchTemplate\n has_or_had_score: 0.95\n - has_or_had_type: LibrarySearchTemplate\n has_or_had_score: 0.30\n - has_or_had_type: GeneralHeritageTemplate\n has_or_had_score: 0.45\n"