Integrated.SocialIntegrated.Social

The Ultimate Prompt Engineering Guide: Frameworks, Personas, Guardrails and AI Tool Optimisation for 2026

Most AI users write prompts like search queries. Senior practitioners structure them like engineering specifications. This guide covers the 6 frameworks, persona design, guardrails, output formats, and tool-specific syntax that separate amateur prompts from production-grade ones.

Modi Elnadi8 min read
How to write AI prompts using CO-STAR RISEN RACE frameworks — prompt engineering guide showing how to improve ChatGPT Claude Gemini Midjourney DALL-E prompts with personas guardrails and output format specifications for better AI results
AI SummaryKey takeaways for AI answer engines
  • Structured prompts produce 73% better outputs than unstructured ones according to OpenAI research.
  • The 6 essential frameworks are CO-STAR, RISEN, RACE, CREATE, Chain of Thought, and Few-Shot — each designed for different task types.
  • Personas activate domain-specific knowledge in AI models, producing 40-60% more relevant outputs.
  • Guardrails prevent hallucinations, off-topic responses, and unsafe outputs before they happen.
  • Each AI image tool requires different syntax: Midjourney uses parameters (--ar, --v), DALL-E uses natural language, Stable Diffusion uses weighted tokens.
  • The free AI Prompt Improver at integrated.social/tools/ai-prompt-improver applies all frameworks and tool-specific cleaning automatically.
Key Numbers
6

Proven Frameworks

CO-STAR, RISEN, RACE, CREATE, CoT, Few-Shot

7

AI Tools Covered

Midjourney, DALL-E, Flux, Luma, Runway, Gemini, SD

73%

Output Quality Improvement

Structured vs unstructured prompts

0

Cost to Use

Free tool — no signup required

Why Most AI Prompts Fail (And What Senior Practitioners Do Differently)

The difference between a junior and senior AI user is not the model they use — it is how they structure their instructions. OpenAI's internal research shows that structured prompts produce 73% better outputs than unstructured ones. Yet most professionals still write prompts like Google searches: short, vague, and missing critical context.

This guide covers the complete prompt engineering methodology used by production AI teams: frameworks for structure, personas for expertise, guardrails for safety, output formats for consistency, and tool-specific syntax for image and video generation.

Try any technique instantly with our free AI Prompt Improver → [blocked]

The 6 Essential Prompt Engineering Frameworks

1. CO-STAR: The Universal Business Framework

CO-STAR is the most versatile framework for business and marketing prompts. It ensures every prompt contains the six elements that determine output quality:

ComponentPurposeExample
ContextBackground information the AI needs"You are developing a Q3 campaign for a B2B SaaS company with £200k budget"
ObjectiveWhat you want the AI to produce"Create a 90-day paid media plan with weekly spend allocation"
StyleWriting or output style"Professional, data-driven, structured as a board presentation"
ToneEmotional register"Confident but measured, avoiding hyperbole"
AudienceWho will read/use the output"CMO and CFO reviewing budget allocation"
ResponseFormat specification"Markdown table with columns: Week, Channel, Budget, KPI Target, Creative Theme"

When to use: Strategy documents, marketing plans, executive communications, content briefs, business analysis.

2. RISEN: The Complex Task Framework

RISEN excels when you need the AI to follow a multi-step process with strict boundaries:

  • Role: The expertise persona the AI should adopt
  • Instructions: The specific task to complete
  • Steps: Ordered process to follow (numbered)
  • End goal: Success criteria and deliverable format
  • Narrowing: Constraints, guardrails, and what NOT to do

When to use: Cold outreach, legal drafting, compliance content, technical documentation, anything requiring strict guardrails.

3. RACE: The Quick-Task Framework

RACE is the fastest framework for straightforward tasks:

  • Role: Who the AI should be
  • Action: What to do (one clear verb)
  • Context: Relevant background
  • Expectation: What good looks like

When to use: Email replies, social posts, quick summaries, simple rewrites.

4. CREATE: The Creative Framework

CREATE is designed for content creation and creative work:

  • Character: The voice/persona
  • Request: The creative brief
  • Examples: Reference material or style guides
  • Adjustments: Modifications to default behaviour
  • Type: Output format (blog, script, poem, ad copy)
  • Extras: Additional requirements (word count, keywords, CTAs)

When to use: Blog posts, ad copy, video scripts, social content, creative writing.

