Most people learn one way to prompt an AI: type what they want and hope. When the output is bad, they rephrase and try again. Repeat until frustrated or satisfied, whichever comes first.
That is not prompting. That is guessing.
Prompt engineering is the practice of deliberately structuring your input to get predictably better output. It is not a mystical skill. It is a collection of named techniques, each with a specific use case, that consistently produce better results than unstructured requests. Learn them once and they compound across everything you do with AI.
This guide covers every major technique, when to use each one, why it works, and a concrete example for each. No filler, no repetition of what you already know.
Why Technique Matters More Than Creativity
A common misconception is that better AI output comes from more creative phrasing. It does not. It comes from giving the model better signal about what you actually need.
Large language models are trained on patterns. They generate output by predicting what comes next given your input. When your input is vague, the model defaults to the most statistically average response from its training data. When your input is structured and specific, the model has more to work with and produces more targeted results.
Every technique below is essentially a different strategy for giving the model better signal. Some work by providing examples. Some work by forcing step-by-step reasoning. Others work by assigning a context that constrains the response space. All of them work because they reduce the gap between what you want and what the model infers you want.
Zero-Shot Prompting
Zero-shot prompting means giving the model a task with no examples. You rely entirely on the model’s training to interpret and complete your request. It is the default mode for most people.
When to use it
Simple, well-defined tasks where the model has strong training signal. Summarizing a document, translating a sentence, classifying a piece of text, answering a factual question.
When it fails
Complex tasks, niche domains, or anything where the desired output format or style is not obvious. Zero-shot on a complex reasoning task or a specific writing style will produce average results.
Example
Summarize this customer feedback in 3 bullet points.
Focus on the most actionable points. [paste feedback]
Few-Shot Prompting
Few-shot prompting provides the model with examples of the input-output pattern you want before giving it your actual task. Instead of describing what you need, you show it.
This is one of the most reliable techniques in any prompter’s toolkit. It works because it grounds the model in your specific style, format, and quality standard rather than its default interpretation.
When to use it
Any time you have a specific format, tone, or structure the model keeps getting wrong with zero-shot. Product descriptions, customer response templates, categorization tasks, and any situation where you have a clear example of “good output.”
Example
I want you to write product descriptions in this style:
Product: Noise-cancelling headphones
Description: Silence the world. 30 hours of battery.
40dB noise reduction. Built for the commute that never ends.
Product: Wool running socks
Description: Warm when wet. No blisters.
Merino wool that goes the distance.
Now write a description for:
Product: Portable espresso maker
The model now has a concrete style anchor. The output will match the format and voice of your examples far more reliably than a description alone would produce.
Chain-of-Thought Prompting
Chain-of-thought (CoT) prompting asks the model to reason through a problem step by step before delivering an answer. Rather than jumping to a conclusion, it walks through the logic explicitly. This dramatically improves accuracy on tasks involving multi-step reasoning, math, analysis, and decisions.
When to use it
Any task where the answer depends on working through intermediate steps: math problems, logical deductions, strategic recommendations, troubleshooting, complex analysis. A rule of thumb: if you would work through it on paper before answering, use chain-of-thought.
The simplest version
Let's think through this step by step.
Appending this single phrase to almost any complex prompt improves output quality. It signals to the model that reasoning process matters, not just the final answer.
Full example
A SaaS company has 500 monthly active users,
a 3% monthly churn rate, and a $79 average monthly revenue per user.
They are considering whether to invest $50,000 in a customer success program
that would reduce churn to 1.5%.
Walk me through the financial case for this decision step by step.
Show your reasoning at each stage before reaching a recommendation.
Tree-of-Thought Prompting
Tree-of-thought (ToT) prompting extends chain-of-thought by asking the model to explore multiple reasoning branches in parallel, evaluate each, and identify the strongest path. Where CoT follows a single line of reasoning, ToT explores a branching decision tree.
When to use it
Strategic decisions with multiple valid approaches, creative problems with competing solutions, risk analysis, and situations where the “right answer” depends on which path you take. If CoT is a river, ToT is a river with tributaries.
Example
I need to decide how to grow my newsletter from 2,000 to 10,000 subscribers.
My budget is $500/month.
Explore three distinct growth strategies.
For each strategy:
1. Describe the approach in detail
2. Walk through the step-by-step execution
3. Identify the key risks and failure points
4. Estimate the realistic outcome at 6 months
Then evaluate all three and recommend the strongest path
based on speed, cost, and sustainability.
Role and Persona Prompting
Assigning the model a specific role or persona before a task is one of the highest-leverage prompting techniques. It shapes register, depth of knowledge, tone, and assumptions before the model generates a single word.
This is the technique at the core of Google’s TCREI framework — the Task step explicitly involves assigning a persona. It works because the model has been trained on text written by people in every role imaginable. When you invoke a role, you activate the patterns associated with how that expert thinks, writes, and communicates. For the full breakdown of the TCREI framework, see our guide to Google’s prompt engineering course.
When to use it
Almost always, for any task where expertise matters. Writing, analysis, editing, code review, strategy, feedback.
Weak vs strong role prompt
| Weak | Strong |
|---|---|
| “Help me with my pricing strategy.” | “Act as a pricing consultant who has worked with 50+ B2B SaaS companies. I run a project management tool targeting 10-50 person teams at $49/month. Help me evaluate whether to move to usage-based pricing.” |
| “Edit my email.” | “Act as a senior copywriter specializing in B2B sales emails. Edit this for clarity, confidence, and persuasion. Remove anything that sounds apologetic or corporate.” |
Prompt Chaining
Prompt chaining breaks a large complex task into a sequence of smaller, connected prompts where each output becomes the input for the next step. It is how professional AI users produce work that feels researched and coherent rather than rushed and generic.
When to use it
Any multi-step task: writing a long article, building a business plan, creating a marketing campaign, developing a product spec. Any task where the quality of the final output depends on the quality of each intermediate step.
Example chain for a blog post
- Prompt: “Analyze the search intent behind [keyword] and tell me what a reader searching this actually wants.”
- Prompt: “Given that intent, create a detailed article outline with H2 and H3 structure.”
- Prompt: “Write section 2 of the outline. Use the context from the intent analysis.”
- Prompt: “Now write the introduction, knowing the full structure and intent.”
- Prompt: “Write 5 meta title options and 3 meta descriptions based on everything above.”
Each step is evaluatable. Each step is improvable. The final article is significantly better than anything produced in a single prompt.
Self-Consistency Prompting
Self-consistency involves generating multiple independent responses to the same prompt and selecting the most consistent or highest-quality answer. It works because language models have a degree of randomness in their outputs. Multiple samples surface the answer that is most reliably correct.
When to use it
High-stakes analytical tasks, mathematical reasoning, factual questions where accuracy matters. Also useful for creative tasks where you want to compare multiple approaches before choosing one.
How to apply it
Give me 3 independent analyses of whether [decision/question].
Each analysis should reason from first principles without referencing the others.
After all three, identify which conclusion appears most consistently
across the reasoning paths and explain why.
ReAct Prompting
ReAct (Reasoning and Acting) is a technique that combines reasoning traces with action steps, alternating between “think” and “do” in a structured loop. It is especially relevant for agentic AI workflows where the model needs to plan, execute, observe, and adapt.
When to use it
Complex tasks that require observation and adaptation — research tasks, debugging, analysis that requires checking assumptions, and any task where you want the model to make its reasoning visible before acting.
Example structure
Work through this problem using the following structure for each step:
Thought: [what you are considering]
Action: [what you will do]
Observation: [what you found]
...repeat until you reach a conclusion...
Final Answer: [your conclusion]
Problem: [describe the problem]
Contrastive Prompting
Contrastive prompting shows the model both a good and a bad example of the output you want, making the distinction between them explicit. By framing what you do not want alongside what you do want, you narrow the model’s output space much more precisely than a description alone can.
Example
I want you to write resume bullet points that sound like this:
GOOD: "Reduced customer churn by 23% in 6 months by building
a proactive outreach program for at-risk accounts."
NOT like this:
BAD: "Responsible for customer retention and maintaining relationships
with key stakeholders across the organization."
Now write 3 bullet points for someone who managed a sales team of 8,
hit 110% of quota for 3 consecutive quarters,
and introduced a CRM process that reduced pipeline leakage.
Negative Prompting
Negative prompting explicitly tells the model what to exclude, avoid, or not do. In text generation, this is less commonly used but highly effective when you have a specific failure mode you keep running into.
Example
Write a LinkedIn post about my new product launch.
Do NOT:
- Start with "I'm excited to..."
- Use words like "thrilled," "humbled," "game-changer," or "journey"
- End with a question asking people to comment
- Use more than 3 hashtags
DO:
- Start with a specific fact or observation
- Tell one concrete thing the product does
- Keep it under 200 words
Format Control Techniques
Format control is often overlooked as a “technique” because it seems obvious, but it is one of the most reliably impactful interventions in prompting. Specifying the exact output format eliminates the model’s default interpretation and gives you consistent, usable output.
Useful format specifications to include
- Length: “Under 200 words,” “exactly 3 paragraphs,” “5 bullets maximum”
- Structure: “Format as a table with columns X, Y, Z,” “use H2 and H3 headings,” “respond as a numbered list”
- Tone: “Write as a British academic,” “conversational but precise,” “no corporate jargon”
- What to exclude: “No preamble,” “skip the summary,” “do not repeat the question”
- Persona of the output: “Write as if explaining to a 16-year-old,” “write for a CTO audience”
The more format constraints you specify, the less the model guesses — and the less work you have to do editing the output.
Technique Comparison Table
| Technique | Best For | Complexity | Speed |
|---|---|---|---|
| Zero-Shot | Simple, well-defined tasks | Low | Fast |
| Few-Shot | Style/format matching | Low | Fast |
| Chain-of-Thought | Reasoning and analysis | Medium | Medium |
| Tree-of-Thought | Strategic decisions | High | Slow |
| Role/Persona | Expert-level output | Low | Fast |
| Prompt Chaining | Complex multi-step tasks | High | Slow |
| Self-Consistency | High-stakes accuracy | Medium | Slow |
| ReAct | Agentic/adaptive tasks | High | Slow |
| Contrastive | Format and tone precision | Medium | Medium |
| Negative Prompting | Avoiding known failure modes | Low | Fast |
| Format Control | Consistent output structure | Low | Fast |
Mistakes People Make After Learning These Techniques
Over-engineering simple prompts
Not every task needs chain-of-thought, role prompting, and format control stacked together. Apply the minimum technique needed for the task. Zero-shot with clear instructions handles the majority of everyday AI tasks. Reserve the heavier techniques for complex, high-stakes, or repeatedly failing tasks.
Learning the names without understanding the why
Chain-of-thought works because it forces sequential reasoning. Few-shot works because it provides style anchors. If you understand why a technique works, you can adapt it to novel situations. If you only memorize the name, you will apply it mechanically and miss when it is and is not appropriate.
Ignoring iteration
Every technique above produces a first draft. The best prompt engineers treat the first output as diagnostic information: what did the model understand, what did it miss, and what one change to the prompt would fix it? The technique is the starting structure. Iteration is where the quality comes from.
Frequently Asked Questions
Do these techniques work with all AI models?
Yes, with minor variations. Chain-of-thought, few-shot, role prompting, and format control work across ChatGPT, Claude, Gemini, Mistral, and most capable language models. The underlying principle — give the model better signal — is universal. Individual models may respond differently to specific phrasings, so light iteration may be needed when switching tools.
Is prompt engineering still relevant with newer models?
More so, not less. Newer models are more capable, which means the ceiling of what good prompting can achieve is higher. A mediocre prompt on a powerful model still produces mediocre output. The same model given chain-of-thought and role context produces dramatically better output. Capability amplifies the returns on technique.
What is the difference between prompt engineering and prompt design?
The terms are often used interchangeably. Prompt engineering tends to refer to the technical practice of crafting prompts for production AI systems, including system prompts and API-level configuration. Prompt design tends to refer to the craft of writing individual prompts for specific tasks. The techniques in this guide apply to both.
Keep Practising
Techniques are only useful when applied. The fastest way to internalize them is to work through a real task using a structured approach. Google’s Prompting Essentials course provides a beginner-friendly framework — the TCREI approach — that maps directly onto several techniques in this guide. Our full breakdown is here: Google’s Prompt Engineering Course: honest review.
For ready-to-use prompts applying these techniques across every real-world use case, see the complete ChatGPT prompts library.
More AI prompt guides and resources at Promptorix.






Leave a Reply