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

# Sections

> How each Smart Template section resolves its prompt

A Smart Template is a map of sections. Each section has this shape:

```jsonc theme={null}
{
  "instructionSet": { "telepatiaPromptId": "...", "values": { /* ... */ } }, // optional
  "systemPrompt": "...",                                                     // optional
  "schema": { /* OutputSchema */ }                                           // required
}
```

## Prompt resolution (first-match-wins waterfall)

For each section, Telepatia picks the prompt in this order:

1. **`systemPrompt`** — your own inline prompt (Custom Section).
2. **`instructionSet.telepatiaPromptId`** — a curated Telepatia prompt (Telepatia Section — **recommended**).
3. **Generic fallback** — no prompt; extraction is driven only by `schema.instructions`.

<Tip>
  **Prefer Telepatia Sections when one fits.** Telepatia's clinical team curates and updates the prompts behind each `telepatiaPromptId`. You get clinical quality without owning prompt-engineering. See the [Telepatia Prompts catalog](/scribe-api/telepatia-nodes).
</Tip>

Sections run **in parallel**. A failed section does not block the others — it simply comes back with `status: "failed"` and an error message.

## Telepatia Section (recommended)

Reference a curated prompt by id. Optionally pass `values` to tune behavior (see the [catalog](/scribe-api/telepatia-nodes) for available knobs).

```jsonc theme={null}
"chiefComplaint": {
  "instructionSet": {
    "telepatiaPromptId": "CHIEF_COMPLAINT",
    "values": { "language_type": "quotes" }
  },
  "schema": {
    "type": "object",
    "instructions": "Extract the chief complaint",
    "properties": {
      "chiefComplaint": { "type": "string", "instructions": "Patient's own words" }
    }
  }
}
```

## Custom Section

Write your own prompt. Full control — and full ownership.

```jsonc theme={null}
"dischargeSummary": {
  "systemPrompt": "Generate a discharge summary based on the encounter.",
  "schema": {
    "type": "object",
    "instructions": "Discharge summary",
    "properties": {
      "summary": { "type": "string", "instructions": "Concise discharge text" }
    }
  }
}
```

Use Custom Sections when:

* The section isn't covered by a Telepatia Prompt.
* You need institution-specific phrasing or formatting.
* You're matching a proprietary EHR schema verbatim.

<Note>
  Finding yourself authoring the same Custom prompt across many templates? Reach out — it's a candidate for becoming a Telepatia Prompt.
</Note>

## Generic fallback

If you provide neither `systemPrompt` nor `instructionSet`, Telepatia extracts the field best-effort from the transcript using only `schema.instructions`.

```jsonc theme={null}
"weightKg": {
  "schema": { "type": "number", "instructions": "Patient weight in kg" }
}
```

Use this only for simple, unambiguous fields. For anything clinical, prefer a Telepatia Section.

## Mixing modes

You can mix Telepatia Sections, Custom Sections, and fallback Sections in the same Smart Template. Each section resolves independently.
