Submit a Story

Glossary term

Prompt Template

Updated Oct 17, 2026

In short

A reusable prompt structure with named variables or placeholders that are filled with task-specific information at runtime.

A prompt template separates stable instructions from changing input. For example, a support workflow may keep the role and output rules fixed while inserting the customer’s question and relevant account details into placeholders. Templates make prompts easier to reuse, version and test across many requests.

A template for a product description tool might fix the tone and length rules and insert the product name, features and audience at run time. Store templates alongside tests so you can run old and new versions on the same inputs. Keep user text clearly separated from the fixed instructions, and see prompt engineering for how to write the instructions themselves.

Escape or delimit untrusted input where appropriate, avoid inserting secrets unnecessarily and validate rendered prompts before sending them to a model. Keep template changes under version control so regressions can be traced. Related: System Prompt, Prompt Chaining.