Series Title: Mastering Instruction Agents with the CLEAR Framework


Introduction

Instruction agents – AI systems that follow detailed, structured prompts to perform tasks – are rapidly transforming how individuals and organisations scale intelligence, automate workflows, and unlock value across departments. Yet, the quality of these agents is only as strong as the framework behind them. Enter CLEAR: a methodology designed to optimise agent performance through Context, Logic, Examples, Action, and Refinement.

This post dives deep into the CLEAR Framework, providing a blueprint for designing your first effective instruction agent.



1. What Is the CLEAR Framework?

CLEAR is an acronym developed by Optimizely to guide the creation of highly functional instruction agents:

  • C – Context
  • L – Logic
  • E – Examples
  • A – Action
  • R – Refinement

Each element contributes to reducing ambiguity, enhancing reliability, and increasing output quality.


2. Why CLEAR Matters

The majority of prompt failures happen due to under-specification or overgeneralisation. CLEAR addresses this by:

  • Providing strong task framing
  • Enabling predictable responses
  • Supporting agent reusability
  • Driving human-like outputs at scale

Think of CLEAR as a quality assurance model for prompt-based systems.


3. Breaking Down Each Component

C – Context

Context aligns the agent with the “who”, “what”, and “why”. The agent must understand the intended audience, tone, format, and domain.

Example:

You are a customer success agent for a B2B SaaS company writing a post-onboarding email.

Good context prevents hallucinations and misinterpretations.

Tips:

  • Add job roles, tone, medium, and audience personas.
  • Be explicit about what not to include.

L – Logic

Logic is where you outline the mental model and rules for how the agent should think or reason. This includes frameworks, constraints, ordering, and strategic choices.

Example:

Use the AIDA (Attention, Interest, Desire, Action) framework to structure your copy.

Tips:

  • Use internal frameworks like your content pillar strategy or tone-of-voice guide.
  • Clarify priorities: e.g. “Prioritise brevity over creativity.”

E – Examples

Few-shot learning is one of the most powerful tools in prompting. Showing the agent what good looks like increases its accuracy dramatically.

Example:

Prompt: Write a LinkedIn post about sustainability
Example: “At [company], sustainability isn’t just a buzzword – it’s core to how we innovate…”

Tips:

  • Include one excellent example for quality.
  • Include a poor example to set guardrails (if needed).

A – Action

What should the agent do? Use verbs that specify output format and structure, not just task type.

Weak:

Write a summary.

CLEAR Action:

Create a 3-bullet executive summary (maximum 50 words) in plain British English for a CMO.

Tips:

  • Be precise: Format, length, sections, even voice.
  • Think like a UX designer for outputs.

R – Refinement

Don’t stop after version one. Build recursive instruction chains and feedback loops into your agent.

Example:

After producing output, review for tone consistency and clarity using the Hemingway method.

Tips:

  • Add a “quality check” instruction to reduce rework.
  • Let the agent self-assess against a checklist.

4. CLEAR in Practice: Building a Sample Agent

Use Case: Drafting follow-up emails after a sales call.

CLEAR Agent Prompt:

(C) You are a B2B sales assistant at a cybersecurity firm. You’re writing follow-up emails to prospects after demo calls, with a formal yet friendly tone. Audience is mid-senior tech decision makers.

(L) Follow this flow: Thank them → Reiterate value → Add personalised content from the call → Link to resources → Include clear CTA. Prioritise brevity.

(E) Example:
“Hi Sarah, Thanks for joining today’s call. It was great to explore how our platform could support your Zero Trust goals. Attached is the datasheet we discussed…”

(A) Write a 4-sentence email in this format.

(R) Review for correct company name, tone match, and maximum 120-word limit. Use British English.

5. Best Practices When Using CLEAR

  • Write CLEAR agents collaboratively across teams (e.g. marketing + AI team).
  • Store them in a library with versioning and tagging.
  • Use pre-flight checklists to ensure the prompt includes all five parts.

6. Pitfalls to Avoid

  • Too much context: Overloads the model.
  • No logic: Leaves outputs generic.
  • Unclear actions: Produces surprising or unusable results.
  • No refinement: Leads to inconsistencies and hallucinations.

Conclusion: Lay the Groundwork with CLEAR

Mastering the CLEAR framework is the first step to building agents that are not only usable but exceptional. In Part 2, we’ll take this further by showing how to operationalise CLEAR into reusable templates and integrate it into workflows.


Coming Next in the Series

Part 2: Building Reusable Templates with CLEAR
Part 3: Scaling Instruction Agents Across the Organisation



Leave a Reply

Your email address will not be published. Required fields are marked *