ChatGPT Learn Logo

๐Ÿ“ Master Prompt Structure

Crafting effective prompts is like writing clean code โ€” it's all about clarity, intent, and systematic structure. Master these frameworks to transform vague requests into precise, actionable instructions.

โšก Structured prompts can improve response quality by 4x and reduce revision cycles by 80%

๐Ÿ—๏ธ The 5-Part Prompt Framework

๐Ÿ‘‘

Role

Define persona & expertise

๐ŸŽฏ

Context

Provide background & scope

๐Ÿš€

Goal

State desired outcome

๐Ÿ“

Constraints

Set boundaries & limits

๐Ÿ“„

Format

Specify output structure

Detailed Framework Breakdown:

1

Role / Persona

Assign expertise and perspective. Examples: "Act as a senior software engineer", "You are a marketing consultant"

2

Context & Background

Provide necessary information and scope. Examples: "For a tech startup targeting millennials", "Given the current market conditions"

3

Goal & Objective

Define the desired outcome. Examples: "Create a 30-day content calendar", "Debug this Python function"

4

Constraints & Boundaries

Set limitations and requirements. Examples: "Under 500 words", "Exclude technical jargon", "Use only free tools"

5

Output Format

Specify structure and presentation. Examples: "As a markdown table", "In bullet points", "JSON format"

๐Ÿ› ๏ธ Interactive Prompt Structure Builder

"You're a resume expert. Help me rewrite my resume for a Product Manager role in a startup, focusing on leadership, agile experience, and metrics. Present in bullet points."

๐Ÿ’ก Pro Tip: Use this framework for complex tasks. For simple queries, you can skip some elements, but always include at least Role + Goal.

๐Ÿ“š Framework in Action: Before & After

๐Ÿ’ผ Career & Resume Example

โŒ Unstructured Prompt

"Help with my resume"

Problems: No role, no context, no specific goal, no format

โœ… Structured Prompt

"[Role] You're a resume expert specializing in tech careers. [Context] I'm transitioning from academic research to industry. [Goal] Rewrite my experience section for Product Manager roles. [Constraints] Focus on leadership, agile methodology, and quantifiable metrics. [Format] Present as bullet points with action verbs."

Benefits: Targeted expertise, clear scope, measurable outcomes

๐Ÿ’ป Technical Example

โŒ Unstructured Prompt

"Write some Python code"

Problems: Vague request, no context, no specifications

โœ… Structured Prompt

"[Role] Act as a senior Python developer. [Context] I'm building a data processing pipeline for customer analytics. [Goal] Create a function to clean and validate email addresses from user input. [Constraints] Handle common typos, remove duplicates, and validate format without external libraries. [Format] Provide the code in a Python code block with docstrings and error handling."

Benefits: Production-ready code, clear requirements, proper documentation

๐Ÿ“ˆ Business Strategy Example

โŒ Unstructured Prompt

"Give marketing advice"

Problems: No specificity, no target audience, no actionable format

โœ… Structured Prompt

"[Role] You are a digital marketing consultant for SaaS companies. [Context] My startup offers project management software for remote teams. [Goal] Develop a 3-month content marketing strategy to increase trial signups. [Constraints] Budget under $1000 monthly, focus on LinkedIn and SEO. [Format] Present as a monthly calendar table with content themes and KPIs."

Benefits: Industry-specific, measurable, budget-conscious, actionable

๐Ÿš€ Advanced Structure Techniques

๐Ÿงฉ Chained Prompts

Break complex tasks into sequential prompts:

"First, analyze this data. Then, based on your analysis, create recommendations."

๐ŸŽฏ Conditional Logic

Use if-then statements for adaptive responses:

"If explaining to beginners, use simple terms. If for experts, include technical details."

๐Ÿ“ Template Variables

Create reusable prompt templates:

"Act as [ROLE]. Create [OUTPUT] for [AUDIENCE] focusing on [KEY_AREAS]."

โšก Progressive Detailing

Start broad, then add specifics:

"Outline the main points first, then expand each section with examples."

๐Ÿ“‹ Structure Quick Reference

Role Starters

  • โ€ข "Act as a [expert]"
  • โ€ข "You are a [professional]"
  • โ€ข "Imagine you're [role]"
  • โ€ข "As a [specialist]"

Context Phrases

  • โ€ข "For a [specific scenario]"
  • โ€ข "Given that [condition]"
  • โ€ข "In the context of [situation]"
  • โ€ข "Considering [background]"

Goal Verbs

  • โ€ข "Create a [deliverable]"
  • โ€ข "Analyze [subject]"
  • โ€ข "Explain [concept]"
  • โ€ข "Generate [output]"

Constraint Words

  • โ€ข "Under [limit]"
  • โ€ข "Focus on [area]"
  • โ€ข "Exclude [element]"
  • โ€ข "Using only [resources]"

Format Directives

  • โ€ข "As a [table/list]"
  • โ€ข "In [format] format"
  • โ€ข "Structure as [layout]"
  • โ€ข "Present in [style]"

Quality Checks

  • โ€ข Read prompt aloud
  • โ€ข Test one element at a time
  • โ€ข Use the 5-part framework
  • โ€ข Iterate and refine