You have a prompt that works. Maybe it writes a decent follow-up email, or summarises a report the way you like. The problem is that you retype it every time, changing the name, the topic and the tone by hand, and sooner or later you miss one: the email goes out still addressed to last week's client, or the old deadline sits in the middle of the new request.

A template fixes that. You write the prompt once, mark the parts that change as variables, and fill in only those parts at each use. This guide shows how to build such a template and run it through the free Prompt Variable Filler on Ovatly, which detects the variables for you, substitutes your values everywhere they appear, and tells you plainly if you left one blank.

Contents

  • Quick answer
  • What a prompt variable is
  • Why templates beat retyping
  • How to fill a template, step by step
  • Worked example: an email prompt template
  • Naming variables well
  • Limitations worth knowing
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Write your prompt with the changing parts wrapped in double curly braces, like {{topic}} and {{name}}. Paste it into the Prompt Variable Filler: the tool detects every variable, shows a value field for each one, and substitutes your values everywhere the variable appears, including repeats. Check the unfilled list under the result; it should say nothing is left. Then copy the completed prompt into your AI tool. Any variable you leave blank stays visible in the output and is listed as unfilled, so a half-finished prompt never slips through unnoticed.

What a prompt variable is

A variable is a placeholder: a short name inside double curly braces that stands in for text you will supply later. In the sentence "Write a {{tone}} email to {{name}} about {{topic}}", the fixed wording carries the structure of the request, and the three variables carry everything that changes from one use to the next.

The rules are simple, and they come straight from how the tool reads your template. Anything wrapped in double curly braces counts as a variable. Names may contain letters, numbers, spaces, hyphens and underscores, so {{first name}} and {{customer_name}} both work. The tool lists each unique variable once, in the order it first appears, and gives you one field per variable. If the same variable appears twice in the template, you still fill it in once, and the value is substituted in both places.

One edge case is worth knowing: triple braces, like {{{name}}}, are treated as a literal brace around a normal {{name}} variable, so the output keeps one pair of braces around the substituted value.

Why templates beat retyping

Retyping a prompt from memory introduces small errors, and small errors in a prompt produce noticeably different answers. A template keeps the wording that works frozen, so the only thing that varies between runs is the parts you intend to vary. The email structure that produced a good message last month produces the same structure this month, with a new name and topic dropped in.

Templates also make a prompt shareable. A colleague does not need to understand why the prompt is phrased the way it is; they need to know what to put in the {{topic}} field. And because the tool lists unfilled variables instead of guessing, the failure mode is visible: an unfinished prompt announces itself rather than quietly sending a placeholder to the model.

How to fill a template, step by step

  1. Paste a template that contains variables in double curly braces into the Prompt Variable Filler.
  2. Fill in the value field that appears for each detected variable. The fields are labelled with the exact variable names from your template.
  3. Check the unfilled list under the result; it should say nothing is left. An empty value counts as unfilled, so a field you opened but left blank still shows up here.
  4. Copy the completed prompt and use it in your AI tool.

Worked example: an email prompt template

The tool's own example starts with this template:

Write a {{tone}} email to {{name}} about {{topic}}.

Fill in three values: tone = friendly, name = Priya, topic = the project deadline. The result is a finished prompt:

Write a friendly email to Priya about the project deadline.

The tool reports 3 placeholders filled and none unfilled. Now leave topic blank and run it again. The result keeps {{topic}} in place, reading "Write a friendly email to Priya about .", and topic is listed as unfilled. That visible leftover is the point: you can see exactly what is missing before the prompt goes anywhere, fill it in, and copy again.

Naming variables well

The tool accepts a wide range of names, but readable names make templates easier to reuse. Keep names short and consistent: if one template calls it {{name}} and another calls it {{person name}}, you will hesitate over the second one. Names with spaces work fine, as {{first name}} shows, but pick one style, words separated by spaces, hyphens or underscores, and stick to it across your templates.

Name variables after the thing they hold, not after the value. {{topic}} invites any subject; {{deadline}} would invite only one kind. A template whose variables describe their contents can be handed to someone else with no explanation, which is most of the value of having a template at all.

Limitations worth knowing

The filler does substitution, nothing more. It does not judge whether your values make sense, whether the finished prompt is well written, or whether a value contradicts another part of the template. A tone of "friendly" and a topic that demands a formal warning will be combined exactly as written.

It also cannot invent values. A variable you have no answer for stays a placeholder, by design. And the template itself has to exist first: the tool fills templates, it does not write them. If you are still shaping the underlying prompt, the Prompt Builder assembles one from guided fields; once the wording settles, convert it into a template with variables.

Common mistakes

  • Using single braces or brackets. Only double curly braces are detected. A placeholder written as {name} or [name] is treated as ordinary text and will reach the model unchanged.
  • Leaving a field blank and copying anyway. The unfilled list exists to stop exactly this. If it names a variable, fill it before you copy.
  • Inconsistent names for the same thing. {{name}} and {{Name}} in one template read as different variables with different fields; keep spelling and capitalisation consistent so one value covers every mention.
  • Making the whole prompt a variable. A template that is mostly placeholders has no structure worth reusing. Keep the instruction wording fixed and mark only the parts that genuinely change.

FAQs

What counts as a variable? Anything wrapped in double curly braces, like {{customer_name}}. The tool lists each unique variable once, in the order it first appears.

Can a variable contain spaces? Yes, {{first name}} works, and the value field is labeled with that exact name. Keep names short and consistent so templates stay readable.

What happens if I miss a value? The placeholder is left untouched in the output and named in the unfilled list, so you can fill it and copy again.

What if the same variable appears twice in my template? You fill it in once. The tool detects each unique variable a single time and substitutes your value in both places, so repeats always match.

Is my template stored or sent anywhere? No. Detection and substitution happen in your browser on this page.

Conclusion

A reusable template separates the two halves of a good prompt: the wording that works, written once, and the details that change, filled in at each use. The Prompt Variable Filler handles the mechanical half, detection, substitution and the unfilled check, in your browser. Once your templates rely on examples as well as variables, the companion guide Few-Shot Prompting Explained: Showing the AI Examples First covers the other half of reusable prompt structure. More guides like this one live in the AI and Prompt Tools guides archive.