In Part 1, we learned how AI generates answers and why clear instructions matter.

In Part 2, we explored the six building blocks of a good prompt: Role, Context, Examples, Task, Constraints, and Output Format.

Now comes another important question:

How do we know which prompting technique to use for a particular task?

After all, asking AI to translate a sentence is different from asking it to analyze a report or plan a week's activities.

We don't need the same approach for everything.

That's where prompting patterns come in.

In this article, we'll explore six useful techniques, understand when each one helps, and practice using them with everyday examples.

No programming experience required.

1. What Are Prompting Patterns?

Think about cooking.

You don't use the same recipe for every dish.

Sometimes you boil, sometimes you bake, and sometimes you fry.

The ingredients and methods change depending on what you're preparing.

Prompting works similarly.

A prompting pattern is a reusable way of giving instructions to AI for a particular type of task.

Instead of memorizing hundreds of prompts, you can learn a few useful approaches and adapt them to different situations.

Here are the six we'll explore:

Technique Main idea
Zero-shot Ask directly without examples
Few-shot Show examples of what you want
Chain-of-thought Support tasks that involve several reasoning steps
Role-based Give AI a particular role or perspective
Constraint-based Set clear rules and limits
Meta-prompting Ask AI to help improve a prompt

Don't memorize prompts. Understand the patterns behind them.

You can start with a simple instruction and add other techniques when they are useful.

Let's see how.

2. Zero-Shot Prompting: Just Ask Directly

Zero-shot prompting sounds technical, but it's something you've probably already done.

Zero-shot means asking AI to complete a task without providing examples of the expected answer.

For instance:

Translate "Good morning" into French. 

Or:

Summarize this paragraph in three sentences. 

You give the instruction, and the AI attempts the task using what it has already learned.

A practical example

Suppose you want to understand inflation.

Explain inflation in simple English. Include one everyday example. Keep the answer under 100 words. 

That's still zero-shot prompting.

Even though you've included instructions and limits, you haven't provided an example answer.

When should you use it?

Zero-shot is a good starting point for straightforward tasks such as translation, basic explanations, summarization, and generating ideas.

Its limitation: If you need a very specific style or pattern, an instruction alone may not produce the result you expect.

That's when our next technique can help.

3. Few-Shot Prompting: Show, Don't Just Tell

Imagine you're teaching someone to write polite messages.

You could explain:

Use professional and respectful language.

Or you could show them a few examples.

Sometimes examples make the expected style much easier to understand.

That's the idea behind few-shot prompting.

Few-shot prompting means giving AI a small number of examples before asking it to complete a similar task.

Without examples

Rewrite this politely: "Send me the document." 

With examples

Rewrite messages in a polite, professional tone. Example 1: Input: "Call me tomorrow." Output: "Could you please call me tomorrow?" Example 2: Input: "Give me the report." Output: "Could you please share the report?" Now rewrite: "Send me the document." 

The examples demonstrate the pattern you want.

AI can use those patterns to guide its response.

How many examples do you need?

There's no perfect number.

One clear example might be enough. Other tasks may benefit from several examples.

Try to make your examples:

  • Relevant to the actual task
  • Clear and correct
  • Consistent in style
  • Varied enough to cover important situations

When should you use few-shot prompting?

When you need consistent writing styles, repeated formats, specific classifications, or custom patterns.

For example, if you want AI to categorize customer feedback as Positive, Negative, or Neutral, examples can demonstrate how you want the categories applied.

But don't assume examples always make a prompt better. Start simply and test whether they're needed.

4. Chain-of-Thought: Working Through Complicated Problems

Some questions are easy to answer directly.

Others require several connected steps.

Imagine you're planning a small birthday party.

You have a budget of $100 and need to pay for decorations, food, drinks, and a cake.

A useful answer needs to consider several things, not simply suggest random items.

This brings us to chain-of-thought prompting, often shortened to CoT.

Traditionally, this technique involves encouraging a language model to work through intermediate reasoning steps when solving a problem.

A practical example

Instead of asking:

Plan a birthday party for $100. 

Try:

Help me plan a birthday party for 10 people with a $100 budget. Include: 1. Food 2. Drinks 3. Decorations 4. Cake Show the estimated cost of each category. Make sure the total stays within $100. Present the final budget in a table. 

