AI Prompting Study Guide
Your quick reference guide to all the key concepts, techniques, and frameworks for mastering AI prompts. Keep this handy whilst practising.
๐ง The Core Mindset
You're Programming, Not Chatting
- 1. Prompts are programs, not questions. Each word is a line of code guiding the AI's output.
- 2. LLMs are prediction engines. They calculate the most probable next words based on your input.
- 3. Your goal is to hack probability. Craft prompts that narrow the field of possible responses.
- 4. Adopt the "skill issue" mindset. A bad output means the prompt needs improvement, not that the AI is broken.
๐ก Key Insight
"A prompt is a call to action to the large language model. It's not just a question, it's a program." โ Dr. Jules White, Vanderbilt University
๐ The Four Pillars
These foundational techniques improve results by approximately 80%.
Pillar 1: Persona
Give your AI an identity
Assign a specific role, expertise, or perspective. This forces the AI to draw from a focused knowledge base rather than responding as a generic "nobody".
โ Without Persona
"Write an apology email about a service outage."
โ With Persona
"You are a senior site reliability engineer. Write an apology email about a service outage."
Pillar 2: Context
The cure for hallucination
Provide all relevant facts, figures, and constraints. LLMs will fill gaps with invented information if you don't provide sufficient context.
โก The #1 Hallucination Fix
Add this to your prompts: "If you cannot find the answer in the provided context, say 'I don't know'."
Key principle:
More Context = Fewer Hallucinations
Pillar 3: Output Requirements
Define your desired result
Specify exactly how you want the response formatted. Control format, length, style, tone, and structure.
Format Options
- โข Bullet points
- โข Numbered list
- โข Table format
- โข Prose paragraphs
- โข JSON/structured data
Style Controls
- โข Length (under 200 words)
- โข Tone (professional, casual)
- โข Headers and sections
- โข Technical level
- โข No corporate fluff
Pillar 4: Few-Shot Examples
Show, don't just tell
Provide concrete examples of the output you want. This reduces guesswork and dramatically improves quality.
Example Structure:
# Instruction:
Write a product description in this style:
# Example 1:
[Your first example of good output]
# Example 2:
[Your second example of good output]
# Now write for:
[Your actual product]
๐ Advanced Techniques
๐ Chain of Thought (CoT)
Force the AI to "think step by step" before providing a final answer. This increases accuracy and makes reasoning transparent.
Prompt addition:
"Think through this step by step before providing your final answer. Show your reasoning process."
๐ณ Tree of Thoughts (ToT)
Explore multiple reasoning paths simultaneously, like branches on a tree. Useful when the first idea isn't always best.
Prompt structure:
- Brainstorm 3 different approaches to this problem
- Evaluate the pros and cons of each approach
- Identify the best elements from each
- Synthesise into a final "golden path" solution
โ๏ธ Adversarial Validation (Battle of the Bots)
Use competing AI personas to critique and refine outputs. AI is often better at editing than original writing.
Three-Round Process:
Draft Round
Two personas (e.g., Engineer + PR Manager) each write their version
Critique Round
A critic persona (e.g., Angry Customer) brutally critiques both drafts
Collaboration Round
Original personas collaborate to address the critique in a final version
๐ Prompt Templates
Basic Prompt Template
# PERSONA
You are a [specific role] with [years] years of experience in [domain].
# CONTEXT
[Provide all relevant background, facts, and constraints]
# TASK
[Clear description of what you want done]
# OUTPUT REQUIREMENTS
- Format: [bullets/table/prose]
- Length: [word count or section count]
- Tone: [professional/casual/technical]
- Structure: [headers/sections needed]
# IMPORTANT
If you cannot find the answer in the provided context, say "I don't know".
Chain of Thought Template
# PERSONA
You are a [role] who thinks systematically through complex problems.
# TASK
[Describe the problem or question]
# APPROACH
Think through this step by step:
1. First, identify [key factors]
2. Then, analyse [relationships]
3. Consider [alternatives or risks]
4. Finally, provide your conclusion
# OUTPUT
Show your reasoning process, then provide a clear final answer.
Quick Reference Card
โ Always Do
- โข Define a specific persona
- โข Provide complete context
- โข Specify output format
- โข Include examples when possible
- โข Add "say I don't know" instruction
- โข Think before prompting
- โข Save successful prompts
โ Never Do
- โข Use vague, one-line prompts
- โข Assume the AI knows your context
- โข Blame the AI for bad outputs
- โข Skip the persona definition
- โข Leave output format undefined
- โข Expect perfection on first try
- โข Forget to iterate and refine