glam/schemas/20251121/linkml/modules/classes/ReasoningContent.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

135 lines
4.9 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
attributes:
is_preserved:
range: boolean
required: true
description: |
Whether this reasoning content is preserved across turns.
- **true**: Preserved Thinking enabled (keep reasoning, better cache hits)
- **false**: Clear previous reasoning (fresh context each turn)
Maps to the inverse of the old `clear_thinking` boolean:
- `is_preserved: true` ≡ `clear_thinking: false`
- `is_preserved: false` ≡ `clear_thinking: true`
content_text:
range: string
required: false
description: |
The actual reasoning content text (chain-of-thought).
Optional - may be omitted if only tracking preservation status.
examples:
- value: |
The user is asking about Dutch heritage institutions. I need to identify:
1) Institution name: Rijksmuseum
2) Type: Museum (maps to InstitutionTypeEnum.MUSEUM)
3) Location: Amsterdam (city in Noord-Holland province)...
description: GLM 4.7 reasoning trace
turn_number:
range: integer
required: false
description: |
The conversation turn number this reasoning came from.
Useful for tracking reasoning provenance across multi-turn conversations.
token_count:
range: integer
required: false
description: |
Number of tokens in the reasoning content.
Important for context window management.
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.80
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