Universal Prompt Template

Copy, replace the [brackets], delete unused sections, paste into any AI.

Works with any AI model
1. RoleRequired
You are [a specific expert role]. Examples: - "a senior performance engineer specialising in JVM tuning and thread analysis" - "a B2B SaaS copywriter with expertise in enterprise tech" - "an employment lawyer practising in Australian jurisdiction"
Tip: Specificity matters. "Senior Python performance engineer" beats "helpful assistant" by a wide margin. Include domain, seniority, and specialisation.
2. TaskRequired
[Single action verb + specific deliverable + target audience/context] Examples: - "Analyse the thread dump below and identify the top three causes of latency." - "Write a 3-paragraph cold email to a VP of Engineering at a fintech company." - "Rewrite this internal memo for an executive audience with no technical background."
Tip: One task per prompt. Multiple tasks dilute focus. Chain them sequentially or use separate prompts if you need several things.
3. ContextRequired
Background: - Audience: [who will read or act on this output] - Problem being solved: [what gap or need this addresses] - Relevant history: [prior decisions, attempts, or constraints] - Environment: [technical, regulatory, or organisational context] Input material: [PASTE YOUR CONTENT HERE -- document, code, data, question, etc.]
Tip: Context is the highest-leverage section. The AI has no access to information you don't provide. More relevant context means fewer wrong assumptions.
4. RequirementsRecommended
The output MUST: 1. [Non-negotiable inclusion #1] 2. [Non-negotiable inclusion #2] 3. [Non-negotiable inclusion #3]
Tip: Use "must", "always", "required" language here. If something is a preference, put it in Tone or Format instead.
5. ConstraintsRecommended
- Do NOT [explicit exclusion, e.g. "speculate beyond what the data shows"] - Do NOT [explicit exclusion, e.g. "exceed 300 words"] - Avoid [e.g. "passive voice / jargon / hedging language"] - Never [e.g. "fabricate data, names, or citations"]
Tip: Negative instructions are often more reliable than positive ones. "Do not include a summary" is more effective than hoping the model skips it.
6. ExamplesRecommended
Good example (DO THIS): Input: [sample input] Output: [sample output demonstrating quality, tone, and format you want] Bad example (AVOID THIS): Input: [same or similar input] Output: [what you do not want] Why it is wrong: [1-sentence explanation]
Tip: One good example improves output quality more than almost any other section. Two good + one bad is the sweet spot for complex outputs.
7. Output formatRequired
Structure: [numbered list / markdown table / JSON / prose / code with inline comments] Length: [e.g. under 200 words / 3-5 sentences per section / no padding, as long as needed] Required sections: - [Section name]: [what it should contain] - [Section name]: [what it should contain] Do not include: [e.g. introductory preamble / closing summary / headers]
Tip: If you don't specify format, the model picks one. For downstream use (parsing, documents, reports) always specify exactly what you need.
8. ToneSituational
Formality: [formal / semi-formal / conversational] Register: [technical / plain language / executive-facing] Voice: [e.g. direct and concise / dry and factual / no filler words] Do not use: [e.g. exclamation marks / hedging phrases / em-dashes]
9. Reasoning instructionComplex tasks
Before producing the final output, reason through the problem step by step inside a <thinking> block: 1. Restate what is being asked and what constraints apply 2. Identify any ambiguities and how you will resolve them 3. Outline your approach Only then produce the final output outside the <thinking> block.
Tip: This is chain-of-thought prompting. Use it whenever wrong early assumptions would corrupt the whole output: analysis, debugging, multi-step reasoning, technical interpretation.
10. Edge casesOptional
If [condition], then [instruction]. Example: "If the input is missing key data, state what is absent before proceeding." If you are unsure about a fact, say so explicitly rather than guessing. If the input is ambiguous, ask one clarifying question before proceeding.
11. Final checkHigh-stakes
Before responding, verify: 1. Output format matches specification exactly 2. All requirements are addressed 3. No constraints have been violated 4. Every factual claim is something you are certain of
The complete template as a single block. Copy everything, replace the italicised placeholders, delete the sections you don't need.
## Copy everything below. Replace [brackets]. Delete unused sections. ## ROLE You are [specific expert role, domain, seniority, specialisation]. TASK [Single action verb + deliverable + audience/context. One sentence.] CONTEXT Background: - Audience: [who reads or acts on the output] - Problem: [what gap or need this addresses] - Relevant history: [prior decisions, attempts, constraints] - Environment: [technical, regulatory, organisational context] Input material: [PASTE YOUR CONTENT HERE] REQUIREMENTS The output MUST: 1. [non-negotiable #1] 2. [non-negotiable #2] 3. [non-negotiable #3] CONSTRAINTS - Do NOT [explicit exclusion] - Do NOT [explicit exclusion] - Avoid [pattern or phrasing to avoid] - Never [absolute prohibition] EXAMPLES Good example (DO THIS): Input: [sample input] Output: [sample output demonstrating quality and style you want] Bad example (AVOID THIS): Input: [same or similar input] Output: [what you do not want] Why it is wrong: [1-sentence explanation] OUTPUT FORMAT Structure: [numbered list / table / JSON / prose / code with comments] Length: [word count / section lengths / "no padding"] Required sections: - [section name]: [what it contains] Do not include: [preamble / summary / headers / bullets] TONE Formality: [formal / semi-formal / conversational] Register: [technical / plain language / executive-facing] Voice: [e.g. direct, no filler words, no exclamation marks] REASONING INSTRUCTION (remove if not needed) Before the final output, reason step by step inside a <thinking> block: 1. Restate the task and constraints 2. Resolve ambiguities 3. Outline your approach Then produce the final output outside the <thinking> block. EDGE CASES (remove if not needed) If [condition], then [instruction]. If you are unsure about a fact, say so explicitly rather than guessing. If the input is ambiguous, ask one clarifying question before proceeding. FINAL CHECK (remove if not needed) Before responding, verify: 1. Output format matches specification exactly 2. All requirements are addressed 3. No constraints have been violated 4. Every factual claim is certain
A fully filled-in prompt for performance engineering -- thread dump analysis. Swap in your own thread dump and use it directly.
ROLE You are a senior performance engineer with expertise in Java application profiling, JVM internals, and thread dump analysis. TASK Analyse the thread dump below and identify the top three most likely causes of the observed latency spike. CONTEXT Background: - Audience: senior performance engineers and the on-call SRE team - Problem: production latency spike (4x normal) on a ServiceNow instance under mid-size load (~800 concurrent users) - Relevant history: no deployment in prior 48 hours, no config changes, JVM heap at 68% before incident - Environment: Java 11, G1GC, 32GB heap, Tomcat 9, Linux RHEL 8 Input material: [PASTE THREAD DUMP HERE] REQUIREMENTS The output MUST: 1. Identify the top three probable root causes, ordered by likelihood 2. For each cause, cite specific evidence from the thread dump (thread names, lock addresses, stack frames) 3. Provide one immediate mitigation action per cause CONSTRAINTS - Do NOT speculate beyond what the thread dump shows - Do NOT recommend JVM version upgrades -- out of scope for this incident - Do NOT include a general introduction or closing summary - Never suggest "wait and see" as a mitigation OUTPUT FORMAT Structure: three numbered sections, one per cause Each section: - Cause: one sentence - Evidence: bullet points citing specific thread names, lock addresses, or stack frames - Mitigation: one to two sentences, actionable and immediate Length: no padding, as long as the evidence requires TONE Formality: technical Register: peer-to-peer (senior engineer to senior engineer) Voice: direct, no hedging language, no preamble REASONING INSTRUCTION Before the final output, reason through the thread dump in a <thinking> block: 1. Identify all BLOCKED and WAITING threads and what they are waiting on 2. Map lock contention patterns and identify the lock owner(s) 3. Check for GC pause signals or I/O saturation patterns 4. Rank the three most likely causes by thread count affected Then produce the final output. EDGE CASES If the thread dump is truncated or missing key stack frames, state exactly what is missing and what you can still conclude. If multiple causes appear equally likely, state this and explain why.
Section reference
Section Purpose When to include
RoleSets AI expertise and perspectiveAlways
TaskDefines the primary actionAlways
ContextProvides background, audience, and input materialAlways
Output formatControls structure and lengthAlways
RequirementsNon-negotiable inclusionsWhen specific elements must appear
ConstraintsExplicit exclusions and prohibitionsWhen defaults need overriding
ExamplesDemonstrates expected quality and styleCreative, writing, nuanced tasks
ToneControls voice and registerWriting and communication tasks
Reasoning instructionForces step-by-step thinking before outputComplex analysis or technical tasks
Edge casesHandles uncertainty and missing inputAmbiguous or incomplete input
Final checkSelf-verification before respondingHigh-stakes output
Minimum viable combinations
Fast tasks
Role
Task
Output format
Standard tasks
Role
Task
Context
Requirements
Output format
Tone
High-stakes tasks
All sections
+ Examples
+ Reasoning instruction
+ Final check