AI Glossary Term

What does “Prompt Template” mean?

Definition

A reusable prompt pattern with variables, formatting rules, and task-specific instructions.

How Prompt Template works

Diagram for Prompt Template, steps in order: Template: 'Summarize {document} in {n} bullets'; then Fill variables; then Complete prompt; then Model.Template: 'Summarize {document} in {n}bullets'Fill variablesComplete promptModel

Example

A support tool uses a template with slots for the customer's name and issue. Each ticket fills in those slots, so every request has the same structure and instructions.

Why it matters

Templates make prompts consistent, testable, and easy to update. They also keep untrusted input inside a defined slot.

Common questions

Where are templates stored?

In code, config files, or prompt-management tools.

Why test them?

A small wording change can alter behavior, so versions are checked against sample cases.

Do templates prevent injection?

No. User-supplied text in a slot can still contain malicious instructions.

Learn more in our free guides

Test yourself

See also