5. Chain of Thought (CoT): The Reasoning Framework

Chain of Thought forces the AI to show its working before reaching a conclusion. This dramatically improves accuracy on complex analytical tasks.

How to implement: Add one of these instructions:

  • "Think step by step before answering"
  • "Show your reasoning process, then provide your final recommendation"
  • "Break this problem into sub-problems, solve each one, then synthesise"

Google DeepMind research shows CoT improves reasoning accuracy by 20-40% on complex tasks.

When to use: Data analysis, strategic decisions, debugging, competitive analysis, financial modelling.

6. Few-Shot: The Pattern-Teaching Framework

Few-Shot prompting teaches the AI your desired output pattern through examples:

When to use: Consistent formatting, brand voice matching, data transformation, classification tasks.

Persona Design: The Most Underused Technique

A well-crafted persona activates domain-specific knowledge in the AI model. Compare:

Without persona: "Write a marketing strategy" With persona: "You are a senior B2B growth marketer who has scaled three SaaS companies from £1M to £20M ARR. You specialise in account-based marketing for enterprise buyers with 6-month sales cycles. You are sceptical of vanity metrics and only recommend tactics with measurable pipeline impact."

The persona should include:

  1. Expertise level — senior, junior, specialist, generalist
  2. Domain experience — specific industries, company sizes, markets
  3. Methodology — data-driven, creative, conservative, experimental
  4. Communication style — direct, diplomatic, technical, accessible
  5. Biases/preferences — what they prioritise, what they avoid

Guardrails: Preventing Bad Outputs Before They Happen

Guardrails are explicit constraints placed in your prompt to prevent common failure modes:

Guardrail TypeExamplePrevents
Format"Maximum 150 words per section"Rambling, unfocused output
Content"Only cite sources from 2024 or later"Outdated information
Tone"Never use words: synergy, leverage, paradigm"Corporate jargon
Safety"Do not provide medical or legal advice"Liability
Accuracy"If uncertain, say 'I don't have enough data' rather than speculating"Hallucination
Scope"Focus only on the UK market. Ignore US-specific regulations"Irrelevant content

Place guardrails in the Narrowing section (RISEN) or as a dedicated "Constraints" block at the end of any prompt.

Output Format Specification

The most common reason AI outputs disappoint is that the user never specified the format. Always include:

  • Structure: "Return as a markdown table with columns X, Y, Z"
  • Length: "Each bullet point should be 15-25 words"
  • Sections: "Include: Executive Summary (50 words), Analysis (200 words), Recommendations (3 bullets)"
  • Examples: "Format each entry like: [Company Name] — [One-sentence description] — [Relevance score 1-10]"

Cleaning Prompts for AI Image and Video Tools

Each AI generation tool has its own syntax. Here is what works for each:

Midjourney v7

  • Use descriptive noun phrases, not sentences
  • Remove: "I want", "please create", "can you make"
  • Add parameters: --ar 16:9 --v 7 --style raw --no text, watermark
  • Structure: [subject], [environment], [lighting], [composition], [style]

DALL-E / GPT Image

  • Use natural language (full sentences work well)
  • No parameters needed — describe everything in prose
  • Be specific about art style, lighting, and composition
  • Mention what you do NOT want in the description

Luma AI (Video)

  • Structure: [scene description] + [camera motion] + [style/mood]
  • Specify duration and transitions
  • Include lighting and atmosphere details

Runway Gen-4 (Video)

  • Structure: [subject] + [action/motion] + [camera movement] + [style]
  • Keep prompts concise (under 100 words)
  • Specify shot type: close-up, wide, tracking, aerial

Stable Diffusion

  • Use weighted tokens: (important element:1.3)
  • Separate with commas, most important first
  • Always include a negative prompt
  • Specify: steps, CFG scale, sampler in generation settings

Clean any prompt for any tool instantly → [blocked]

The Complete Prompt Engineering Checklist

Before submitting any important prompt, verify:

  1. Framework applied — Is the prompt structured (CO-STAR, RISEN, RACE, CREATE)?
  2. Persona defined — Does the AI know WHO it is and what expertise to use?
  3. Context provided — Does the AI have all background information needed?
  4. Output format specified — Will you get the structure you need?
  5. Guardrails set — Are constraints and "do nots" explicit?
  6. Examples included — Have you shown what good looks like (Few-Shot)?
  7. Success criteria defined — How will you know if the output is good?
  8. Tool-specific syntax — Are parameters correct for your target tool?