Notice that we've made the problem easier to approach by defining the information needed and asking for a clear breakdown.

We can check the individual costs and whether the total fits the budget.

Does "think step by step" always help?

Not necessarily.

Older prompting approaches often used instructions such as:

Think step by step.

But modern reasoning models can perform additional reasoning internally, and explicitly asking them to show every step may not improve performance.

A more useful habit is to explain the problem clearly and ask for an answer you can verify.

For example:

Show the cost breakdown and check that the total does not exceed $100.

That gives you something concrete to evaluate.

What about self-consistency?

An advanced related technique called self-consistency involves comparing multiple reasoning attempts or possible solutions.

For beginners, you don't need to implement a complicated process.

You can simply compare different proposed approaches and verify their important details independently.

When is this useful?

For planning, calculations, comparisons, and problems involving several requirements.

Remember: even a detailed explanation can contain mistakes. Use reliable tools to verify important calculations.

5. Role-Based Prompting: Give AI a Perspective

In Part 2, we introduced the role component.

Now let's see how it becomes a prompting technique.

Imagine you're struggling with English grammar.

You could ask:

Explain present perfect tense. 

Or:

Act as a friendly English tutor. Explain present perfect tense to a beginner. Use simple words and three examples. Give me one practice question at the end. 

The second prompt gives AI a clearer teaching style and audience.

That's role-based prompting.

Other useful roles

Situation Example role
Learning Act as a patient teacher
Writing Act as a helpful editor
Preparing for an interview Act as a job interviewer
Planning a trip Act as a travel planner
Reviewing documents Act as a careful document reviewer

A useful technical detail

Giving AI a role changes how you ask it to approach a task. It does not turn the model into a qualified professional.

For example, writing "Act as a doctor" does not make an AI assistant a licensed medical professional or guarantee that its advice is correct.

Also, adding fictional experience like "You have 20 years of experience" does not automatically improve accuracy.

It's often more useful to specify what you expect:

Explain the options clearly, mention uncertainties, and avoid making unsupported claims.

When should you use role-based prompting?

When a particular viewpoint, audience, or communication style would help with the task.

6. Constraint-Based Prompting: Set the Rules

Imagine asking someone to write a speech.

You say:

Write a speech about teamwork.

They might produce five pages.

But you only have two minutes to speak.

You forgot to mention the limit.

That's why constraint-based prompting is useful.

Constraints are rules that help define an acceptable answer.

Basic prompt

Write a speech about teamwork. 

With constraints

Write a speech about teamwork. Requirements: - Suitable for school students - Under 200 words - Simple English - Include one everyday example - End with an encouraging message 

The second prompt gives clear expectations.

Two types of constraints

Type Meaning Example
Required A condition the answer must meet Keep the answer under 200 words
Preferred A guideline that improves the answer Use a warm, friendly tone

In technical work, these are sometimes called hard constraints and soft constraints.

For example, a document might need to contain exactly five sections. That's a required condition.

But you might also prefer short sentences. That's a style preference.

Do constraints guarantee success?

No.

AI can still miss instructions, especially when several rules conflict.

For tasks where exact formatting or accuracy matters, review the output or use additional checking tools.

When is this useful?

For word limits, specific structures, consistent writing, document formatting, and tasks with clear requirements.

7. Meta-Prompting: Let AI Help Improve Your Prompt

What if you know what you want but don't know how to explain it clearly?

You can ask AI to help.

This is called meta-prompting.

In simple terms, it means using a prompt to help create, review, or improve another prompt.

Example: Improving a study-plan prompt

Suppose your original prompt is:

Make a study plan for me. 

Instead of endlessly rewriting it yourself, ask:

Review this prompt: "Make a study plan for me." Identify what important information is missing. Ask me up to three questions that would help improve it. Then create a clearer prompt using my answers. 

The AI might ask:

  • Which subject are you studying?
  • When is your exam?
  • How many hours can you study daily?

Once you answer, it can help create a more specific request.

Another useful technique: Prompt review

Review my prompt for clarity. Tell me: 1. What is unclear? 2. What information is missing? 3. What could be improved? Then suggest a revised version. Keep the wording simple. My prompt: [PASTE PROMPT HERE] 

