Prompt Structure Framework

Every effective prompt has up to four components. Not all are required for every prompt, but using more of them leads to better results.

RICE Framework

Component What it does Example
Role Sets the AI's persona/expertise "Act as a senior data analyst"
Instruction The specific task "Analyze this sales data and identify trends"
Context Background information "This is Q4 data for our SaaS product targeting SMBs"
Expectation Output format/constraints "Present findings as a bullet list with a summary table"

Core Techniques

Direct Instruction

Simply tell the AI exactly what to do. Be specific and clear.

"Write a 200-word product description for a wireless noise-canceling headphone targeting remote workers. Emphasize comfort for all-day wear."

Role Prompting

Assign the AI a specific expertise or perspective.

"You are an experienced UX researcher. Review this onboarding flow and identify potential friction points."

Few-Shot Prompting

Show the AI examples of what you want before asking for the output.

"Here are two examples of the tone I want: [example 1] [example 2]. Now write a similar piece about [topic]."

Chain-of-Thought

Ask the AI to reason step by step.

"Think through this problem step by step before giving your final answer."

Task Decomposition

Break complex tasks into smaller, sequential steps.

"Let's tackle this in phases. First, outline the main sections. Then we'll draft each one."

Output Format Specifiers

Use these phrases to control output format:

  • "Format as a markdown table with columns for..."
  • "Respond as a numbered list"
  • "Write in bullet points, max 2 sentences each"
  • "Output as JSON with the following structure..."
  • "Create a pros/cons comparison"
  • "Limit your response to 200 words"

Refinement Prompts

When the first output isn't quite right:

  • "Make it more concise — cut this in half"
  • "Add specific examples for each point"
  • "Adjust the tone to be more [casual/formal/technical]"
  • "Restructure this as a step-by-step guide"
  • "What did you leave out? Add anything important I might be missing"

Evaluation Prompts

Ask the AI to critique its own work:

  • "Review your response and identify any weak points or unsupported claims"
  • "Rate the quality of this output on a scale of 1-10 and explain what would make it a 10"
  • "What assumptions did you make? Are any of them potentially wrong?"

Common Patterns

Comparison

"Compare [A] and [B] across these dimensions: [list]. Present as a table. End with a recommendation for someone who [use case]."

Summarization

"Summarize this in [X] bullet points. Focus on actionable takeaways for [audience]."

Content Creation

"Write a [format] about [topic] for [audience]. The tone should be [tone]. Include [specific elements]. Length: [constraint]."

Problem Solving

"I'm facing this challenge: [description]. Think through possible solutions step by step. For each solution, list pros, cons, and effort level."

Learning

"Explain [concept] as if I'm [level]. Use analogies from [familiar domain]. Then give me 3 practice questions to test my understanding."