# Prompt Template

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

**Field:** Artificial Intelligence  
**Category:** Working with AI  
**Also known as:** Prompt Templates, Templated Prompt

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Prompt (AI)](https://learn.benibix.com/term/ai/prompt)
- [Prompt Engineering](https://learn.benibix.com/term/ai/prompt-engineering)
- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [MCP Prompt](https://learn.benibix.com/term/ai/mcp-prompt)

## Taught in

- [Prompt Chains and Templates](https://learn.benibix.com/learn/ai-working-with-ai/prompt-chains-and-templates): Prompt Engineering, 8/16

![A prompt template with two blanks, name and price, at the top. Three filled prompts below it, for a lamp, a mug and a desk.](https://learn.benibix.com/diagrams/pr-prompt-template.svg)

---

Source: https://learn.benibix.com/term/ai/prompt-template
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
