Skip to content
Prompt Maker Studio

How to use variables in AI prompt templates

Build a weekly update template with {{variables}}, add hints and example inputs, and copy a filled prompt into your preferred AI assistant.

A prompt variable is a placeholder for a detail that changes each time you use a prompt. Write it in double braces, such as {{team}}. The editor detects it and gives you a field to fill in, so you can reuse the instructions without editing them each time.

Turn changing details into variables

Start with an ordinary request:

Write a weekly update for Customer support using these notes: Updated the help center. Waiting for approval of the refund policy. Next: train the team.

The team and notes will change. Replace those details with {{team}} and {{notes}} in the section text. Follow the weekly update walkthrough to create the Task and Format sections. The resulting template preview looks like this:

<TASK>
Write a weekly update for {{team}} using these notes:
{{notes}}
</TASK>

<FORMAT>
Use three headings: Progress, Blockers, Next steps.
</FORMAT>

The surrounding tags come from the section names automatically. Variable names can contain letters, numbers, underscores, and hyphens, and must start with a letter or underscore. Use {{project_name}} rather than {{project name}}. Reusing the same name in several sections gives them one shared input.

Add hints and optional settings

  1. Find Variables below the sections. Variables appear here automatically when you type their placeholders in the section text.
  2. Add a hint such as "Who will receive this update?" for team. Hints appear inside the empty input fields when filling the prompt.
  3. If a value must be supplied before a complete copy, select its Required checkbox. Variables are optional unless you mark them required.
  4. Optionally enter an example input. Choose Save to keep hints, requirements, and examples with the template. Examples are not inserted automatically.

Fill in the template and copy the result

  1. In Preview, select Filled. On a phone, select Fill and copy to reach the preview. If you hid the desktop preview, choose Preview to show it again.
  2. Enter Customer support for team and this text for notes: Updated the help center. Waiting for approval of the refund policy. Next: train the team.
  3. If you saved example inputs, Load example inputs fills those values only when you choose it. It replaces the current values for variables with saved examples.
  4. Check the preview, choose Copy filled prompt, and paste the result into your assistant. Filling and copying needs no AI provider connection.

With the sample inputs above, the copied prompt is:

<TASK>
Write a weekly update for Customer support using these notes:
Updated the help center. Waiting for approval of the refund policy. Next: train the team.
</TASK>

<FORMAT>
Use three headings: Progress, Blockers, Next steps.
</FORMAT>

This is the text you send to the assistant, rather than an AI-generated update. Generating the update happens in the assistant you paste into, or through the optional Try once action using your connected provider.

Choose the right copy action

  • Copy template keeps the placeholders for reuse or editing elsewhere.
  • Copy filled prompt substitutes the values you entered. Missing optional values stay as placeholders, with a warning. Missing required values disable this action.
  • Copy with placeholders explicitly allows an incomplete copy, including missing required values. Use it when you plan to finish the inputs elsewhere.
  • Copy prompt is the label when the prompt has no variables.

Save keeps the template and its variable settings. It does not save the current filled values as example inputs; enter examples in Variables and save them explicitly if needed.

Put it to use

Sign in to keep your own library. Writing, saving, filling in, and copying prompts needs no AI provider connection. Paste a prompt, Refine, and Try once are optional actions that use the provider you connect.

Open Prompt Maker Studio

Keep learning