When an audit reaches a step that uses AI, such as writing the summary or estimating effort, Structurell sends the AI a set of instructions. **Prompt Templates** set those instructions and the model the AI uses. **Prompt Context Fragments** are short pieces of extra guidance added to every request of the same type. Both are under **Account → Settings → AI**. Most subscriptions never need to change them, but they're there if you want your audit write-ups to follow a particular style.

## Before you start

- These pages are for subscription administrators.
- AI must be included in your subscription's package. See [Package and add-ons](/account-and-access/package-and-add-ons).
- Templates and fragments affect the AI steps in audits. See [Audits and findings](/assure-and-diagnose/audits-and-findings).
- Each template and fragment has a **Type**. Structurell matches it to the audit step that uses it, so the type must exactly match the one that step expects. If you're not sure which type to use, contact support before creating a new template.

## What you start with

Structurell creates a starting set for your subscription automatically:

- A template called **Website Audit Summary**, which asks the AI for concise, actionable results.
- Three context fragments that go with it: **Risk scoring guidance**, **Effort guidance** and **Output contract**.

These are marked **Seeded default**.

## How templates and fragments are used

When an audit asks the AI for help, Structurell looks for an enabled prompt template with a matching **Type**. If it finds one, it uses that template's **System prompt**, **Model**, **Temperature** and **Max tokens**. If it doesn't, it uses Structurell's built-in defaults.

Every enabled prompt context fragment with the same **Type** is added to the request as extra guidance. Disable a fragment to stop it being included without deleting it.

If the model you choose isn't available, Structurell falls back to your subscription's standard AI model so the audit can still finish.

## Create a prompt template

1. Open **Prompt Templates** under **Account → Settings → AI**.
2. Select **New**.
3. On the **General** tab, fill in:
   - **Code** and **Name**, which identify the template.
   - **Type**, which decides which audit step uses the template.
   - **Status**. Only enabled templates are used.
   - **Model**, **Temperature** and **Max tokens** (optional). A lower temperature gives more consistent wording.
   - **System prompt**: the main instructions for the AI.
4. On the **Configuration** tab, set the **Response format** (**JSON** or **Text**) and the other options: **Include fragments**, **Include findings breakdown**, **Max recommendations** and **Output fields**.
5. Select **Save**.

If more than one enabled template has the same **Type**, it isn't obvious which one will be used. Keep one enabled template per type and disable the others.

## Create a prompt context fragment

1. Open **Prompt Context Fragments** under **Account → Settings → AI**.
2. Select **New**.
3. On the **General** tab, fill in the **Type**, **Code**, **Name** and **Status**, then write the guidance in **Content**. Keep each fragment short and focused on one thing, for example how to rate risk.
4. On the **Configuration** tab you can record a **Scope**, **Platform**, **Mode**, **Priority** and whether the fragment is **Required**.
5. Select **Save**.

## Enable, disable or delete

On the **Prompt Templates** or **Prompt Context Fragments** list, use the row menu to **Enable**, **Disable** or **Delete** a template or fragment. Disabling is safer than deleting while you experiment, because you can turn it back on later.

## Tips

- Change one thing at a time and run an audit to see the effect before changing anything else.
- Think carefully before disabling the **Output contract** fragment. It describes the shape of the answer the AI should return.

## Troubleshooting

- **No Prompt Templates** or **No Prompt Context Fragments** is shown. Select **New** to create one, or contact support if you expected to see the starting set.
- **An audit's AI summary doesn't reflect your template.** Check that the template is enabled and that its **Type** matches the audit step exactly.
- **An AI step fails with a limit message.** Your package's monthly AI allowance has been used. See [Package and add-ons](/account-and-access/package-and-add-ons).

## Related articles

- [AI settings and your AI brain](/assets-and-ai/ai-studio)
- [AI memory, rules and suggestions](/assets-and-ai/ai-memory-and-rules)