Term
Prompt Template
A prompt template is a reusable prompt skeleton with placeholders that get filled with concrete values at runtime — the basis for reproducible LLM calls in applications.
Prompt Template — explained in more detail
Instead of writing every prompt from scratch, a template defines fixed structures — system instruction, role description, examples, output format — and marks the variable parts with placeholders like {{question}} or {user_input}. At runtime the placeholders are filled with concrete values. This makes LLM calls testable (same structure, different inputs), versionable and team-friendly: prompt changes happen in one place instead of scattered across the codebase.
Example / Practical context
In LangChain, LlamaIndex or frameworks like DSPy, templates are part of the basic toolkit. A simple example: "Summarise the following text in {n} bullet points:\n\n{text}". Anthropic and OpenAI offer prompt caching at the template level — the immutable part of the prompt is cached and only the variable inputs are re-billed. This makes a cleanly separated template economically attractive too.
How it differs from related terms
Few-shot prompting typically uses a template with hard-wired examples. A system prompt is usually part of a template, but not a template on its own. Prompt chaining links multiple templates in a pipeline — the output of one call becomes the input for the next template.
Entdecke mehr
Effort level and deep thinking: two independent axes for AI tasks
Effort scales breadth, deep thinking scales depth. When each setting makes sense — with three clear examples and one rule of thumb.
GlossarChain-of-Thought
Chain-of-Thought (CoT) is a prompting technique that asks the model to spell out its reasoning in intermediate steps — boosting accuracy on multi-step tasks.
LexikonPrompt Security — Injection, Leaking, Guardrails
How prompt injection, prompt leaking, and jailbreaks work — and which defenses (guardrails, spotlighting, sanitization) actually help.