glam/schemas/20251121/linkml/modules/classes/ReasoningContent.yaml

119 lines
3.2 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_description
- ../slots/identified_by
- ../slots/has_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_label
- has_description
- identified_by
slot_usage:
has_label:
examples:
- value: Turn 3 Reasoning
has_description:
examples:
- value: Chain-of-thought reasoning for heritage institution extraction
identified_by:
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_label: Preserved Reasoning
- value:
has_label: Cleared Context
has_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