> For the complete documentation index, see [llms.txt](https://docs.rubica.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rubica.au/workflow/using-ai-to-build-and-refine-templates.md).

# Using AI to Build and Refine Templates

Once you've set up your workflow templates, you can also use AI to assist in refining and improving them. Rather than manually restructuring stages one by one, the built-in AI tool lets you describe the changes you want in plain language and generates an updated draft for you to review — making it faster to iterate on your workflows as your processes evolve.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2F375esNkFHtwn27nKysEb%2FUse%20AI%20to%20create%20Workflows.gif?alt=media&#x26;token=00ec43f8-da05-4ba3-ab22-2e644152af5c" alt=""><figcaption></figcaption></figure>

#### How to Access the AI Tool

1. Go to **Home → Settings → Workflow Templates**
2. Click on any existing template from the left-hand list (e.g. *Annual Review Flow*)
3. In the top-right corner of the template detail view, click the **✦ AI** button

#### The Refine Panel

When you click **AI**, a **Refine** panel opens with two sections side by side:

* **Left (chat area)** — where you describe the changes you want to make
* **Right (Current Template)** — a live view of the existing stages so you can reference them as you write your instructions

This means you never need to memorise the current structure — it's always visible while you work.

#### Describing Your Changes

Type your instructions in plain language. You can be as specific or as high-level as you like. Some examples:

* *"Swap stages 2 and 1"*
* *"Add a compliance review stage after stage 4"*
* *"Rename stage 3 to Strategy Review"*
* *"Remove the meeting reminder stage and move the preparation tasks earlier"*

Once you're happy with your instructions, click **✦ Generate Draft**. The AI will produce an updated version of the template for you to review before anything is saved.

#### Tips for Best Results

* Reference stages by **number or name** — both work equally well
* Be specific about **where** you want new stages inserted (e.g. "after stage 3" rather than just "add a new stage")
* You can make **multiple changes in one request** — no need to submit them one at a time
* The AI always produces a **draft first** — nothing changes on your live template until you approve it
