The Complete Guide to Prompt Engineering
Learn to write perfect prompts for ChatGPT, Claude and Gemini in 6 simple steps. This guide shows you how to structure your prompts for precise and useful results.
Reading time: 8 min
Table of Contents
Define the Role
The role gives the AI an identity. By specifying who it is, you orient its knowledge and response style.
Define the Role
You are a digital marketing expert with 10 years of experience.
Use "You are", "Act as" or "As a" to trigger detection.
Provide Context
Context allows the AI to understand your situation. The more precise the context, the more relevant the response.
Provide Context
Context: I'm launching a B2B SaaS startup in project management. Our target is SMBs with 10-50 employees.
Use "Context:", "Situation:" or "Background:" to trigger detection.
Specify the Task
The task is the main instruction. Be explicit about what you expect: text, analysis, list, code...
Specify the Task
Write a landing page highlighting the 3 main benefits of our tool.
Use action verbs: "Write", "Generate", "Analyze", "Translate", "Summarize".
Choose the Format
The format specifies how you want to receive the response. Without a format, the AI chooses a default that may not be optimal.
Choose the Format
Format: as a table with 3 columns (Benefit, Description, Example)
Format examples: bullet list, table, JSON, markdown, structured paragraph.
Add Constraints
Constraints define the boundaries. They prevent responses that are too long, off-topic, or in the wrong tone.
Add Constraints
Constraints: maximum 200 words, professional but accessible tone, in English, avoid technical jargon.
Use "maximum", "minimum", "do not", "avoid", "in English", "professional tone".
Provide Examples
Examples guide the AI through illustration. One well-chosen example is worth more than a long paragraph of instructions.
Provide Examples
Example: Input: "Our tool syncs tasks" Output: "No more scattered tasks. Sync everything in one click."
Use "Example:", "For example", or the "Input/Output" format to trigger detection.
Ready to write your prompt?
Use Promptingo to check in real time that your prompt contains all 6 sections.
Try Promptingo