Home | Specification | Spec v1.0 | Context | Primer | Examples | Governance | Limitations | Releases


Recursive-LD Examples

Canonical Representations for Recursive-LD v1.0


1. Basic CognitiveTrace

This is the minimal valid CognitiveTrace in Recursive-LD v1.0.

{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "CognitiveTrace",
  "layerId": "layer-1",
  "intent": "Interpret user question",
  "input": "User asked for a basic example",
  "output": "Provide minimal CognitiveTrace",
  "confidence": 0.93
}

2. Two-Layer Recursive Reasoning

Shows how a recursive layer references its parent.

{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "CognitiveTrace",
  "layerId": "layer-1",
  "intent": "Determine the meaning of a query",
  "input": "User asked for recursive example",
  "output": "Prepare explanation",
  "confidence": 0.90
}
{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "RecursiveStep",
  "layerId": "layer-2",
  "parentLayer": "layer-1",
  "intent": "Refine explanation",
  "input": "Output of layer-1",
  "output": "Add recursion details",
  "confidence": 0.88
}

3. Three-Step Layered Reasoning Chain

A complete recursive refinement chain across three steps.

{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "CognitiveTrace",
  "layerId": "layer-1",
  "intent": "Identify user task",
  "input": "User asked for multi-step example",
  "output": "Determine need for chain",
  "confidence": 0.92
}
{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "RecursiveStep",
  "layerId": "layer-2",
  "parentLayer": "layer-1",
  "intent": "Construct intermediate reasoning",
  "input": "layer-1 output",
  "output": "Outline multi-step structure",
  "confidence": 0.89
}
{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "RecursiveStep",
  "layerId": "layer-3",
  "parentLayer": "layer-2",
  "intent": "Finalize recursive example",
  "input": "layer-2 output",
  "output": "Produce full three-layer chain",
  "confidence": 0.87
}

4. Example with Lineage Metadata

Demonstrates epistemic provenance attached to the reasoning step.

{
  "@context": "https://recursive-ld.org/context.json",
  "@type": "CognitiveTrace",
  "layerId": "layer-1",
  "intent": "Summarize input",
  "input": "Short paragraph provided",
  "output": "Generated summary",
  "lineage": {
    "source": "user-input",
    "timestamp": "2025-11-15T10:55:00Z"
  },
  "confidence": 0.91
}

© Recursive-LD Standard — Examples