glam/schemas/20251121/linkml/modules/classes/ReasoningContent.yaml
kempersc fc405445c6 Refactor and update schema definitions
- Removed obsolete slots: `has_or_had_custodian_observation`, `provider`, and `specificity_annotation`.
- Updated `has_or_had_score` slot to use `SpecificityScore` class and modified its description and examples.
- Added new slots: `end_seconds`, `end_time`, `has_archive_path`, `has_or_had_custodian_name`, `protocol_name`, and `protocol_version`.
- Introduced a script `check_annotation_types.py` to validate the presence and structure of `custodian_types` in YAML files.
- Added a script `update_specificity.py` to automate updates related to `SpecificityAnnotation` to `SpecificityScore`.
2026-02-01 19:55:38 +01:00

119 lines
3.3 KiB
YAML

id: https://nde.nl/ontology/hc/class/ReasoningContent
name: reasoning_content_class
title: Reasoning Content Class
prefixes:
linkml: https://w3id.org/linkml/
hc: https://nde.nl/ontology/hc/
schema: http://schema.org/
prov: http://www.w3.org/ns/prov#
default_prefix: hc
imports:
- linkml:types
- ../slots/has_or_had_description
- ../slots/has_or_had_identifier
- ../slots/has_or_had_label
classes:
ReasoningContent:
class_uri: prov:Entity
description: 'LLM reasoning content that is preserved across conversation turns.
**DEFINITION**:
ReasoningContent represents the chain-of-thought reasoning that LLMs like
GLM 4.7 expose through their thinking modes. This class captures the
reasoning_content that should be preserved when using "Preserved Thinking"
mode for multi-turn conversations.
**GLM 4.7 Preserved Thinking** (https://docs.z.ai/guides/capabilities/thinking-mode):
When `clear_thinking: false` (Preserved Thinking enabled):
- Reasoning content from previous turns is retained in context
- Improves model performance and increases cache hit rates
- Requires returning EXACT, UNMODIFIED reasoning_content back to API
**Migration from clear_thinking**:
This class replaces the boolean `clear_thinking` slot with a structured
representation of what is being preserved:
| Old Pattern | New Pattern |
|-------------|-------------|
| `clear_thinking: false` | `preserves_or_preserved: ReasoningContent` with
`is_preserved: true` |
| `clear_thinking: true` | `preserves_or_preserved: ReasoningContent` with `is_preserved:
false` |
**PROV-O Alignment**:
- ReasoningContent IS a prov:Entity (the reasoning output)
- Links to LLMResponse via preserves_or_preserved slot
- Enables tracking reasoning provenance across turns
**Use Cases**:
- Multi-turn agent conversations with preserved context
- Debugging reasoning chain across API calls
- Auditing LLM decision-making process
- Optimizing cache hit rates
'
exact_mappings:
- prov:Entity
close_mappings:
- schema:Comment
- schema:Review
slots:
- has_or_had_label
- has_or_had_description
- has_or_had_identifier
slot_usage:
has_or_had_label:
examples:
- value: Turn 3 Reasoning
has_or_had_description:
examples:
- value: Chain-of-thought reasoning for heritage institution extraction
has_or_had_identifier:
examples:
- value: reasoning-turn-3-20260119-143000
annotations:
specificity_score: 0.8
specificity_rationale: Highly specific to LLM API reasoning preservation domain
custodian_types: '["D"]'
custodian_types_rationale: Applies to Digital Platform custodians using LLM
APIs
examples:
- value:
has_or_had_label: Preserved Reasoning
- value:
has_or_had_label: Cleared Context
has_or_had_description: Fresh context for new query topic
comments:
- Created from slot_fixes.yaml migration (2026-01-19)
- Replaces boolean clear_thinking with structured reasoning preservation
- Enables tracking what reasoning is preserved and why
- PROV-O Entity alignment for provenance tracking