How to Use the Free AI Prompt Improver

Our free AI Prompt Improver [blocked] automates everything in this guide:

Step 1: Paste your raw prompt into the input field

Step 2: Select your mode:

  • Improve — Get 3 optimised versions with quality scoring
  • Apply Framework — Choose CO-STAR, RISEN, RACE, CREATE, Chain of Thought, or Few-Shot
  • Clean for AI Tool — Select Midjourney, DALL-E, Flux, Luma, Runway, Gemini, or Stable Diffusion

Step 3: Click "Improve My Prompt" and get production-ready output in seconds

Step 4: Copy the result with one click and paste directly into your AI tool

No signup required. No usage limits. No data stored.

Open the AI Prompt Improver now → [blocked]

What Separates Good Prompts from Great Ones

The difference is not length — it is precision. A great prompt:

  • Eliminates ambiguity (the AI cannot misinterpret the request)
  • Specifies the expertise lens (persona activates relevant knowledge)
  • Defines boundaries (guardrails prevent failure modes)
  • Shows the target (output format removes guesswork)
  • Provides context proportional to complexity (simple tasks need less, complex tasks need more)

Master these principles and every AI tool — from ChatGPT to Midjourney to autonomous agents — will produce dramatically better results.

See what a fully autonomous AI agent can do with well-structured prompts. Try Manus free →

Frequently Asked Questions

What is the best prompt engineering framework?

The best framework depends on your use case. CO-STAR (Context, Objective, Style, Tone, Audience, Response) is the most versatile for business prompts. RISEN (Role, Instructions, Steps, End goal, Narrowing) excels at complex multi-step tasks with guardrails. RACE (Role, Action, Context, Expectation) is fastest for simple tasks. Use our free AI Prompt Improver at integrated.social/tools/ai-prompt-improver to apply any framework instantly.

How do I write prompts for Midjourney v7?

Midjourney v7 prompts should be descriptive noun phrases without conversational language. Remove filler words like 'I want' or 'please create'. Add parameters: --ar for aspect ratio, --v 7 for version, --style raw for photorealism, --no for negative elements. Structure: [subject], [environment], [lighting], [composition], [style] --ar 16:9 --v 7. Our free tool cleans any prompt for Midjourney automatically.

What are guardrails in prompt engineering?

Guardrails are explicit constraints that prevent the AI from producing unwanted outputs. They include: format restrictions (max word count, bullet points only), content boundaries (no speculation, cite sources only), tone constraints (no buzzwords, peer-to-peer language), and safety limits (no medical advice, no legal recommendations). Place guardrails in the Narrowing section of RISEN or as explicit 'Do NOT' instructions.

How do personas improve AI output quality?

Personas give the AI a specific expertise lens and communication style. Instead of 'write a marketing email', use 'You are a senior B2B SaaS growth marketer with 15 years of experience targeting enterprise CTOs. Write a cold email...' Research shows persona-based prompts produce 40-60% more relevant outputs because they activate domain-specific knowledge patterns in the model.

What is Chain of Thought prompting?

Chain of Thought (CoT) prompting instructs the AI to show its reasoning step by step before giving a final answer. Add 'Think step by step' or 'Show your reasoning process' to any prompt. This dramatically improves accuracy on complex tasks like math, logic, strategy, and multi-factor analysis. Google research shows CoT improves accuracy by 20-40% on reasoning tasks.

How do I optimise prompts for DALL-E vs Midjourney?

DALL-E and GPT Image use natural language descriptions without parameters. Focus on detailed scene descriptions, art style references, and composition notes. Midjourney uses keyword-dense prompts with technical parameters (--ar, --v, --style, --no). DALL-E handles complex scenes better; Midjourney produces more aesthetically refined images. Use our free AI Prompt Improver to automatically clean prompts for either tool.

Is there a free prompt engineering tool?

Yes. The AI Prompt Improver at integrated.social/tools/ai-prompt-improver is completely free with no signup required. It offers three modes: (1) Improve mode gives you 3 optimised versions of any prompt, (2) Framework mode restructures your prompt using CO-STAR, RISEN, RACE, CREATE, Chain of Thought, or Few-Shot, (3) Clean for AI Tool mode optimises prompts specifically for Midjourney, DALL-E, Flux, Luma AI, Runway, Gemini, or Stable Diffusion.

