> ## 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.

# Recipe 5 — template instructions.prompt: domain & cross-section priming

> Use the template-level instructions.prompt to prime the model with domain context and to centralise instructions that apply to every section in the template.

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

← Back to [Prompting & outputSchema Cookbook](/textgen/prompting-cookbook)

## What it is for

`instructions.prompt` on a template sits **once at the top of the template** and applies to every section inside it. Two jobs:

1. **One place for cross-section instructions.** Anything that applies to every section in this template — guidance you'd otherwise have to paste into every section's `contentPrompt` or `miscPrompt` — lives here once.
2. **Domain & use-case priming.** A single sentence telling the model what kind of note this is, the specialty, the care setting. Cheap to write; sharpens every section's output downstream.

## Examples

A minimal, effective template prompt is just one sentence:

```
Note template to use for an ophthalmology exam in NHS.
```

Or a cross-section rule that would otherwise be repeated in each section:

```
Throughout this note, use standard NHS terminology and refer to the patient as "the patient" rather than by name in any section.
```

Combine both when both apply:

```
This is an ED triage note for a paediatric urgent care setting in the NHS. Throughout, use standard NHS terminology and refer to the patient by age and gender only.
```

## Where it sits in the prompt hierarchy

The template prompt has **lower priority** than the section's own `instructions` — if a section's `contentPrompt`, `writingStylePrompt` or `miscPrompt` says one thing and the template prompt says another, the section wins. But the model reads the template prompt **before** the section's `writingStylePrompt` and `outputSchema` descriptions, so it acts as a frame the rest of the prompt fills in.

| Priority    | Surface                                                                      |
| :---------- | :--------------------------------------------------------------------------- |
| 1 (highest) | Section `instructions` — `contentPrompt`, `writingStylePrompt`, `miscPrompt` |
| 2           | **Template `instructions.prompt`** ← this recipe                             |
| 3           | `outputSchema` descriptions and typed constraints                            |

Use it for framing and shared rules, not to override what individual sections already say.

## Anti-patterns

* **Don't restate what the template sections already clearly prompt for.**
* **Don't bury per-section rules here.** If only the HPI section needs a rule, put it in HPI's `contentPrompt` or `miscPrompt`. The template prompt is for rules that apply to *every* section.
* **Keep it limited and simple.** Long template prompts compete with section-level instructions for attention. If it's growing, the rule probably belongs in a specific section.

## Related

* [Recipe 1 — contentPrompt](/textgen/prompting-cookbook/recipe-1-content-prompt) — per-section scope.
* [Recipe 2 — writingStylePrompt](/textgen/prompting-cookbook/recipe-2-writing-style) — per-section voice.
* [Create a Template](/textgen/template-creation) — where `instructions.prompt` lives in the template create body.
