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 ElnadiUpdated 12 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 Summary

Key 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 do business AI prompts produce unusable answers?

Business prompts need a defined decision, relevant context, a usable format, and explicit boundaries. Start by stating who will use the output and what they must do with it. Then supply the evidence and restrictions they need. Judge the response against that brief, rather than how polished it sounds.

The cited 73% improvement from OpenAI's internal research needs a traceable study and a definition of output quality before it can inform a business decision.

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 →

Which of the 6 prompt frameworks should you use for your business task?

Choose the structure around the work you need reviewed. Use CO-STAR for a complete business brief, RISEN when the order of work and boundaries matter, and RACE for a focused task. Add CREATE for creative requirements or Few-Shot for a repeated pattern. Use analytical explanations only where the conclusion needs verification.

The acronym should expose missing inputs, not add unnecessary instructions. An email reply may need only the recipient, relevant context, requested action, and tone. A campaign plan needs the objective, available budget, planning period, audience, and output structure.

When constraints conflict, resolve them before running the prompt. A request to use only supplied evidence cannot also require unsupported competitor findings. Ask for a list of missing inputs instead. Choose one primary framework, then add only the examples or constraints that serve the deliverable.

1. CO-STAR: The Universal Business Framework

Use CO-STAR when a business deliverable needs a complete brief. Work through the six elements below before drafting, especially when the person writing the prompt is not the person reviewing the output:

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 behavior
  • 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

For analytical tasks, ask for a reviewable explanation of the conclusion: relevant assumptions, calculations, evidence, and limitations. Do not treat a detailed explanation as proof that the answer is correct.

How to implement: Request checks you can inspect:

  • "List the assumptions and missing inputs that affect the recommendation"
  • "Show the calculations needed to verify the result"
  • "Separate evidence from interpretation, then summarize the recommendation"

The cited Google DeepMind research figure of 20-40% needs a source and task context before it can be used to predict results.

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

6. Few-Shot: The Pattern-Teaching Framework

Few-Shot prompting supplies examples of the desired output pattern. The product benefits below illustrate a format, not substantiated performance claims; use approved facts when drafting real copy:

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

What should you include in an AI persona?

Define the role through the decisions it must support: domain, audience, preferred approach, and communication style. Give the persona priorities that a reviewer can check, such as pipeline impact rather than vanity metrics. Use the role to guide the brief, without treating invented experience as evidence of expertise. Compare:

Without persona: "Write a marketing strategy" Illustrative persona, not a verified track record: "You are a senior B2B growth marketer who has scaled three SaaS companies from £1M to £20M ARR. You specialize in account-based marketing for enterprise buyers with 6-month sales cycles. You are skeptical 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

Which prompt guardrails should you set before using AI output?

Set guardrails for evidence, scope, format, tone, and prohibited advice before drafting. Tell the AI what to leave unresolved when information is missing, and identify who will review the result. Treat every constraint as a check to perform on the output, not as a guarantee that failures cannot occur:

Guardrail TypeExampleWhat to check
Format"Maximum 150 words per section"Length and focus
Content"Only cite sources from 2024 or later"Source dates and relevance
Tone"Never use words: synergy, leverage, paradigm"Corporate jargon
Safety"Do not provide medical or legal advice"Advice outside the approved scope
Accuracy"If uncertain, say 'I don't have enough data' rather than speculating"Unsupported assertions
Scope"Focus only on the UK market. Ignore US-specific regulations"Material outside the specified market

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

How should you specify an AI output your team can use?

Specify the structure your reviewer needs, including sections, column names, length, and examples of acceptable entries. Match that structure to the next action: comparing options, approving a draft, or checking a calculation. Ask for missing information to be marked explicitly instead of allowing empty fields to be filled with guesses. 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

Use these tool-specific examples as starting points, then check the settings and syntax in the interface you intend to use. Keep the scene brief separate from technical parameters so you can revise either without changing the creative objective. Review the generated result against the brief before approving it.

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 →

