Good prompt templates reduce avoidable variation without pretending that one instruction works for every model or workflow. This guide provides reusable starting prompts for classification, information extraction, summarization, rewriting, comparison, and question answering, along with a practical checklist for adapting instructions, examples, output formats, and failure handling.
Overview
A useful prompt is more than a question. It defines the task, supplies the relevant context, describes the expected result, and gives the model a way to handle uncertainty. The templates below are deliberately plain so they can be adapted to different APIs, model families, and application layers.
Replace text inside square brackets before use. Treat each template as a baseline for testing rather than a guaranteed solution. In production LLM app development, prompt quality should be evaluated against representative inputs, edge cases, and a clearly defined success criterion.
| Variable | Purpose | Example value |
|---|---|---|
| [TASK] | The action the model must perform | Assign one support category |
| [INPUT] | The text, record, or question to process | A customer message |
| [LABELS] | Allowed categories or values | billing, access, bug, other |
| [AUDIENCE] | The intended reader or user | An internal engineering team |
| [FORMAT] | Required response shape | JSON with defined fields |
| [CONSTRAINTS] | Limits, exclusions, or safety rules | Do not infer missing values |
For applications that consume model output programmatically, prefer a schema or another machine-checkable format where the platform supports it. A format instruction is helpful, but validation in application code remains important. For broader evaluation practices, see Prompt Testing and Version Control: A Practical Evaluation Workflow for LLM Apps.
Checklist by scenario
1. Classification
Use classification prompts when each input should receive one or more labels. Define the taxonomy before writing the prompt. Labels should be distinct enough that a reviewer can explain why one applies and another does not.
Classify the text below using exactly one label from this list: [LABELS].
Definitions:
- [LABEL 1]: [SHORT DEFINITION]
- [LABEL 2]: [SHORT DEFINITION]
- [LABEL 3]: [SHORT DEFINITION]
Text:
[INPUT]
Return only this JSON object:
{
"label": "one allowed label",
"confidence": "high, medium, or low",
"reason": "one brief reason based on the text"
}
If the text does not clearly fit a label, use [FALLBACK LABEL] and set confidence to low.
Keep the label set stable during evaluation. If classification drives routing or other automated actions, define what happens to low-confidence results before deployment. The guide to Reliable LLM Text Classification provides a useful framework for taxonomy design and human review.
2. Information extraction
Extraction prompts should distinguish between information that is present, information that is absent, and information that is merely implied. This prevents the model from filling gaps with plausible but unsupported values.
Extract the requested fields from the source text. Use only information explicitly stated in the text.
Source text:
[INPUT]
Return valid JSON with exactly these fields:
{
"[FIELD 1]": "string or null",
"[FIELD 2]": "string or null",
"[FIELD 3]": "string or null"
}
Rules:
- Return null when a field is not stated.
- Preserve names, dates, identifiers, and units as written unless normalization is requested.
- Do not add commentary outside the JSON object.
Use examples when field boundaries are difficult, such as separating a product name from a model number or identifying a date range. Validate extracted values after the model responds, especially when they feed a database, search index, or workflow automation.
3. Summarization
Summarization prompts work best when they specify the audience, purpose, source boundaries, and desired length. “Summarize this” leaves too many decisions unresolved.
Summarize the source below for [AUDIENCE]. The summary will be used to [PURPOSE].
Requirements:
- Focus on the main decisions, findings, and open questions.
- Preserve important qualifiers, dates, and uncertainties.
- Do not introduce facts that are absent from the source.
- Write [NUMBER] bullet points, with each bullet no longer than [LIMIT].
- If the source does not contain enough information, say so briefly.
Source:
[INPUT]
For long documents, summarize in stages or retrieve relevant sections instead of assuming the entire source will fit comfortably in one request. In a retrieval-augmented workflow, prompt design should complement chunking, retrieval, reranking, and citation checks; see the RAG Application Design Guide.
4. Rewriting
A rewriting prompt should preserve the meaning of the original while making the requested changes explicit. Tone labels such as “professional” or “friendly” are less useful than observable instructions.
Rewrite the text below for [AUDIENCE]. Preserve the original meaning, factual details, names, numbers, and required actions.
Change the text as follows:
- Tone: [DESCRIBE THE TONE]
- Reading level or technical depth: [REQUIREMENT]
- Structure: [PARAGRAPHS, BULLETS, HEADINGS, OR OTHER]
- Maximum length: [LIMIT]
Do not add claims, examples, promises, or details that are not in the original.
Original text:
[INPUT]
Return only the rewritten text.
5. Comparison
Comparison prompts become more reliable when they use the same criteria for every option and separate facts from judgments. They are particularly useful for internal research, product analysis, and technical decision records.
Compare [ITEM A] and [ITEM B] using only the information provided below.
Evaluate both options against these criteria:
1. [CRITERION 1]
2. [CRITERION 2]
3. [CRITERION 3]
Return:
- A table with one row per criterion
- A short section titled "Trade-offs"
- A final section titled "Information still needed"
Mark any criterion as "not specified" when the source does not support a conclusion. Do not infer a winner from missing information.
Source material:
[INPUT]
6. Question answering
For grounded question answering, tell the model what evidence it may use and what to do when that evidence is insufficient. This is more dependable than asking for an answer without defining its source.
Answer the question using only the reference material below.
Question:
[QUESTION]
Reference material:
[CONTEXT]
Instructions:
- Give a direct answer first.
- Cite the relevant section, passage, or document identifier when available.
- Distinguish clearly between stated facts and reasonable uncertainty.
- If the answer is not supported by the reference material, say: "The provided material does not establish this."
- Do not use outside knowledge.
What to double-check
- Task definition: Can a reviewer describe success in one sentence? If not, narrow the instruction before adding more wording.
- Input boundaries: Is it clear which text is an instruction and which text is data? Delimit untrusted or user-supplied content clearly.
- Output contract: Are required fields, allowed values, length limits, and fallback behavior explicit?
- Examples: Do examples represent normal cases and difficult cases? Remove examples that accidentally teach an unwanted pattern.
- Uncertainty: Does the prompt provide a valid response for missing, contradictory, or ambiguous information?
- Evaluation set: Have you tested short, long, malformed, multilingual, and adversarial inputs where relevant?
- Operational fit: Does the output fit downstream parsing, latency, token, and review requirements? Prompt changes can affect all of these.
Keep the prompt, model settings, schema, test cases, and evaluation results together as one versioned unit. This makes it easier to determine whether an inconsistent result came from an instruction change, a model change, an input change, or an application error. For production concerns, consult the guides to LLM observability and API reliability patterns.
Common mistakes
Combining several unrelated jobs. A prompt that classifies, summarizes, rewrites, and makes a decision at once is difficult to evaluate. Split the workflow into steps when each result has a different standard.
Using vague quality words. Replace “make it better” with measurable requirements such as “remove repetition,” “retain all dates,” or “use five bullets.”
Requesting JSON without defining its shape. Name the fields, permitted values, null behavior, and whether additional fields are allowed. Then validate the response outside the model.
Overloading the prompt with contradictory rules. Order instructions by importance and remove requirements that cannot be checked. More text is not automatically more control.
Treating a single successful example as proof. A prompt can work on a demonstration input and fail on edge cases. Use a small, representative evaluation set and record failure categories.
Ignoring untrusted content. In document and RAG workflows, retrieved text or user input may contain instructions that conflict with the task. Keep data separate from control instructions and limit tool permissions. See Prompt Injection Defense for LLM Apps for a focused checklist.
When to revisit
Review a prompt whenever the workflow, source data, output schema, evaluation criteria, or model integration changes. It is also worth revisiting before seasonal planning cycles, when a new document type enters the pipeline, or when reviewers report a new failure pattern.
- Save three to five failing examples and label the failure: misunderstanding, omission, unsupported inference, formatting, or routing.
- Change one prompt element at a time where practical, such as the task definition, example, constraint, or fallback rule.
- Run the revised prompt against both the failing examples and a stable regression set.
- Compare quality with operational measures such as output validity, review effort, latency, and token use.
- Record the final prompt version, model configuration, schema, known limitations, and next review trigger.
Use these templates as a starting point, not a substitute for testing. A concise prompt with clear inputs, explicit outputs, representative examples, and defined failure behavior is usually easier to maintain than a large instruction block assembled through trial and error. Revisit the checklist whenever you add a new workflow or adapt an existing prompt to another model.