Some prompts produce spectacular results. Others, on the same topic, yield flat and generic responses. The difference? It's neither luck nor talent — it's structure.
A perfect prompt is made up of 6 fundamental elements. When you master them, you get relevant responses from any AI — ChatGPT, Claude, Gemini, or anything else. This article breaks down each element, explains why it matters, and shows you how to use it with concrete examples.
If you're just starting out, check our guide on what is prompting to understand the basics first.
The 6 elements of a perfect prompt
Think of a prompt like a recipe. Every ingredient plays a specific role. Leave one out and the result changes completely. Here are the 6 ingredients of a perfect prompt:
The role
— Who is the AI in this conversation?
The context
— What's the situation?
The instruction
— What should the AI do exactly?
The format
— How should the response be presented?
The constraints
— What limits must be respected?
The examples
— What does the expected result look like?
Let's look at each element in detail.
Element 1: The role — Giving the AI expertise
The role is the first element of your prompt. It defines who the AI is in this conversation. Assigning a role activates the knowledge and vocabulary related to that area of expertise.
Why it's essential: the same topic handled by a "high school teacher" versus a "neuroscience researcher" will produce entirely different results. The role determines the level of detail, vocabulary, and approach.
How to phrase it well:
- Be specific: "technical SEO expert" rather than "marketing expert"
- Add experience: "with 10 years of experience in B2B startups"
- Specify the style: "who explains things in a simple, educational way"
Example:
You are a certified nutritionist specializing in endurance athlete nutrition. You communicate clearly and practically, avoiding medical jargon.
Element 2: The context — Setting the scene
Context gives the AI all the background information it needs to respond relevantly. Without context, the AI has to guess — and it often guesses wrong.
Why it's essential: the AI knows nothing about your situation. Your industry, audience, constraints, goals — all of this must be explicit.
What to include:
- Your current situation and objective
- Your audience or recipient
- Relevant background information (data, history, previous attempts)
- The framework your request fits into
Example:
I'm training for a marathon in 4 months. I currently run 20 miles per week. I'm vegetarian and tend to be iron-deficient. My goal is to finish under 3:45.
Element 3: The instruction — The precise request
The instruction is the heart of your prompt. It's what you're concretely asking the AI to do. A vague instruction produces a vague response.
Why it's essential: it's the only part most people write — but often too vaguely. "Help me with my diet" is not an instruction. "Create a weekly meal plan" is.
Keys to a good instruction:
- Use an action verb at the start: "create," "write," "analyze," "compare," "list"
- Be specific about the expected deliverable
- One instruction = one task. If you have several, break them down
Example:
Create a 7-day meal plan suited to my marathon training, including breakfast, lunch, dinner, and 2 snacks per day.
Element 4: The format — Structuring the response
The format tells the AI how to present its response. Without format guidance, the AI typically produces long paragraphs — not always what you need.
Why it's essential: a comparison table, a bullet list, and a narrative text contain the same information but serve different purposes. The right format makes the response immediately usable.
Common formats to specify:
- Table with defined columns
- Bullet or numbered list
- Structure with H2/H3 headings
- Specific format: email, LinkedIn post, report
- Word or paragraph count
- Code with comments and tests
Example:
Present the plan as a table with columns: Day, Breakfast, Morning Snack, Lunch, Afternoon Snack, Dinner. Add an "Estimated Calorie Intake" row at the bottom of each day.
Element 5: The constraints — Defining boundaries
Constraints frame the response. They eliminate irrelevant results and force the AI to stay within what's actually useful for you.
Why it's essential: without constraints, the AI tends to produce responses that are too long, too generic, or off-topic. Constraints channel the AI's creativity toward what's genuinely useful to you.
Types of constraints:
- Length: "maximum 300 words," "in 5 points"
- Tone: "professional," "casual," "educational"
- Exclusions: "no dietary supplements," "no technical jargon"
- Audience: "understandable by a beginner"
- Quality: "with sources," "based on scientific data"
Example:
Vegetarian only. Prioritize plant-based iron sources. Maximum $65 budget per week. Maximum 30 minutes prep time per meal. No protein powders.
Element 6: The examples — Show, don't tell
Examples are the advanced prompter's secret weapon. One example is worth a thousand words of explanation. This technique is called few-shot prompting, and it's one of the most powerful levers for getting exactly the result you want.
Why it's essential: some expectations are hard to express in words. Format, tone, level of detail — an example conveys all of this instantly.
How to use examples:
- Show 1 to 3 examples of the expected result
- Provide an "input" example and the corresponding "output"
- Include a counter-example if useful ("do NOT do this")
Example:
Here's the desired format for each meal:
Breakfast (day 1): Oat porridge (80g) + soy milk + banana + pumpkin seeds (15g) — ~450 kcal, 18g protein, 4mg iron
Follow this template for all meals.
The complete prompt: all elements assembled
Here's what a prompt looks like when it uses all 6 elements. Compare it with what most people write:
What most people write:
Make me a meal plan for sports.
The perfect prompt:
[Role] You are a certified nutritionist specializing in endurance athlete nutrition. You communicate clearly and practically.
[Context] I'm training for a marathon in 4 months. I run 20 miles/week, I'm vegetarian, and I tend to be iron-deficient. Goal: finish under 3:45.
[Instruction] Create a 7-day meal plan with breakfast, lunch, dinner, and 2 snacks per day.
[Format] Present as a table: Day | Meal | Details | Calories | Protein | Iron.
[Constraints] Vegetarian only. Max $65/week budget. Max 30 min prep/meal. No protein powders. Prioritize plant-based iron sources.
[Example] Expected format — Breakfast Day 1: Oat porridge (80g) + soy milk + banana + pumpkin seeds (15g) — 450 kcal, 18g protein, 4mg iron.
The difference is clear. The first prompt leaves the AI guessing almost everything. The second guides it precisely toward the desired result.
Do you always need all 6 elements?
No. The 6 elements are your complete toolkit, but you don't need all of them every time:
- Quick question: instruction alone is enough ("What's the capital of Australia?")
- Simple task: instruction + format ("List 5 gift ideas for an 8-year-old, in bullet points")
- Professional task: role + context + instruction + format (most use cases)
- Complex or precise task: all 6 elements for optimal results
The key is knowing these 6 elements so you can deploy them when the result falls short. If the AI isn't giving you what you want, identify which element is missing and add it.
Quick reference cheat sheet
Here's the checklist to review before every important prompt:
Role
— Who is the AI? What expert is it embodying?
Context
— Does the AI have all the necessary info about my situation?
Instruction
— Is my request specific with an action verb?
Format
— Have I specified how I want the response?
Constraints
— Are there limits to follow?
Examples
— Would an example help the AI understand my expectations?
Download this checklist in printable format from our prompting cheat sheet, or use our prompt builder that guides you through each element automatically.
Conclusion: the perfect prompt is a complete prompt
A perfect prompt isn't necessarily long or complex. It's a complete prompt — one that gives the AI everything it needs to produce exactly the result you expect.
Next time an AI response disappoints you, don't blame the tool. Go back to your prompt, identify the missing element among the 6, and add it. You'll be surprised by the difference.
The 6 elements — role, context, instruction, format, constraints, examples — are your universal framework. Master it, and every AI will become a remarkably effective assistant.

L'Art du Prompting
Founder of Prompt Guide and CEO of Webpulser. Digital and AI entrepreneur since 2006, he shares his field-tested prompt engineering techniques.
Practice what you learned
Interactive exercises to sharpen your prompting skills
Stay Updated
Get our best articles and techniques every week.
Related Prompts
Transform long content into catchy social media posts
Transform your articles and long-form content into short, engaging social media publications.
Create Catchy Social Media Headlines
Generates punchy, optimized headlines for your social media posts, adapted to your audience and platform.
Summarize long articles or documents into clear summaries
Condense articles, reports, and lengthy documents into structured and directly usable summaries.
Write Professional Blog Posts and White Papers
Create engaging blog posts and professional white papers that strengthen your industry expertise.