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

# Prompting & outputSchema Best-Practices

> A best-practice cookbook with recipes for steering Corti generation — via the instructions block (contentPrompt, writingStylePrompt, miscPrompt) and via outputSchema (descriptions, enums, patterns).

<Badge className="accent-badge" shape="rounded">Beta</Badge>

## The 3 areas for prompts

Prompting in Corti happens on three surfaces in the `generation` block, and they form a hierarchy. Each one steers the model less forcefully than the one above it. Use all three, but put each instruction on the strongest surface that fits: placement matters more than volume.

1. Section-level **instructions — primary signal**. The `contentPrompt`, `writingStylePrompt`, and `miscPrompt` fields. Your main lever: free-text direction over what a section contains, says and how it reads.
2. Section-level `outputSchema` descriptions — **secondary signal**. Each node's description is targeted, per-field guidance: narrower in scope than instructions and lower in the hierarchy, but precise where it applies.
3. Section-level `heading` — **ambient signal**. A clear, self-explanatory heading (or a standard clinical-note section name) is always present and nudges the model even with no other instruction. Weakest, but free.

<Info>In addition to section-level prompts, the surface of **`instructions`** also exist at the Template-level where the prompt applies generally to all sections.</Info>

<Tip>This cookbook captures the patterns Corti's own Standards converge on, and is the prompting counterpart to [Customize (Cookbook)](/textgen/customization-cookbook): Customize tells you **where** to put changes; this cookbook tells you **what to write** inside them. Schema mechanics live in [Section Schemas](/textgen/section-schemas) — here we include them to be part of the prompts.</Tip>

## Section-level instructions

| Field                         | Use for                                                                                              | Don't use for                             |
| ----------------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| `contentPrompt`               | The **semantic content** routed to this section — what substance belongs here vs. adjacent sections. | How to render it; tone; structure; voice. |
| `writingStylePrompt`          | The general section's **style** — voice, person, length, register, terminology.                      | What content belongs; rendering rules.    |
| `outputSchema` `description`s | The **node specific guidelines** — Prompt instructions for each specific node in the `outputSchema`  | Restating content scope or global style.  |

The litmus test for a prompt you're about to write:

* *"What information goes in this section?"* → `contentPrompt` (Include/Exclude).
* *"How should the prose read, in general in this section?"* → the `writingStylePrompt`
* *"How should **this specific node** behave"* → the relevant
  `outputSchema` `description`, at the node it applies to (top-level
  description for whole-output instructions; a field/item `description` for
  field-specific ones).

## Recipes

<CardGroup cols={2}>
  <Card title="1. contentPrompt — Include / Exclude" href="/textgen/prompting-cookbook/recipe-1-content-prompt" icon="circle-1">
    The "what to write about" prompt. Pair `Include` with `Exclude` when neighbouring sections have related scope.
  </Card>

  <Card title="2. writingStylePrompt — rules + examples" href="/textgen/prompting-cookbook/recipe-2-writing-style" icon="circle-2">
    Tone, voice and style instructions.
  </Card>

  <Card title="3. miscPrompt — defensive guardrails" href="/textgen/prompting-cookbook/recipe-3-misc-prompt" icon="circle-3">
    Fall-back lever for repeated misbehaviour `contentPrompt` and `outputSchema` can't prevent — edge cases, layout, vocabulary, prohibitions.
  </Card>

  <Card title="4. outputSchema descriptions — per-node prompting" href="/textgen/prompting-cookbook/recipe-4-output-schema-descriptions" icon="circle-4">
    The second free-form prompting surface — scoped per node (field, item, top-level). Use for per-slot scope, formatting rules, and fallbacks.
  </Card>

  <Card title="5. Template instructions.prompt — domain priming" href="/textgen/prompting-cookbook/recipe-5-template-instructions" icon="circle-5">
    The single template-level prompt. Prime the model with specialty, setting, and shared rules that apply to every section.
  </Card>
</CardGroup>

## Related

<Columns cols={2}>
  <Card title="Section Schemas" href="/textgen/section-schemas" icon="braces">
    The `outputSchema` surface in detail — typed constraints + rendering primitives.
  </Card>

  <Card title="Corti Standards" href="/textgen/corti-standards" icon="library">
    Source material for these recipes.
  </Card>

  <Card title="Create a Section" href="/textgen/section-creation" icon="list-tree">
    Where both surfaces live — the `instructions` and `outputSchema` blocks.
  </Card>

  <Card title="Customize (Cookbook)" href="/textgen/customization-cookbook" icon="book-open">
    Structural customization — pair these prompts with the right persistence strategy.
  </Card>
</Columns>
