# Prompt template

**Source:** https://promtable.com/glossary/prompt-template

> A prompt template is a parameterised prompt — a string with named slots (e.g. {{name}}, {{context}}) that get filled at runtime so the same skeleton can serve many requests.

---
A prompt template is a parameterised prompt — a string with named slots (e.g. {{name}}, {{context}}) that get filled at runtime so the same skeleton can serve many requests.

Prompt templates separate the static prompt skeleton (instructions, examples, tags) from the per-request variables (user input, retrieved documents, current date). Modern frameworks (LangChain ChatPromptTemplate, Jinja-style prompts, PromptLayer, Braintrust) standardise the format. Templates enable prompt versioning, A/B testing, and centralised prompt registries. The simplest template is f-string interpolation; the most sophisticated supports conditional sections, looped few-shot, and validated variables. Treating prompts as templates is the gateway to treating prompts as code.

## When to use

- Any production LLM feature with variable input.
- Multi-tenant or multi-language prompts.
- Centralised prompt registry + versioning.

## Common mistakes

- Hard-coding inline strings everywhere instead of using a template.
- Letting untrusted user input land directly inside the template without escaping.

## Related terms

- [prompt-engineering](https://promtable.com/glossary/prompt-engineering)
- [prompt-versioning](https://promtable.com/glossary/prompt-versioning)
- [system-prompt](https://promtable.com/glossary/system-prompt)
- [evals](https://promtable.com/glossary/evals)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/prompt-template
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/prompt-template".
Contact: info@vibecodingturkey.com.