Prompt Template
A reusable prompt with placeholders you fill in per request — the unit of prompt reuse in an app.
A prompt template is a fixed prompt skeleton with slots (variables) filled in at runtime — the system instructions, format, and examples stay constant while the user’s input and retrieved context are injected. It is how prompts become reusable code rather than one-off strings.
Worked example: a support bot template might be “You are a support agent for {product}. Answer using only this context: {context}. Question: {question}” — the same template serves every ticket with different fills. Gotcha: keep the stable part first and the variable part last so prompt caching can reuse the prefix, and always delimit or escape user-filled slots — unescaped user text in a template is the entry point for prompt injection.