Skip to content
BENIBIX Learn

Prompt Template

Also known as Prompt Templates, Templated Prompt

A prompt with blanks that a program fills in each time it runs.

Think of it like

Think of it like a form letter with blanks. You fill in the name and the date each time.

Example

Emma's app has one template for product blurbs. For each item, the code fills in the name, the price and three features, then sends it.

Why it matters

It turns one good prompt into a tool a program can use thousands of times.

Definition

A prompt template is a prompt with blanks that code fills in before it is sent to a model. The fixed part holds the instructions, and the blanks hold what changes, like a name, a question or a document. Blanks are often written in curly brackets. Templates let an app send thousands of prompts that all follow the same tested pattern. They also keep prompts in one place, so they are easy to fix.

Example code

text
Write a product blurb under 40 words.
Product: {name}
Price: {price}
Key features: {features}
Tone: friendly, no hype.
The words in curly brackets are blanks. The program fills them in for each product.
One template and three rows of data give three full prompts. Only the blanks change.

Common mistake

Not checking what goes into the blanks. A strange or very long value can break the prompt.

Key takeaways

  1. 1
    Fixed part and blanks. The blanks change.
  2. 2
    Filled by code. Before each call.
  3. 3
    One place to fix. Change it once.

Learn it properly