This is particularly useful when building prompts you plan to reuse.

However, remember that an AI's suggested prompt isn't automatically better.

Test the improved prompt and compare its results with the original.

8. Can We Combine Prompting Techniques?

Absolutely.

These aren't six separate rules you must choose between.

You can combine them when the task needs it.

Let's return to a familiar example from Part 2.

Suppose you want to write a leave-request email.

Act as a professional writing assistant. Write an email to my manager requesting two days of leave because of a family commitment. Use a polite and respectful tone. Keep it under 120 words. Include a subject line and email body. 

This prompt combines several ideas:

  • Role-based: Act as a writing assistant.
  • Zero-shot: No example answer is provided.
  • Constraint-based: Use a polite tone and stay under 120 words.
  • Output format: Include a subject and body.

If you needed the email to match a very particular writing style, you could add an example.

And if the result wasn't useful, you could use meta-prompting to review the instructions.

The goal isn't to use as many techniques as possible.

Use the simplest combination that meets your needs.

9. Which Technique Should You Choose?

Here's a quick reference guide.

Your situation Start with
You need a simple answer Zero-shot
You want a specific style or pattern Few-shot
Your task involves several decisions or calculations A clear reasoning or problem breakdown
You want a particular perspective or teaching style Role-based
Your answer must follow rules or limits Constraint-based
You don't know how to improve your prompt Meta-prompting

Do these work with ChatGPT, Claude, Gemini, and local AI models?

Generally, these ideas can be applied across many language models.

But that doesn't mean every model responds to the same prompt in exactly the same way.

Some models follow complex instructions more reliably than others. Some benefit more from examples, while advanced reasoning models may prefer direct, outcome-focused instructions.

There is no universal prompt that guarantees the best results everywhere.

A good approach is to start with a simple prompt, test it on the model you're using, and improve it based on the response.

10. Your 5-Minute Challenge

Now it's time to practice.

Open your preferred AI assistant.

We'll use one simple task: explaining why saving money matters.

Step 1: Try zero-shot

Explain why saving money is important. 

Read the answer.

Step 2: Add a role

Act as a friendly financial educator. Explain why saving money is important to a high school student. 

Is the explanation easier to understand?

Step 3: Add constraints

Explain why saving money is important to a high school student. Use simple English. Keep it under 100 words. Include one everyday example. 

Step 4: Try meta-prompting

Review my previous prompt. Suggest one change that could make it clearer for beginners. Explain why you suggested it. 

Compare the results.

Try keeping a copy of each version, just as we discussed in Part 2.

For a more controlled comparison, return to your original prompt and change one instruction at a time.

The goal isn't simply to produce a longer prompt.

It's to understand which change actually makes the answer more useful.

Quick Recap

Let's summarize the six techniques.

Pattern Remember it as
Zero-shot Ask directly
Few-shot Show examples
Chain-of-thought Support multi-step problem solving
Role-based Give a perspective
Constraint-based Set clear rules
Meta-prompting Improve your prompts with AI

The more you practice, the easier it becomes to recognize which approach suits a task.

You don't have to memorize everything.

Start with a direct question, add the information you need, and test the results.

What's Coming in Part 4?

In Part 4, we'll explore roles and constraints in more depth.

We'll also look at a real technical writing standard called ASD-STE100, which is designed to make technical instructions easier to understand and follow.

Don't worry if you've never heard of it.

We'll explain the idea using simple examples and explore what formal writing rules can teach us about prompting AI.

Final Thoughts

Prompt engineering isn't about memorizing complicated formulas.

It's about understanding what you're trying to achieve and choosing a useful way to communicate it.

Sometimes a direct question is enough.

Sometimes examples help.

Sometimes you need clearer rules, more background information, or a different approach.

The best prompting technique is the one that helps you get a useful, accurate, and verifiable result for your task.

Start simple. Test your results. Improve what doesn't work.

That's how prompting becomes a skill rather than guesswork.

One Question Before You Go

Which of these six prompting techniques have you already used, even without knowing its name?

Share your experience in the comments!

This is Part 3 of 6 in my "Prompt Engineering from Scratch" series. I work with and test open-source AI models on real documents, and I'm sharing practical lessons along the way.

Further Reading