Home Tutorials Prompt Engineering Module 2: Core Elements of a Good Prompt
Module 2: Core Elements of a Good Prompt

Module 2: Core Elements of a Good Prompt


📘 Module 2: Core Elements of a Good Prompt

Writing a great prompt isn't about luck; it's about structure. To consistently get high-quality outputs from AI, you need to provide the right context and constraints. Use the formula below to ensure your prompts never miss the mark.


The PROMPT Formula

A comprehensive framework to structure your instructions for maximum clarity and accuracy:

P – Purpose
What do you want to achieve? (The core goal or task)
R – Role
Who should the AI act as? (Expertise, persona, or mindset)
O – Output format
How should the answer look? (Table, bullet points, code block, essay)
M – Method
What approach should the AI use? (Step-by-step, chain of thought, comparative analysis)
P – Parameters
Length, tone, style constraints (e.g., professional tone, under 300 words)
T – Target audience
Who is this for? (A 5-year-old, a senior executive, a non-technical stakeholder)

Complete Example: Fitness Planning

See how the formula maps to a real-world scenario:


Role: Act as a fitness coach
Context: I'm a beginner who hasn't exercised in 2 years
Task: Create a home workout plan
Format: Table with day, exercise, sets, reps
Constraints: 30 minutes per day, no equipment needed, 5 days per week
Audience: 35-year-old office worker
        

🎯 Practice Exercise 2

Task: Build a complete prompt using the PROMPT formula for: "Teach me SQL"

Sample Answer:


Role: Act as a database instructor with 10 years experience
Context: I'm starting from zero, know basic computer skills
Task: Explain SQL basics and how to write simple queries
Format: Step-by-step guide with code examples in code blocks
Constraints: Keep it under 500 words, use simple language, include 3 practical examples
Audience: 25-year-old non-technical person wanting to learn data analysis
            

🏋️ Test Yourself With Exercises

Take our quiz on Module 2: Core Elements of a Good Prompt to test your knowledge.

Browse Quizzes »