Illustrative scenario: adapt a visual brief without changing its purpose

For the noun-phrase approach described above, a draft might read: "B2B marketing planning workspace, campaign documents, soft lighting, wide composition, restrained editorial illustration." For a natural-language approach, express the same brief as sentences: "Create an editorial illustration of a B2B marketing planning workspace. Include campaign documents, soft lighting, and space for a presentation title." These are illustrative drafts, not tested output examples.

For video, extend the brief with the action and camera movement already covered in the tool sections. Decide what should happen within the shot before requesting transitions or adding style language.

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

Use our free AI Prompt Improver to restructure or clean the draft prompt using the modes below. Review the returned wording against your original brief before copying it. Keep the task, source boundaries, audience, and required output intact when comparing versions:

Step 1: Paste your raw prompt into the input field

Step 2: Select your mode:

  • Improve - Get 3 optimized 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 review the returned prompt before use

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 →

How do you test a prompt before reusing it?

Test a prompt against the deliverable you actually need. Check whether the response follows the format, uses the supplied evidence, stays within scope, and identifies missing information. Revise the instruction linked to a specific failure, then compare the revised output with the same brief. Keep the version a reviewer can use.

A repeatable review workflow

Start with a task already represented in your work: a campaign plan, an email reply, or a product-benefit rewrite. Define acceptance criteria before running it. For a plan, require a clear connection between the proposed action, the stated objective, and the evidence supplied. For a rewrite, check that the meaning and approved claims survive.

Review the first response for a named failure. If the output is vague, improve context or examples. If the structure is wrong, revise the response specification. If an assertion is unsupported, tighten the source boundary and require uncertainty to be visible. If the model lacks a required input, supply it or reduce the scope.

Compare versions using the same source material and acceptance criteria. Record the prompt, relevant settings, observed problem, and reviewer decision. Approve a reusable prompt only for the task and conditions you tested; do not assume it transfers unchanged to another tool or brief.

Illustrative scenario: prepare a campaign plan for commercial review

Use the B2B SaaS campaign in the CO-STAR table as a drafting exercise. Supply the approved objective, budget, audience, and source material. Keep the requested columns for weekly planning. Ask the AI to distinguish supplied targets from assumptions, rather than inventing performance expectations to make the table look complete.

A practical instruction is: "Draft the campaign plan using only the brief and source material provided. Keep the requested table structure. Mark any missing input needed for a recommendation. Separate proposed actions from approved commitments, and explain what evidence the reviewer should check before accepting each recommendation."

Review budget allocation against the supplied budget and planning period. Check whether each creative theme fits the stated audience and whether each KPI target came from the brief. Return unsupported targets for clarification instead of treating polished formatting as approval. This is an illustrative workflow, not a documented campaign result.

When to stop rewriting the prompt

If the response is missing facts that were never supplied, rewrite the brief or request the missing material. If a decision requires legal, compliance, or financial judgment, route the draft to the responsible reviewer. More persona detail or stricter wording does not replace that decision.

Keep a reusable prompt with its purpose, required inputs, evidence boundaries, and acceptance criteria. Recheck those conditions when the business brief or selected tool changes. The useful handoff is a prompt someone else can review and adapt, with unresolved questions still visible.

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?

▼
Choose the framework that matches the deliverable. Use CO-STAR for a complete business brief, RISEN for an ordered process with constraints, and RACE for a straightforward task. CREATE organizes a creative brief; Few-Shot supplies examples of the desired pattern. Define success before choosing. The free AI Prompt Improver at integrated.social/tools/ai-prompt-improver can restructure the prompt, but review the result against your requirements before using it.

How do I write prompts for Midjourney v7?

▼
Start with the subject, environment, lighting, composition, and style, then remove conversational filler. The guide lists --ar for aspect ratio, --v 7 for version, --style raw, and --no for exclusions. Check those parameters in the interface you use rather than assuming they apply unchanged. The example structure is [subject], [environment], [lighting], [composition], [style] --ar 16:9 --v 7. Review the generated image against the creative brief.

