The CLEAR Framework
Master the CLEAR framework for writing effective prompts: Context, Length, Examples, Audience, and Role.
The CLEAR framework is a systematic approach to writing effective prompts for modern AI models like GPT-5, Claude 4, and Gemini 2.5. It ensures your prompts are comprehensive, well-structured, and produce the desired results consistently.
What You'll Learn
By the end of this lesson, you'll be able to:
- ā Understand each component of the CLEAR framework
- ā Apply the framework to write effective prompts
- ā Avoid common mistakes in prompt engineering
- ā Create structured prompts for different use cases
What is the CLEAR Framework?
CLEAR stands for:
- Context: Provide background information
- Length: Specify desired response length
- Examples: Include relevant examples
- Audience: Consider who will read the response
- Role: Define the AI's role or perspective
C - Context
Context provides the background information the AI needs to understand your request and generate appropriate responses.
Why Context Matters
- Helps the AI understand the situation
- Provides necessary background information
- Ensures responses are relevant and appropriate
- Reduces misunderstandings and irrelevant outputs
How to Provide Context
Include relevant information such as:
- What you're trying to accomplish
- Relevant background details
- Constraints or limitations
- Previous attempts or failures
- Industry or domain-specific information
Examples
Too vague, no background information
Specific details, clear purpose, target audience defined
No technical details, unclear problem
Technology stack, specific problem, data structure defined
L - Length
Length specifies how detailed or concise you want the response to be.
Why Length Matters
- Controls response verbosity
- Manages token usage and costs
- Ensures responses fit your needs
- Prevents overly long or short responses
How to Specify Length
Use specific measurements:
- Word count: "Write a 200-word summary"
- Character count: "Keep under 500 characters"
- Paragraphs: "Provide 3-4 paragraphs"
- Bullet points: "List 5 key points"
- Sentences: "Answer in 2-3 sentences"
Examples
No length specified, unclear expectations
Specific word count and topic defined
Vague length requirement
Specific sentence count and focus area
E - Examples
Examples show the AI exactly what you're looking for in terms of format, style, and content.
Why Examples Matter
- Demonstrates desired format and style
- Reduces ambiguity
- Ensures consistency
- Saves time on revisions
How to Provide Examples
Include examples that show:
- Desired format and structure
- Appropriate tone and style
- Level of detail expected
- Specific patterns or conventions
Examples
No example provided, unclear expectations
Clear example shows format, style, and structure
No format example provided
Detailed example shows structure and timing
A - Audience
Audience considers who will read or use the AI's response.
Why Audience Matters
- Determines appropriate language and tone
- Influences level of technical detail
- Affects format and structure
- Ensures accessibility and understanding
How to Consider Audience
Think about:
- Who will read this response?
- What is their technical level?
- What is their role or position?
- What do they already know?
- What do they need to know?
Examples
No audience specified, unclear level
Clear audience with defined knowledge level
No audience context provided
Specific audience with clear focus areas
R - Role
Role defines the AI's perspective, expertise, or persona.
Why Role Matters
- Sets the AI's expertise level
- Determines the approach and methodology
- Influences tone and style
- Ensures appropriate domain knowledge
How to Define Role
Specify:
- Professional role or expertise
- Experience level
- Domain knowledge
- Perspective or approach
Examples
No role specified, unclear expertise
Specific role with experience and expertise defined
No role context provided
Specific expertise with proven track record
Real-World Examples
Example 1: Technical Documentation
CLEAR Framework Applied:
Context: I'm developing a React component library for a fintech application. The components need to handle financial data securely and provide a consistent user experience.
Length: Write a 300-word documentation section
Examples:
Audience: Frontend developers with React experience who will integrate these components
Role: You are a senior frontend architect specializing in React and design systems
Complete Prompt:
Example 2: Marketing Content
CLEAR Framework Applied:
Context: We're launching a new AI-powered customer service chatbot for e-commerce businesses. It reduces support tickets by 60% and improves customer satisfaction.
Length: Create a 150-word social media post
Examples:
Audience: E-commerce business owners and marketing managers on LinkedIn
Role: You are a digital marketing expert specializing in B2B SaaS marketing
Complete Prompt:
CLEAR Framework Checklist
Before sending any prompt, ask yourself:
- Context: Have I provided enough background information?
- Length: Have I specified the desired response length?
- Examples: Have I included relevant examples if needed?
- Audience: Have I considered who will read this response?
- Role: Have I defined the AI's role or expertise?
Common CLEAR Framework Mistakes
- Missing Context: Not providing enough background information
- Vague Length: Not specifying desired response length
- No Examples: Not showing the desired format or style
- Ignoring Audience: Not considering who will use the response
- Unclear Role: Not defining the AI's expertise or perspective
Practice Exercise
Try rewriting these poor prompts using the CLEAR framework:
Original: "Write a resume"
CLEAR Version:
Self-Check
Test your understanding of the CLEAR framework:
- What does each letter in CLEAR stand for?
- Why is context important when writing prompts?
- How can you specify length in a prompt?
- When should you provide examples in your prompts?
- How does audience consideration affect prompt writing?
Summary
The CLEAR framework provides a systematic approach to writing effective prompts:
- Context ensures the AI understands your situation
- Length controls response verbosity and costs
- Examples demonstrate desired format and style
- Audience determines appropriate language and detail level
- Role sets the AI's expertise and perspective
By following this framework, you'll create more effective prompts that produce better results consistently.
Next Steps
In the next lesson, you'll learn about Practical Applications and how to apply your prompting skills to real-world scenarios.
Practice Time! Try applying the CLEAR framework to your own prompts. Start with one element at a time, then gradually incorporate all five components.
Complete This Lesson
Explore More Learning
Continue your AI learning journey with our comprehensive courses and resources.