How to write a prompt for ChatGPT that gets the best results?

Start with a clear role (You are a...), provide specific context about your situation, state exactly what you want produced, specify the format (bullet points, table, essay), set constraints (word count, tone, audience), and add guardrails (what NOT to include). Use the CO-STAR framework: Context, Objective, Style, Tone, Audience, Response format. Our free tool at integrated.social/tools/ai-prompt-improver applies this structure automatically.

How to use AI prompts for marketing?

For marketing prompts, always specify: (1) the campaign objective (awareness, leads, conversions), (2) target audience demographics and psychographics, (3) brand voice guidelines, (4) channel constraints (LinkedIn 3000 chars, Google Ads 90 chars), (5) compliance requirements (FCA, ASA, GDPR). Use the RISEN framework with marketing-specific guardrails. Example: Role: senior performance marketer. Instructions: write 5 Google Ads headlines. Steps: research competitor angles, draft variations, score each. End goal: CTR above 4%. Narrowing: no superlatives, no unverified claims.

How to engineer prompts for image generation AI?

Image AI prompts require a completely different structure from text AI. Remove all conversational language (I want, please make, can you). Use descriptive noun phrases separated by commas. Place the most important elements first. Add tool-specific parameters: Midjourney uses --ar, --v, --style, --no; Stable Diffusion uses weighted tokens like (element:1.3) and negative prompts. Always specify: subject, environment, lighting, composition, art style, and technical quality keywords. Use our free Clean for AI Tool mode to convert any description into production-ready syntax.

How to prevent AI hallucinations with better prompts?

Reduce hallucinations by: (1) adding explicit guardrails like If you are unsure, say I dont know rather than guessing, (2) requiring citations with Only reference information from the provided context, (3) using Chain of Thought to force step-by-step reasoning, (4) narrowing scope to prevent the model from extrapolating, (5) providing few-shot examples of correct answers, (6) setting temperature to 0 for factual tasks. The RISEN framework Narrowing component is specifically designed for this.

How to structure prompts for business strategy and reports?

For business strategy prompts, use CO-STAR with these specifics: Context should include company size, industry, budget, timeline, and competitive position. Objective should state the deliverable format (board deck, one-pager, full report). Style should reference a known standard (McKinsey-style, Gartner format). Tone should match the audience seniority. Always add: Include data sources for every claim and Flag assumptions separately from evidence. This prevents generic outputs and forces actionable, evidence-based recommendations.
About the Author

Modi Elnadi

Founder & Director of Marketing and AI Growth · Integrated.Social

MBA, University of Surrey (Honors) · London, UK · Founded 2014

Modi Elnadi is the founder of Integrated.Social, a boutique B2B, B2B2C, and B2C growth marketing agency established in London in 2014. With 16+ years deploying revenue-generating marketing systems across B2B SaaS, FinTech, Ecommerce, Sports Media, FMCG, Telecoms, and Travel & Tourism, Modi specializes in Agentic AI lead generation, AI Search Optimization (SEO/AEO/GEO/LLMO), and PPC & Performance Max. He has managed $25M+ in paid media, delivered 5x–35x ROAS, and built multi-agent AI systems that generate pipeline daily at scale. Every engagement is consultative, data-driven, and ROI-accountable.

Sectors

B2B SaaSFinTechEcommerceSports MediaFMCGTelecomsTravel & TourismCybersecurityEnterprise AI

Expertise

Agentic AI SystemsGTM StrategyAI Search (SEO/AEO/GEO/LLMO)PPC & Performance MaxDemand GenerationAccount-Based Marketing (ABM)B2B MarketingB2B2C MarketingB2C MarketingPerformance MarketingContent StrategyLLMs & Prompt EngineeringCRM & RevOpsBrand PositioningPersona-Driven CampaignsA/B Testing & CRO

Ready to deploy a lead generation system?

We deploy agentic AI systems for B2B marketing and sales teams, live infrastructure that generates leads daily, not strategy decks. Get a free AI growth audit.

Share this article

86 shares
Add Integrated.Social as a preferred source on Google

Keep Reading

4 articles selected based on what you just read

All articles

Explore 100+ AI marketing insights from the Integrated.Social editorial team

Browse all articles

Handpicked by our team. We may earn a small commission at no extra cost to you.

As an Amazon Associate, Integrated.Social earns from qualifying purchases.