What are guardrails in prompt engineering?

▼
Guardrails are explicit instructions about acceptable scope, evidence, format, tone, and prohibited content. Examples include a word limit, using only provided sources, and marking missing information instead of guessing. Put them in the Narrowing section of RISEN or a dedicated Constraints block. Treat them as requirements to check in the response, not guarantees of safety or accuracy. Keep a responsible reviewer involved before using consequential output.

How do personas improve AI output quality?

▼
A persona specifies the domain, audience, priorities, and communication style you want the AI to use. Describe review criteria rather than relying on a fictional 15 years of experience. For marketing, prioritize measurable pipeline impact and the intended buyer. The cited 40-60% relevance improvement needs supporting evidence and task context; do not treat it as an expected uplift. Check whether the response follows the requested perspective.

What is Chain of Thought prompting?

▼
Chain of Thought prompting asks for step-by-step reasoning before a conclusion. For business work, request a concise explanation with assumptions, evidence, relevant calculations, and limitations that you can verify. Do not treat a detailed explanation as proof of correctness. The article cites a 20-40% improvement from Google research, but a supporting study and task context are needed before applying that figure to your own work.

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

▼
For DALL-E and GPT Image, describe the scene, composition, lighting, style, and exclusions in natural language. For Midjourney, the guide uses descriptive phrases and parameters such as --ar, --v, --style, and --no. Check compatibility with your selected interface. Use the same creative brief when comparing results, then judge the outputs against your requirements rather than assuming either tool always handles complex scenes or aesthetics better.

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?

▼
Specify the objective, audience, brand voice, deliverable, and applicable compliance requirements. Confirm placement limits, including the cited LinkedIn 3000 chars and Google Ads 90 chars examples. In RISEN, separate drafting from review: write 5 Google Ads headlines, explain each angle, and flag unsupported claims. Treat CTR above 4% as an illustrative campaign goal, not a promised result. Have the responsible reviewer check any FCA, ASA, or GDPR requirements before use.

How to engineer prompts for image generation AI?

▼
Begin with a scene brief covering the subject, environment, lighting, composition, and style. Adapt that brief to the selected tool rather than forcing every image prompt into the same syntax. The guide lists Midjourney parameters and Stable Diffusion weighting such as (element:1.3); verify support in your interface. Keep technical settings separate from the creative description. Review whether the image meets the brief, including any requested exclusions, before approving it.

How to prevent AI hallucinations with better prompts?

▼
Constrain the task to supplied evidence, require missing information to be marked, and check cited material against the original sources. Use examples to show acceptable answers and RISEN Narrowing to define scope. Step-by-step explanations are not a substitute for verification. The suggested temperature setting of 0 is not an accuracy guarantee; confirm available settings in your tool. Review factual claims before using the result in business decisions.

How to structure prompts for business strategy and reports?

▼
Use CO-STAR to specify the business context, decision, audience, and required report structure. Include the available budget, timeline, competitive information, and source material without filling gaps with assumptions. Request evidence for claims and label assumptions separately. Describe the sections and review criteria you need rather than relying only on a consulting-brand style reference. Check that recommendations address the stated decision and remain within the evidence supplied.
Evidence and source context

Sources to review alongside this analysis

These resources provide topic-level context for the article. Review the original materials for their own scope, methods and updates before applying an insight to a commercial decision.

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

Share this article

Add Integrated.Social as a preferred source on Google

Related Articles

4 articles selected for topical relevance

All articles

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

Browse all articles

Free AI Visibility Score

Free AI Visibility Score: a 0–100 readiness baseline for your own website, plus the areas to review first. No card needed. We use the website address you enter to run your score, and your email to send your code and report. Privacy policy

Further reading

Affiliate links. As an Amazon Associate I earn from qualifying purchases. Product price and availability are shown on Amazon UK.