I’m trying to get better results from generative AI tools but I’m confused about the different types of prompts people recommend, like instructional prompts, role-based prompts, few-shot prompts, and so on. I’ve seen a lot of scattered advice online and it’s hard to tell what actually works in real projects, like content creation or coding help. Can anyone break down the main types of prompts for generative AI, when to use each, and share practical examples or best practices that have worked for you?
Here is a simple breakdown of common prompt types and how to use them.
- Instructional prompts
You tell the model exactly what to do.
Format: “Do X in style Y with constraints Z.”
Example:
“Explain the concept of APIs to a non-technical manager. Use short paragraphs. Give 3 examples from real products.”
Use this when:
- You know the task.
- You know format and audience.
Tips:
- State goal, audience, format, length, constraints.
- Add “Think step by step” for reasoning tasks.
- Role-based prompts
You assign a role or persona.
Format: “Act as a [role]. Your job is to [goal].”
Example:
“You are a senior frontend engineer. Review this React code for performance and readability. Point out issues and suggest fixes.”
Use this when:
- You want tone or perspective from a domain expert.
- You want the model to focus on a specific responsibility.
Tips:
- Be specific, like “strict teacher”, “supportive tutor”, “skeptical reviewer”.
- Combine with clear instructions: role + task + format.
- Few-shot prompts
You give examples of input and output, then give a new input.
Format:
Input: …
Output: …
Input: …
Output: …
Input: [your new case]
Example:
Input: “Write title about AI safety for a technical blog.”
Output: “Practical AI Safety: Design Principles for Reliable Systems”
Input: “Write title about AI in education for teachers.”
Output: “AI in the Classroom: Practical Tools for Busy Teachers”
Input: “Write title about AI for lawyers.”
Output: ???
Use this when:
- You want consistent style.
- You want the model to infer pattern from examples.
Tips:
- Use 2 to 5 good examples.
- Make examples close to your target task.
- Chain-of-thought / step-by-step prompts
You ask the model to show reasoning before final answer.
Example:
“Reason step by step. First list assumptions. Then analyze options. Then give a final recommendation in 3 bullet points.”
Use this when:
- You want better logical output.
- You want to inspect reasoning.
Tips:
- Separate “thinking” section and “final answer” if needed.
- For coding or math, ask for steps then final code or final number.
- Structured output prompts
You ask for a fixed structure, often JSON, tables, bullet templates.
Example:
“Analyze this product review. Respond in JSON with fields:
sentiment: positive, neutral, or negative
reasons: list of strings
suggested_action: one short sentence”
Use this when:
- You plan to feed output into another tool.
- You need consistent format.
Tips:
- Show a sample output structure.
- Tell it to respect the structure and not add commentary.
- System plus user prompt combo
If your tool lets you set system or “persona” instructions, use both.
Pattern:
System: “You are a concise, practical technical assistant for software engineers.”
User: “Review this SQL query. Suggest optimizations and index changes. Keep answer under 200 words.”
Use this when:
- You use the same style across many queries.
- You want to enforce tone or safety rules.
- Constraint heavy prompts
You stack constraints so the model stays on rails.
Example:
“Generate 5 email subject lines.
Constraints:
- Max 45 characters each
- No question marks
- Audience: small business owners
- Tone: direct, no hype words
Return as a numbered list.”
Use this when:
- You have clear business or brand rules.
- You care about length, tone, or banned words.
- Hybrid prompts
Most good prompts combine types. Example of hybrid:
Role-based + instruction + few-shot + structure:
“You are an experienced copywriter for B2B SaaS.
Goal: Rewrite feature descriptions for clarity.
Style: simple, concrete, no marketing fluff.
Example input:
‘Our next-gen platform leverages AI to empower teams.’
Example output:
‘Our software uses AI to assign tasks and set priorities so teams know what to do next.’
Now rewrite these 3 feature descriptions.
Return as bullet points: Original: … / Rewrite: …”
How to pick which type to use
- If you want clarity: Instructional + constraints.
- If you want tone or expertise: Role-based + instruction.
- If you want pattern matching or style mimic: Few-shot.
- If you want reliability on complex tasks: Step-by-step + structured output.
Simple template you can reuse
Goal: what you want.
Context: who, where, why.
Role: who the model pretends to be.
Steps: what to do first, second, third.
Format: bullets, table, JSON, etc.
Constraints: length, tone, banned stuff.
Examples: 1 to 3 short samples.
If your current prompts look like “Write an email about this” you will see better results if you rewrite them like:
“Goal: Write a short follow-up email after a sales demo.
Audience: busy IT director.
Tone: respectful, direct, no hype.
Length: 120 words or less.
Structure: greeting, 3 bullet recap, 1 call to action, signoff.
Context: They saw a demo of our monitoring tool yesterday. They worry about downtime and alert fatigue.”
That covers most prompt types you see people talk about. The trick is not labels. The trick is being explicit about goal, context, role, format, and constraints.
You’re overthinking the “types” a bit. Prompt categories are useful, but they’re more like flavors than strict boxes. @suenodelbosque already laid out a nice taxonomy, so I’ll just pile on with how I actually use this stuff day to day and where I kind of disagree.
I mostly think in layers instead of “types”:
-
Goal layer
Most people skip this and then blame the model.
Ask yourself before you type anything:- What decision do I need to make after I read the answer?
- Is this for thinking, drafting, or final copy?
Example tweak:
- Vague: “Explain microservices.”
- Useful: “Explain microservices so I can decide if they’re worth migrating our monolith for a 5 person eng team. Focus on tradeoffs, not definitions.”
-
Context layer
This matters more than role-play, in my experience.
People love “Act as a senior X” but often forget context like:- Time constraints
- Existing constraints (tech stack, budget, audience skill)
- What has already been tried
I’d honestly put “context” ahead of “role based prompts” most of the time. The model can sound like an expert and still give advice that makes zero sense for your situation.
-
Control layer: how much freedom you give it
This is where all those types actually sit:- High freedom: “brainstorm ideas, surprise me”
- Medium: “3 ideas, each 2 sentences, one pro and one con”
- Low: “Fill this template exactly, no extra text”
Instead of thinking “few shot vs structured”, think “how tightly do I want to steer this thing”.
-
Iteration layer (almost nobody talks about this)
The first answer is rarely the final product. So I do:- Round 1: “Give me a rough version so we can iterate. Don’t worry about polish.”
- Round 2: “Tighten this. Cut redundancy. Keep the same points, half the length.”
- Round 3: “Now adjust tone for [audience].”
That flow matters more than perfectly classifying your original prompt.
-
Feedback loop prompts
This is underrated: ask the model how to prompt it better for this specific task.
Examples:- “You just wrote that draft. If I wanted something 3x better, what information should I have given you up front?”
- “List 5 questions you need me to answer so you can improve this output.”
Then you answer those questions and re prompt. You’ll see a big jump.
-
Meta prompts for consistency across tools
You mentioned “generative AI tools” plural. The taxonomy from @suenodelbosque is great, but in practice different tools respond differently to the same style of prompt. So I keep a little “house style” I reuse:- Start: “Goal: …”
- Then: “Context: …”
- Then: “Constraints: …”
- Then: “Format: …”
- Finally: “Now perform the task.”
That pattern transfers fine across tools regardless of their jargon about prompt types.
Where I slightly disagree with the common advice:
- “Act as a [role]” is often overrated. It helps tone and framing but is not magic. If you have to choose between a clear task description and a fancy persona, pick clarity every time.
- “Think step by step” can help, but can also lead to verbose nonsense if the task is simple. I use it only for actual reasoning, not for stuff like “write a tweet.”
- Few shot is powerful, but it’s only worth the setup cost if you care about consistent style or format across many uses. For one off questions, just state style directly.
If you want something concrete to try for a week, ignore categories and do this:
- Start every prompt with:
“Goal: [what I will use this for, in 1 sentence]” - Add:
“Audience: [who will read / use this]” - Add:
“Constraints: [length, tone, must include / must avoid]” - Finish with:
“Task: [specific thing you want]”
Then, after every reply, ask:
“Show me a better version of the prompt I should have used to get this output on the first try.”
That habit will teach you more about prompt types in a week than reading 20 blog posts about them.
You’re getting tangled in “types of prompts” because people treat them like strict frameworks instead of tools you mix and match.
Let me zoom in on how to think about those types differently from what @suenodelbosque and the other reply already covered.
1. Don’t collect prompt types, collect levers
Instead of memorizing “instructional, role-based, few-shot, chain-of-thought,” think in terms of 4 levers you can pull:
-
Precision lever
- Tight: exact task, format, constraints
- Loose: open-ended exploration, brainstorming
Instructional prompts are basically you pulling the precision lever up.
-
Perspective lever
- That’s what people call “role-based”.
- “Act as a product manager…” is useful, but I’d argue a concrete viewpoint is better:
- “Write this as if you had to defend it to a skeptical CFO.”
That gives a conflict and a standard, not just a title.
- “Write this as if you had to defend it to a skeptical CFO.”
-
Evidence lever (few-shot & examples)
- Few-shot examples are you saying: “Do it like THIS, not in the abstract.”
- You can also use anti-examples:
- “Do not write like this: … Here’s why: it’s too fluffy and generic.”
I find anti-examples more powerful than people admit.
- “Do not write like this: … Here’s why: it’s too fluffy and generic.”
-
Process lever (reasoning / chain-of-thought)
- “Think step by step” is one crude version.
- Better: specify what process you want:
- “List assumptions first, then reason, then answer in 1 paragraph.”
You can mix these without caring what blog-post category they fall into.
2. Where I actually disagree a bit
-
Role prompts are “overrated” only when they’re vague.
“Act as an expert programmer” is mushy.
“Act as a staff engineer reviewing a risky migration proposal; focus on failure scenarios and rollback plans” is very different.
I lean on roles a lot when I want an attitude or stance (skeptical critic, enthusiastic marketer, harsh reviewer). -
Few-shot is underrated for thinking, not just style.
People mostly show style examples. You can also show reasoning examples:- “Here is how I compare two options: [Example 1]. Do the same comparison method for X vs Y.”
That trains the model to follow your thinking pattern.
- “Here is how I compare two options: [Example 1]. Do the same comparison method for X vs Y.”
-
Iteration is great, but sometimes overkill.
If your task is small, you can front-load the iteration by “simulating it” in a single prompt:“Draft 3 quick versions, pick the best yourself, then refine that one with tighter structure and clearer headings. Only output the final refined version.”
You get the benefits of iteration in one go.
3. Practical translation of “prompt types”
Instead of memorizing names, you can map them like this:
-
Instructional prompt
- You control: what to do and how to output it.
- Formula:
- “Your task is to [goal]. Follow these rules: [3–5 short bullets]. Output in [format].”
-
Role-based prompt
- You control: voice and priority lens.
- Formula:
- “Assume you are [role], whose main concern is [top priority]. You are speaking to [audience]. Task: [clear instruction].”
-
Few-shot prompt
- You control: style / structure / process by showing examples.
- Formula:
- “Here are 2 examples of the kind of output I want: [Example A] / [Example B]. Notice that they [3 key characteristics]. Now create a new example for [my case].”
-
Chain-of-thought / reasoning prompt
- You control: how the model thinks before answering.
- Formula:
- “First, list the key factors. Second, evaluate each factor briefly. Third, make a recommendation with one-sentence justification.”
You can literally paste one of these patterns and you already get 80% of the benefit without worrying what “type” it is.
4. A lightweight “stack” you can reuse
If you want something different from the “Goal / Context / Constraints / Format” pattern the other answer mentioned, here’s an alternative stack:
-
Outcome
- “I will use this to [decide X / write Y / teach Z].”
-
Standard of quality
- “This is ‘good’ if it [3 criteria]. This is ‘bad’ if it [2 pitfalls].”
-
Perspective
- “Take the stance of [role] with [main concern].”
-
Evidence / examples
- Optional but powerful: “Here is a sample of what I consider good: …”
-
Process
- “Follow this process: [steps]. Only show me [final / both steps and final answer].”
-
Task
- “Now apply this to: [problem].”
This absorbs all the “types” into one reusable template.
5. About that product title “”
Since you mentioned improving readability and SEO, the blank product title is actually a decent testbed for prompts:
- Ask the model:
- “Invent a product title called ‘’ that improves readability for AI prompt guides. Target: people confused by prompt types.”
- Then:
- “List pros & cons of the product named ‘’ as if it existed as a digital guidebook.”
You could get something like:
Pros of ‘’
- Easy-to-skim structure with real prompt templates
- Focused on practical scenarios instead of theory
- Shows side-by-side “bad vs improved” prompt examples
- Uses consistent frameworks that work across different generative AI tools
Cons of ‘’
- Might not cover niche domains like legal or medical research deeply
- Could age as models evolve and patterns shift
- If it’s too focused on beginners, advanced users may find it shallow
That sort of pros & cons exercise is actually a great way to practice prompts: you see how changing role, audience, or constraints moves the output.
6. How to practice without overthinking “types”
Try this 3-run drill with any prompt:
-
Run 1: Pure instruction
- “Explain [topic] to [audience] in [length], focus on [2 priorities].”
-
Run 2: Add role & process
- “Act as [role]. First list key points as bullets, then write a 3-paragraph explanation for [audience]. Focus on [2 priorities].”
-
Run 3: Add example
- “Using this as a style example: [short sample], redo the previous answer with similar tone and structure.”
Compare the three outputs. You’ll feel what each “type” is doing, instead of memorizing names for them.
@ s u e n o d e l b o s q u e’s taxonomy is solid, just a bit more conceptual. The angle here is more: treat prompt types like knobs you turn, not like rigid categories you must choose between.