> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xkat.space/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Control Pipeline

> Golden Templates and the multi-layer validation pipeline.

Generating commercial-quality educational content with AI requires controlling the
model's uncertainty. xkat does this with a layered pipeline rather than a single
prompt — the core of its content engine.

## The central idea: Golden Templates

A few **perfectly constructed example lessons** (few-shot "Golden Templates") are
far more effective than hundreds of lines of instructions. The AI is made to match
a flawless reference, and your course constraints (difficulty, length) are treated
as **immutable** rather than as suggestions.

## Layered validation

<CardGroup cols={2}>
  <Card title="Validation & retry" icon="rotate">
    Structured-output checks reject rule-breaking content and drive a
    self-correction loop until it conforms.
  </Card>

  <Card title="Structured generation" icon="lock">
    Where possible, generation is constrained to a schema so output can't drift
    outside the allowed shape.
  </Card>

  <Card title="Integrity validation" icon="circle-check">
    Required nodes and their connections are verified immediately after generation.
  </Card>

  <Card title="The Harness" icon="shield-check" href="/en/studio/harness">
    Code is validated for syntax and quality before publishing.
  </Card>
</CardGroup>

## English-Pivot generation

Content is generated in **English first** for maximum logical depth, then
translated and dual-stored alongside the original — see
[Translation & Publishing](/en/studio/translation-publishing).

## Why it matters

The combination of strong AI control (via Golden Templates) and English-Pivot
generation is what turns probabilistic AI output into **"knowledge that runs"** —
reliable enough that learners trust it and creators can sell it.
