Prompt template

Also called prompt variables, reusable prompt, parameterised prompt

A reusable prompt with blanks, like {{AUDIENCE}}, that you fill in each time you use it.

A prompt template is a prompt written once and reused many times, with placeholders for the parts that change. On this site, placeholders are written in capitals inside double curly braces, such as {{EMAIL_TEXT}} or {{AUDIENCE}}. Other tools use single braces, square brackets or dollar signs, but the idea is the same.

Templates separate the stable part of a prompt, which you test and improve, from the variable part, which is different every time. That makes results more consistent and lets you share good prompts with a team. In software, templates are filled in by code before the prompt is sent to a model API, often from a database or a form.

A good template names its variables clearly, explains any that are not obvious, and keeps instructions outside the variables. It also handles the case where a variable is empty or unexpected, for example by telling the model what to do if the text is missing.

Example

A support team uses: "Reply to this customer message from {{CUSTOMER_NAME}}: {{MESSAGE}}. Our refund policy: {{POLICY}}. Answer in the first sentence, under 100 words." Agents fill in three fields instead of writing a prompt from scratch for each ticket.

Common mistake

Leaving placeholders unfilled. Sending "{{AUDIENCE}}" to a model literally confuses it, and it may invent an audience or treat the braces as content. Before sending, scan for any remaining braces, or use a tool like this site's fill-in fields that replaces them for you.

Find a prompt for the task in front of you.

96 prompts in 8 categories. Copy one, fill in the blanks, paste it into any model.

Browse prompts

Promptlexity is a free library of 96 AI prompts and 8 downloadable AI skills across 8 categories, plus a glossary of 64 AI and prompting terms. Each prompt shows the exact text to paste, the variables to fill in, an example of what comes back, and why it works. Each glossary term has a plain-English definition, an example and a common mistake. 6 step-by-step guides cover the basics. No signup, works with ChatGPT, Claude, Gemini and other models.

Press Esc to close