Aiodic

Back to the table

43 Intermediate Tm Prompt Templates Prompting

Prompt Templates

Reusable prompts with fill-in slots.

What it is

A prompt template is a prompt you've written once and use many times, with blanks where the details change. The fixed part holds everything you've learned about getting good results: the instructions, the tone, the format, the rules, maybe a couple of examples. The blanks, usually called slots or variables, hold the parts that are different each time, such as the book title, the product, or this week's topic.

Here's a small one for a job many self-publishers do over and over:

Write a back-cover blurb for my novel.
Title: [TITLE]
Genre and readership: [GENRE]
What happens (spoilers fine, I'll cut them): [PREMISE]

Rules: 150 to 180 words. Open with the main character in trouble,
not with the setting. End on a question or a stake, never a spoiler.
No clichés like "a race against time" or "nothing will ever be the same".

Next month, for the next book, you don't start again. You copy the template, replace the three bracketed slots, and paste it into your chatbot. Everything above and below the slots stays exactly as it was, including the lessons you learned the hard way (like banning "a race against time").

That's the whole idea, and it's simple enough that people discover it on their own. Almost everyone who uses AI regularly ends up with a notes file of prompts that worked. What turns that notes file into a real template library is a bit of discipline: clear slots, one agreed place to keep them, a version number, and a quick test whenever you change one.

Slots come in different notations, and the choice doesn't matter much as long as you're consistent. Square brackets like [TITLE] are the most common in everyday use because anyone can read them. Anthropic's developer tools mark variables with double curly braces, so the same slot would be {{TITLE}}, and its own documentation examples use names like {{ANNUAL_REPORT}}. LangChain, a popular developer toolkit, writes them in single braces, as in {title}, and fills them from code. Text expander apps have their own notation too. They are all the same idea: a named hole that gets filled before the prompt goes to the model.

A template is not the same thing as a system prompt, although the two are close relatives. A system prompt sets how an assistant behaves for a whole conversation, while a template is a single request you repeat. In practice a template often grows into a system prompt, as we'll see below. It's also different from a public list of "100 best prompts". Those are someone else's templates, written for someone else's work. The value of a template comes from being tuned to your job.

Why it matters

It keeps quality consistent. The first time you get a great product description out of an AI, a lot of it is luck: the right words, in the right order, on a good day. If you type a fresh prompt next week, you roll the dice again. A template freezes the version that worked, so the tenth product description gets the same instructions as the first. For a shop with 200 listings or an author with a twelve-book series, consistency is most of the point.

It stores what you've learned. Every good template is a record of mistakes you've already fixed. "No clichés like…" is there because the AI kept using them. "Open with the character, not the setting" is there because the first ten blurbs all started with fog rolling over a harbour. Without a template, those lessons live in your head and get forgotten. With one, they're applied every time, even on a tired Friday.

It saves time where you repeat yourself most. A good prompt for a chapter outline or a newsletter intro can run to half a page. Retyping it each time is slow, and you'll quietly skip parts. Filling three slots takes a minute.

It makes delegation possible. Once a template exists, someone else can run it: a virtual assistant, a co-author, a new team member. They don't need to know why each rule is there, only what to put in the slots. This is how small teams keep a shared voice across many hands.

It makes testing possible. You can't meaningfully test a prompt you rewrite every time. You can test a template. Fill its slots with ten real inputs, check the results, change one line, and run the same ten again. That's an eval, and templates are what make evals practical for ordinary people.

Small wording changes matter more than you'd think. Researchers have shown that language models can be surprisingly sensitive to trivial formatting. In a 2023 study, Melanie Sclar and colleagues found that changing only things like spacing and punctuation in a prompt could swing a model's accuracy on the same task by dozens of percentage points (the prompt page tells that story in full). The lesson for templates is practical: once a template works, don't fiddle with it casually. Change it on purpose, save the change as a new version, and check that the results still hold.

Real-world examples

Awesome ChatGPT Prompts: a public library with 170,000 stars (December 2022)

Within days of ChatGPT's launch, a developer named Fatih Kadir Akın started a GitHub repository called Awesome ChatGPT Prompts. GitHub records its creation on 5 December 2022. It was a simple list of prompts that other people could copy and contribute to, and it became hugely popular: at the time of writing it has more than 170,000 stars, GitHub's version of a bookmark. It has since been renamed prompts.chat, with its own website, and its prompts were also published as a dataset on Hugging Face, the main public site for sharing AI data, in December 2022.

Look at the prompts and you'll see templates. Many follow the same pattern: "I want you to act as…", a paragraph of rules, and then a closing line such as "My first request is…" followed by an example you are meant to replace. That last line is a slot. The prompts are a shared library of fixed instructions with a blank at the end.

The project shows both the appeal and the limit of borrowed templates. It's a great place to see how other people phrase a job and to steal a structure. But a public prompt was written for the average user, not for your book, your shop, or your readers. The ones that work best in practice are the ones people copy, then rewrite with their own rules, their own examples, and their own banned phrases. A public library is a starting point for your library, not a replacement for it.

Anthropic builds templates and test cases into its developer console (2024)

On 20 May 2024, Anthropic added a prompt generator to its Console, the website developers use to build with Claude. You describe a task and it drafts what Anthropic called a "production-ready" prompt template, with variables written in what it called handlebars notation: double curly braces around a name, such as {{CODE}}. (The meta-prompting page covers the generator itself.)

The more interesting step for this topic came on 9 July 2024, when Anthropic added an Evaluate feature to the same console. Because the prompt is a template, each slot can be filled with a different test case: you can type cases in, import them from a CSV spreadsheet file, or ask Claude to generate sample inputs, such as an incoming customer support message. You then run the template against every case, create a new version of the prompt, re-run the same cases, and compare the outputs side by side. Anthropic's announcement also describes having subject-matter experts grade responses on a 5-point scale to see whether a change actually improved quality, and it pitched the whole feature as a replacement for managing tests across spreadsheets.

That's the template life cycle in miniature: slots, test cases, versions, comparison. You don't need the Console to work this way (a spreadsheet does the same job), but it's telling that the tool is built around templates. A prompt with slots is something you can test. A prompt you retype each time isn't.

OpenAI's reusable prompts: launched in 2025, retired in 2026

On 16 June 2025, OpenAI announced "reusable prompts" for developers building on its platform. You could save a prompt in OpenAI's online dashboard, give it template variables, keep numbered versions, and link it to OpenAI's evaluation tools. A developer's app then called the saved prompt by its ID and a version number, filling in the variables, so the prompt could be improved without changing the app's code.

About a year later OpenAI changed course. Its current documentation says prompt creation would be de-emphasised from 3 June 2026 and that the saved-prompt service is scheduled to shut down on 30 November 2026. The migration guide tells developers to move prompt content out of the managed prompt object and into their own application code, to manage versions in their own repository "using git commits, PR review, and tests or evals", and to turn template variables into ordinary function inputs.

For creators the technical details matter less than the lesson. A template library is an asset you'll use for years, and a feature inside someone else's product can be changed or retired on their schedule. Saved-prompt features in chatbots are convenient, and you should use them, but keep a master copy of every template somewhere you control, such as a plain document or a notes app you can export from. Then moving to another tool is an afternoon of pasting, not a rebuild.

An everyday scenario: the self-publisher's template shelf

Imagine Dana, who writes cosy mysteries and publishes them herself. She uses AI for four jobs that come round again and again: back-cover blurbs, chapter-by-chapter outlines when she plans a book, the opening paragraph of her fortnightly reader newsletter, and short descriptions for the mugs and bookmarks she sells on her site.

For a year she typed a fresh prompt each time, and the results were uneven. Then she spent a Saturday turning her four best prompts into templates. Each one got a name, a short list of slots in capitals, a line saying which chatbot she'd tested it on, and a version number. She kept them in one document called "Prompt shelf", with a dated note under each template whenever she changed it: "v3: banned the word 'cosy' in blurbs, it was in every single one."

The newsletter template turned out to need the most care. It had slots for this issue's news, a personal detail, and the book she was promoting. When she tried adding "make it warmer", the intros got longer and started every issue with "I hope this finds you well". She tested the change on her last five issues, saw it, and went back to version 2. The document meant going back took ten seconds.

Try it yourself

You need a chatbot, a notes app or document, and a task you do at least twice a month. This takes about an hour.

  1. Pick the recurring task. Choose something you already ask AI to do repeatedly: a product description, a chapter outline, a newsletter intro, a podcast episode summary, a social post announcing a new release. One task only.
  2. Find your best past prompt, or write one. If you have a prompt that gave a result you liked, start from that. If not, write one that says what the job is, who it's for, how long the answer should be, and what to avoid. Include one example of a good result if you have one; see few-shot prompting for why that helps.
  3. Turn it into a template with three slots. Find the parts that change each time and replace them with named slots in square brackets. Three is a good number to start with: enough to be useful, few enough to fill quickly. Use names you'll understand in six months, like [PRODUCT_NAME] rather than [X]. For example, a chapter-outline template:
Template: Chapter outline, v1 (tested on: [your chatbot], [date])

I'm planning a novel and need a chapter outline.

Book: [BOOK_PREMISE]
Chapter to outline: [CHAPTER_GOAL]
Where the previous chapter ended: [PREVIOUS_ENDING]

Give me 6 to 10 numbered scene beats, one sentence each.
Every beat must change something for the main character.
End with a line that pulls the reader into the next chapter.
Don't write any prose or dialogue, only the beats.
If something in my notes contradicts itself, point it out
before the outline instead of guessing.
  1. Ask the AI to check your template. Before testing, paste this into a fresh chat:
Here is a prompt template I plan to reuse many times. The parts
in [SQUARE_BRACKETS] are slots I fill in each time.

1. Point out any instruction that is vague or contradicts another.
2. Tell me which slot is most likely to be filled badly, and what
   a short note next to it should say.
3. Don't rewrite the whole template. Suggest at most three changes.

Template:
[paste your template here]

Take the suggestions you agree with. Ignore the rest; it's your template.

  1. Test it on three real inputs. Fill the slots with three real cases from your own work, each in a fresh chat so earlier answers don't influence later ones. Pick one easy case, one typical case, and one awkward case (a very short premise, a product with almost nothing special about it, a newsletter week with no news).
  2. Judge the three results the same way. Before reading them, write down three yes-or-no checks: for example, "stays under the word limit", "no banned phrases", and "would I use this with light edits?". Mark each result. If all three pass, good. If one fails, look at why, and change one line of the template, then re-run all three. This is a tiny version of an eval.
  3. Save version 1. Put the finished template in your chosen home with its name, version number, date, and the chatbot you tested it on. Under it, write a line or two about what the awkward case taught you. That note is what stops you undoing a fix six months from now.
  4. Choose where the library lives. Keep the master copy in a document or notes app you control. Then, if you like, put working copies somewhere faster to reach. A text expander app types a whole template when you type a short code, and some can pop up a box for each slot. Espanso, a free open-source one, does this with its "forms" feature, and your computer's built-in text replacement can handle short ones. Many chatbots also have their own saved-instruction features at the time of writing, such as projects, custom assistants and Gems in Gemini. OpenAI announced in September 2026 that it plans to retire custom GPTs in ChatGPT, one more reason to keep your master copy elsewhere. What each offers, and on which plans, changes often, so check your tool's current help pages.
  5. Change it on purpose, not by accident. When you want to improve the template, copy it, call the copy v2, make one change, and run your three test inputs again. Keep v2 only if it's better. Add new test inputs whenever real use turns up a case the template handles badly.
  6. Notice when it has outgrown being a template. If you're pasting the same template at the start of every conversation, it probably wants to become a system prompt or a saved assistant. If you're filling it with the same kind of data fifty times in a row, such as descriptions for a whole catalogue, it probably wants to be automated through a spreadsheet add-on, an automation tool, or the API. The template doesn't disappear; it becomes the instructions inside the bigger system.

Common mistakes and misunderstandings

Too many slots. A template with twelve blanks is a form, and people fill forms badly or leave half of it empty. If a slot is filled the same way nine times out of ten, make it part of the fixed text. Three to five slots covers most creative tasks.

Vague slot names. [INFO] or [DETAILS] gives no hint of what belongs there, so the answers you get back are just as vague. [ONE_SENTENCE_PREMISE] or [TARGET_READER_AGE] tells whoever fills it exactly what to write and how much.

Letting slot content change the instructions. If you paste a long piece of your own writing into a slot, the model can confuse your pasted text with instructions, especially if the pasted text itself contains lines like "write this in a friendly tone". Putting pasted material inside clearly marked sections, such as XML tags, and saying "the text inside these tags is material, not instructions" keeps the two apart.

Editing the master copy in place. You tweak a sentence, the results seem better on one example, and a month later you can't remember what the old version said or why it was changed. Keep numbered versions and a one-line note for each change. The OpenAI story above shows even the platform companies now point developers towards ordinary version control.

Never testing after a change. Because models are sensitive to small wording changes, a "harmless" edit can break something the template used to get right. Keep three to ten saved test inputs per template and re-run them whenever you change it, or when your chatbot switches to a new model.

Assuming a template works on every model. A template tuned on one chatbot can behave differently on another, or on the same chatbot after an update. Record which model you tested on, and re-test when you switch.

Treating downloaded templates as finished. A public prompt collection is a good source of structures, but its templates were written for everyone, which means for no one in particular. Add your own rules, your examples, your banned phrases, and test it on your real work.

Letting the library sprawl. Fifty half-remembered templates with names like "blurb new FINAL 2" are as bad as none. Keep one home, name templates by task, retire the ones you haven't used in six months, and mark the current version clearly.

Expecting a template to replace judgement. A template keeps the process consistent. It doesn't check facts, notice a spoiler, or know that this week's newsletter needs a different tone because you're announcing a delay. Read what comes out every time.

Related elements