# Create an AI prompt

> Add an AI prompt under Automation, write the user and system prompts, set up dynamic variables and responses, and test it before you use it.

Source: https://tadabase.com/docs/ai-features/adding-ai-prompts-in-tadabase  
Status: Verified Nov 17, 2026. Checked against the current product

Create an AI prompt once, then run it from forms, page components and workflows. This page walks through the prompt form and its **Test Playground**. For what AI prompts are and which plans include them, see [How AI prompts work](https://tadabase.com/docs/ai-features/ai-prompts-complete-guide).

## Add a prompt

1. **Open AI Prompts** In the builder, go to **Automation** > **AI Prompts**.
2. **Start a new prompt** Click **Add New AI Prompt** to start from a blank form, or **Add AI From Template** to pick a ready-made prompt. If the app has no prompts yet, the **Add New AI Prompt** button opens the template list: choose a template, then open the new prompt to edit it.
3. **Name it** On the **General** tab, enter a **Name**. This is how you pick the prompt in forms, components and workflows. **Description** is optional and only for you.
4. **Write the User Prompt** Enter the instruction in **User Prompt**. Put a dynamic variable in curly brackets wherever a value from your app goes, for example: Summarize these job notes in two sentences: {Notes}
5. **Write the System Prompt** Enter a fixed instruction in **System Prompt**, for example: Write in plain English. Keep it under 50 words. It is sent with every request.
6. **Set the Status** Leave **Status** on **Active**. A new prompt starts as Active.
7. **Add the variables and responses** Fill in the **Dynamic Variables** and **Response** tabs (see below).
8. **Save** Click **Save**. Name, User Prompt and System Prompt are required; without them you see Please enter name, Please enter user prompt or Please enter system prompt.

![The AI prompt form with the General tab open and the Test Playground on the right](https://tadabase.com/docs-shots/ai-features-prompt-form.webp)

## Dynamic variables

The **Dynamic Variables** tab lists the placeholders the prompt uses. When the prompt runs, each `{Slug}` in the prompt is replaced with the value supplied by the form, component or workflow.

| Column or button | What it does |
| --- | --- |
| **Slug** | The variable's name, exactly as written inside the curly brackets in the prompt. Do not add the brackets here. |
| **Default Value** | The value used when no value is supplied for this variable. |
| **Add New Field** | Adds an empty variable row. |
| **Auto Add** | Reads the User Prompt and System Prompt and adds a row for every `{...}` placeholder that is not listed yet. |

When you pick the prompt in a form, component or workflow, you choose which field or value fills each variable.

## Responses

The **Response** tab defines the answers you want back. Click **Add New Response** for each one. You can add several responses to get more than one answer from a single run, for example a summary and a priority.

| Column | What it does |
| --- | --- |
| **Type** | **String**, **Number** or **Boolean**. Match the type of the field you will save the answer into. |
| **Name** | The response's reference name. You use it to map the answer to a field. |
| **Description** | Extra instructions for this answer, such as the format or length. |
| **Allowed Responses** | For String responses only: the values the AI may return, separated by commas (for example `Low, Medium, High`). |
| **Output** | **Plain**, **HTML** or **Markdown**. |
| **Required** | **Yes** makes the AI always include this response, even if it is blank. |

## Read a file with the prompt

Turn on **Allow Attachment** on the **General** tab to send a file (a PDF or an image) along with the prompt. An `ATTACHMENT_URL` row then appears on the **Dynamic Variables** tab; when you use the prompt, map it to the file you want read.

> **Note:** **Allow Attachment** only shows when your plan includes attachments in AI prompts.

## Test the prompt

The **Test Playground** panel opens on the right of the form. Click **Test Playground** or **Hide Test Playground** at the top to show or hide it. It runs the prompt as it is in the form, so you can test before saving.

1. **Enter test values** Under **Test Variables**, type a value for each dynamic variable. Default values are filled in for you. If **Allow Attachment** is on, paste a file link into **Attachment URL**.
2. **Run it** Click **Generate Response**. Both User Prompt and System Prompt must be filled in.
3. **Check the answer** **AI Output** shows each response by name, with how long the run took and the tokens it used. **Resolved User Prompt** shows the prompt with your test values filled in.

> **Note:** Test runs count as AI prompt runs: they need the plan feature and are refused once the daily token limit is reached. A test of a saved prompt is also recorded on its **Logs** tab.

If the test fails, the error shows in **AI Output**. See [Check AI prompt logs and fix errors](https://tadabase.com/docs/ai-features/check-ai-prompt-logs) for what each message means.

## Delete a prompt

Open the prompt and click **Delete**, then confirm.
