The complete guide to prompt engineering frameworks

Joe Huffnagle
VP Solution Engineering & Delivery
Parloa
Home > knowledge-hub > Article
August 6, 202512 mins

Updated September 11, 2026

There is a concept in chaos theory called the "initial conditions" problem: the smallest variation in a system's starting state can produce drastically different outcomes. The famous illustration is a butterfly flapping its wings in Brazil and a tornado forming in Texas weeks later.

Prompt engineering frameworks work on the same principle. One sentence in a prompt decides whether an AI agent asks for an order number first or lets the customer explain the delay first, and that single choice can end the call in a resolution or in the caller asking for a human. Small edits can make big differences in what a large language model (LLM) does, and many teams still manage those edits by intuition rather than structure.

Prompt engineering frameworks replace that guesswork with a repeatable method for building prompts. As system performance hinges on prompt structure, prompts stop being peripheral and become the initial conditions the whole interaction depends on.

What is prompt engineering, and why does it matter?

Prompt engineering is the practice of drafting the instructions and context that steer how an LLM reasons, formats, and prioritizes information. When a model "hallucinates" or produces a vague answer, a weak prompt is often the root cause. Prompt engineering lets developers, product teams, and AI designers assign a model a clear role, constraints, tone, and expected output structure.

Well-engineered prompts:

  • Reduce ambiguity

  • Guide the model's reasoning path

  • Mitigate harmful or biased outputs

  • Improve consistency and reliability across repeated use

Just as good UI makes software usable, good prompts make LLMs practical. The value compounds when you pair prompting with a framework, because that's where consistency, safety, and cross-team scalability come from.

The evolution and importance of prompt frameworks

In the early days of prompt engineering, development was more craft than science. Most teams relied on intuition: write a few variations, tweak the wording, and test outputs until something worked. That approach doesn't scale. It's inefficient across teams, hard to trace, and not repeatable; what worked yesterday can fail tomorrow. Frameworks solve this by giving prompts structure:

  • A naming convention and schema for each part of a prompt

  • A shared vocabulary so cross-functional teams can collaborate

  • Tooling support for templates, versioning, and linting

  • Evaluation alignment by defining what "good output" means for a given task

Without a framework, every prompt is bespoke. With one, prompt engineering becomes a structured discipline instead of a habit that lives in one person's head.

Download the guide: Agentic AI made easy

What are prompt engineering frameworks?

Prompt engineering frameworks are structured methods for building prompts that give each element, including background, goal, tone, constraints, and format, a named slot, so LLM behavior stays consistent and measurable across use cases.

They can be domain-specific (customer service, legal) or use-case-specific (summarization, classification); some are simple few-shot templates, and others are complex, multi-layered systems that integrate human feedback and evaluation metrics. They exist to make AI models work reliably inside business workflows, regulatory requirements, and multilingual deployments.

The anatomy of a prompt engineering framework

Every framework assembles the same core components, each with a defined job:

  • Role assignment: Anchors the model in a persona: support agent, claims handler, billing specialist, and narrows the knowledge domain it draws on.

  • Context injection: Feeds the model relevant background: conversation history, past complaints, account metadata, product details. The quality of this grounding drives output relevance.

  • Task clarity: "Respond politely" fails. "Write a two-sentence apology that references the customer's previous delayed delivery" works.

  • Output structure: Names the format: JSON, plain text, markdown, or numbered steps, so downstream systems and human agents can use the result.

  • Guardrails and constraints: Ban specific terms, require disclaimers, hold temperature low for factual tasks, and define an escalation rule for uncertain cases.

The system prompt carries those five components; it's the standing instruction the model receives on every turn. The user turn carries the caller's words and whatever the system retrieved for that step.

12 prompt engineering frameworks worth knowing

Below are the twelve frameworks worth having in your toolkit, arranged from the most structured customer-facing formats to the lightweight patterns that fit quick internal work. Each solves a slightly different problem, and the differences between them matter more than the acronyms.

1. The COSTAR framework

Context, Objective, Style, Tone, Audience, Response (COSTAR) is one of the most structured and adaptable prompt engineering frameworks in use today. Data scientist Sheila Teo developed it, and it became widely known after she won Singapore's first GPT-4 Prompt Engineering competition.

  • Context: The customer's history and situation.

  • Objective: The specific goal the reply must accomplish.

  • Style: Structural formatting like paragraphs, bullets, or length.

  • Tone: The emotional register, from formal to conversational.

  • Audience: Who's on the receiving end and what they need.

  • Response: The concrete output shape and required elements.

The six fields make COSTAR the strongest fit for customer-facing replies where tone, audience, and format all matter at once. Swap the values, and the same template handles a billing dispute, a password reset, or a delayed-delivery apology.

2. RTF framework

Role, Task, Format (RTF) is a three-field framework with no ceremony, like “ou are a billing specialist. Explain in three sentences why this invoice shows two charges.” It's the fastest framework to write and the easiest to teach to a non-technical team.

  • Role: Who the model is acting as.

  • Task: What it needs to do.

  • Format: What the output should look like.

RTF works well for internal tools, developer utilities, and short-form generation where tone and audience are already implicit. When a reply needs a specified tone, a named audience, or an explicit compliance limit, RTF runs out of slots, and that's the signal to move to COSTAR or CRAFT.

3. CRAFT framework

Context, Role, Action, Format, and Constraints (CRAFT) gives constraints their own dedicated field. Some versions swap Constraints for Tone, but the Constraints slot makes CRAFT useful in regulated replies, where a support agent's language carries real legal weight.

  • Context: The situation the reply sits inside.

  • Role: The persona the model adopts.

  • Action: What the model must produce.

  • Format: The output structure.

  • Constraints: Explicit hard limits, like never state a coverage decision; refer policy questions to a licensed advisor.

By separating "what the model can do" from "what the model cannot do," CRAFT reduces the risk that a well-meaning response drifts into territory that legal, compliance, or clinical review teams have ruled off-limits.

4. RISEN framework

Role, Instructions, Steps, End goal, and Narrowing (RISEN) is built for sequenced tasks. It lays out the sequence in Steps, defines what "done" means in End goal, and excludes what the model must not attempt in Narrowing.

  • Role: The persona running the task.

  • Instructions: The overall directive.

  • Steps: The ordered sequence to follow.

  • End goal: The condition that signals completion.

  • Narrowing: What to ignore, deprioritize, or hand off.

A troubleshooting agent that checks connectivity, then firmware, then account status before offering a replacement is, in practice, a RISEN prompt. Teams tend to adopt RISEN when a single task has an obvious start, a clear finish, and enough conditional logic in between that a freeform prompt would lose track.

5. CRISPE framework

Capacity/role, Insight, Statement, Personality, Experiment (CRISPE) originated in a widely circulated community prompt list. Its value is a dual mindset that balances structured analytical thinking with exploratory experimentation.

  • Capacity/role: Sets the model's expertise, like expert analyst.

  • Insight: Surfaces the core idea driving the response.

  • Statement: Frames the specific output requested.

  • Personality: Adds tone and voice control.

  • Experiment: Leaves room to iterate on variants.

CRISPE is popular for teams running live tests or building AI that has to match a specific brand voice.

6. Before-after-bridge (BAB)

The BAB framework comes from classic copywriting, not AI research, but it's effective in customer service and sales contexts precisely because it's emotionally structured rather than fact-first.

  • Before: Establish the customer's pain point or situation.

  • After: Paint the desired resolution or state.

  • Bridge: Explain how to get from one to the other.

In complaint resolution, BAB lets an AI agent acknowledge frustration, offer a vision of improvement, and walk the customer through next steps without sounding robotic. It maps cleanly to sales conversations too, where the "bridge" becomes a product or upgrade path.

7. Tree of thought (ToT)

Tree of thought is a high-rigor framework for multi-step reasoning. Unlike chain-of-thought prompting, which walks a single linear path, ToT builds a decision tree of options at each step. Researchers Yao et al. showed the difference is not cosmetic: on the Game of 24 task, GPT-4 with chain-of-thought solved about 4% of problems, while Tree of Thoughts reached 74%.

  • Branch: Generate multiple candidate reasoning paths.

  • Explore: Expand each branch recursively.

  • Rank and prune: Score paths and drop the weak ones.

A ToT prompt for a product bug might branch across "was the input correct," "could this be a caching issue," and "what else has failed" before ranking the options. Reasoning models handle this internally, so use the model's native reasoning-effort setting when applicable.

8. RACE framework

Role, Action, Context, Expectation (RACE) is a minimal, agile-friendly framework for fast deployments, less prescriptive than COSTAR or RISEN but quick to implement in high-volume environments.

  • Role: Define an expert persona, like “You are a product specialist.”

  • Action: Name the task, like “Diagnose the issue.”

  • Context: Provide grounding, like “The customer is using version 3.2.”

  • Expectation: Set the output target, like “Explain the resolution and list next steps.”

RACE is popular for training internal agents or generating templated responses at scale. Teams often start with RACE for the first pass at standardizing a workflow, then upgrade individual prompts to COSTAR or CRAFT once a specific use case needs tighter tone control or explicit compliance limits.

9. Five S model

The Five S model was originally designed for educational prompts and has proven useful for enterprise teams too. What sets it apart is its focus on teachability: each prompt becomes a chance to refine the team's shared understanding of what "good output" looks like.

  • Set the scene: Establish the situation and stakes.

  • Be Specific: Name the exact task and constraints.

  • Simplify language: Strip jargon and ambiguity.

  • Structure output: Define the response format up front.

  • Share feedback: Capture what worked and what didn't.

It's particularly good for training new team members and improving prompt literacy across non-technical staff. The "share feedback" step formalizes the retro habit that most prompt teams do informally.

10. Agile prompt engineering

Agile prompt engineering borrows directly from agile software practices. Instead of building a massive prompt library upfront, it treats prompts as a product that ships in increments and improves against live metrics.

  • Start simple: Ship the smallest useful prompt first.

  • Iterate quickly: Revise based on real conversations.

  • Involve stakeholders: Bring in ops, compliance, and CX.

  • Optimize on metrics: Track customer satisfaction (CSAT), containment, and escalation rate.

  • Tiered deployment: Roll out basic features before advanced ones.

For customer service teams, this means rolling out AI assistance in phases, starting with FAQs, then scripted flows, then real-time dialog support. It's less a template than an operating model, which is why it pairs well with any of the field-based frameworks above.

11. APE (Action, Purpose, Expectation)

APE is a lightweight framework for short, single-outcome tasks, faster to write than RACE or RTF for one-off internal work like summarize this ticket, so a supervisor can triage it quickly, in three bullet points or fewer.

  • Action: What the model should do.

  • Purpose: Why the task matters.

  • Expectation: What a correct output looks like.

The Purpose field pays off in practice, because stating the "why" tends to produce a more usable answer. Step APE up to a fuller framework the moment the output starts reaching customers.

12. Few-shot and zero-shot prompting

Few-shot and zero-shot aren't frameworks in the traditional sense, but they're the foundational strategies every framework above builds on. The technique traces back to Brown et al.'s 2020 paper on GPT-3, which showed that giving a model a handful of task examples lets it adapt at inference time without any weight updates.

  • Zero-shot: Supply only an instruction, no examples.

  • Few-shot: Add example input/output pairs to anchor format and tone.

In customer service, zero-shot prompts handle common queries like "What's my delivery status?" well, while few-shot prompts shine on edge cases like explaining product differences or refund policies. Most production prompts combine a field-based framework with a few well-chosen examples.

Framework comparison at a glance

With all twelve frameworks on the table, it helps to see them side by side. The table below compares them plus the three reasoning techniques most relevant to contact center deployments. The "Best for" column reflects contact center use, not a general-purpose ranking.

Framework

Components

Best for

COSTAR

Context, Objective, Style, Tone, Audience, Response

Customer-facing replies needing tight tone and format control

RTF

Role, Task, Format

Fast starter prompts and internal tooling

CRAFT

Context, Role, Action, Format, Constraints

Compliance-heavy replies with explicit limits

RISEN

Role, Instructions, Steps, End goal, Narrowing

Multi-step procedures with a defined finish

CRISPE

Capacity/Role, Insight, Statement, Personality, Experiment

Variant testing and brand-personality work

BAB

Before, After, Bridge

Complaint resolution and sales conversations

Tree of thought

Branching reasoning paths, ranked and pruned

High-stakes troubleshooting and regulated decisions

RACE

Role, Action, Context, Expectation

Training human agents and producing templated responses at scale

Five S

Set the scene, be Specific, Simplify language, Structure output, Share feedback

Training non-technical teams

Agile prompt engineering

Tiered deployment with cross-functional review and metric-based evaluation

Phased rollout across use cases

APE

Action, Purpose, Expectation (some sources: Action, Parameter, Example)

Short operational tasks with one outcome

Few-shot and zero-shot

Instruction only, or instruction plus example input/output pairs

Foundational strategy layered under any framework above

Chain-of-thought (technique)

Intermediate reasoning steps before the final answer

Multi-step logic on non-reasoning models

ReAct (technique)

Interleaved reasoning and tool calls

Live account lookups and agentic tool use

A note on APE: sources disagree on what the letters stand for. PromptQuorum-style guides define it as Action, Parameter, Example; most others use Action, Purpose, Expectation. Both variants describe the same lightweight, single-outcome structure.

Reasoning and agentic prompting techniques

The frameworks above shape a single response. Reasoning and agentic techniques govern work across steps and calls to external systems, and increasingly, they're what separates a scripted assistant from an AI agent that can actually resolve something.

  • Chain-of-thought and self-consistency: Ask the model to write out intermediate reasoning steps, then sample several paths and pick the most consistent answer. Useful for high-stakes CX decisions like refund eligibility or escalation routing.

  • ReAct: Interleave reasoning traces with tool calls, so the model can pull an order lookup mid-conversation and reason over the result. The dominant pattern behind production agentic AI.

  • Prompt chaining: Split a task into subtasks with their own prompts (verify identity, retrieve account, resolve issue, log outcome), so failures are easier to locate than in a monolithic prompt.

  • Structured outputs: Constrain the response to a JSON schema so a CRM can consume it directly. Gemini's guidance is that structured outputs format the final response, while function calling takes actions during the conversation.

  • Meta-prompting: Use one model to write or refine another model's prompt. Stanford's DSPy treats prompts as programmatic objects, shifting prompt writing from craft to pipeline.

  • Multimodal prompting: Apply the same field structure when the input includes an image or audio clip, specifying how each input type contributes to the final output.

Reasoning models increasingly handle chain-of-thought and tree-of-thought behavior natively, so any technique here should be layered in only when the model class calls for it.

Which prompt engineering framework should you use?

No single framework wins across every use case. The right choice depends on how much structure the reply needs, whether tone and compliance matter, and whether the task is a single response or a multi-step procedure. The decision table below maps common contact center jobs to the framework that fits them best.

If you need to...

Reach for

Why

Get a working prompt in one line

RTF

No wasted fields, fastest to write and teach

Control tone and format tightly for a customer-facing reply

COSTAR

Six fields cover context, goal, style, tone, audience, and output

Enforce a compliance limit explicitly

CRAFT

Constraints get a dedicated field instead of living in prose

Walk through a multi-step procedure with a clear finish line

RISEN

Steps and End goal keep a sequence from drifting

Test tone and brand-personality variants

CRISPE

Built for iteration, not a single final answer

Train human agents on templated responses at scale

RACE

Minimal structure, fast to standardize

Handle a complaint or sales conversation with empathy

BAB

Emotionally sequenced rather than fact-first

Teach non-technical staff to write better prompts

Five S

Built around teachability and shared feedback

Roll out AI assistance in phases across a team

Agile prompt engineering

Tiered deployment with metric-based review

Solve a problem that requires exploring multiple paths

Tree of thought

Branches and ranks options instead of committing to one

Let an agent call a tool mid-conversation

ReAct

Interleaves reasoning with live actions

Add chain-of-thought or self-consistency when the task needs visible reasoning on a non-reasoning model, and drop them in favor of the model's native reasoning setting when it's a reasoning model.

6 best practices for prompt engineering frameworks

Frameworks fail when they rest on one-off decisions and informal habits. Gartner reports that 91% of customer service and support leaders are under executive pressure to implement AI, which pushes prompts into live calls faster than one-off reviews can keep up. The six practices below keep systems reliable as they scale, regardless of which framework a team standardizes on.

  1. Be specific. Define the output length, tone, required fields and the actions the model should take. Vague instructions like "respond politely" fail across every framework in this guide.

  2. Use feedback loops. Decide the metric before launch, whether CSAT, containment, or escalation rate, then monitor outputs against it and revise on evidence of errors, omissions, or customer confusion.

  3. Implement version control. Treat prompts like code: repositories, commit messages, and changelogs. DSPy takes this further by compiling declarative prompt calls into pipelines that tune themselves against a defined metric.

  4. Establish review workflows. No prompt reaches production without peer review, automated linting, and red teaming. OWASP ranks prompt injection as LLM01:2025, the top risk in its generative AI risk list.

  5. Use safe defaults. If a system fails silently or produces uncertain output, define the fallback in the prompt: if you cannot verify the account, route to a human agent with the conversation summary attached.

  6. Tune parameters by use case. Adjust temperature, top-p, and frequency penalties based on the task. For reasoning models, use the model's reasoning-effort or thinking-level setting instead of step-by-step prompting.

These practices hold the line on today's frameworks, but the ground underneath them is shifting fast. Model capabilities, vendor guidance, and evaluation tooling are all moving quickly enough that a best practice from last year can quietly turn into an anti-pattern this year, which is why the next section looks at where prompt engineering is heading.

Emerging trends in prompt engineering for 2026 and beyond

Prompt engineering isn't standing still. As models get more capable, the discipline is shifting from one-off inputs to systems thinking. Five developments matter most heading into the rest of 2026.

Automatic prompt optimization is replacing manual tuning

Stanford's DSPy compiles prompts and demonstrations into pipelines that optimize against a defined metric instead of being hand-edited. Stanford's MIPRO work has shown optimizers outperforming hand-tuned baselines by double digits on multi-stage language model programs. Prompt tuning is becoming something a system does continuously, not a task a person revisits once a quarter.

Vendor guidance is diverging by model type

OpenAI's prompting guidance for its reasoning models states they "perform best with straightforward prompts," and that step-by-step instructions may not help. Google's Gemini guidance points teams toward the thinking_level parameter instead of hand-written chain-of-thought. A technique that's correct for one model family can be actively counterproductive on another, so any prompt framework template now needs a note on which model class it assumes.

LLM-as-judge evaluation is becoming standard

Enterprise teams increasingly use one model to score another model's output against a rubric, and Anthropic's evaluation guidance recommends a Likert-scale judge for nuanced qualities like empathy and professionalism in customer service. This pairs with, rather than replaces, human review.

Prompt auditing is becoming a compliance surface

As LLMs touch more sensitive workflows, prompts stop being a UX detail and become part of the risk surface. NIST's Generative AI Profile formally defines "confabulation" as the production of confidently stated but erroneous content, giving compliance teams a standard term for what customer-facing teams have been calling hallucination.

Agentic orchestration is pulling prompt design into a bigger system

The Model Context Protocol standardizes how LLM applications connect to external tools and data sources, and both OpenAI's and Anthropic's agent tooling now build on it. Prompt frameworks increasingly have to account for tool descriptions and multi-agent handoffs, not just a single instruction block.

How Parloa validates prompts before they hit production

A prompt framework that looks clean on paper still has to survive interrupted speech, emotional tone shifts, varied phrasing, and regional accents once a live caller picks up the phone. Parloa's AI Agent Management Platform puts every prompt through a validation loop against synthetic conversations across scenarios and 140+ languages before an AI agent ever takes a live call.

  • Simulation and testing: Runs prompts against synthetic edge-case conversations, covering the answer, the fallback, the business rule, and the escalation path.

  • Prompt health checks with Parloa Navigator: Identifies contradictions and redundancies, traces misbehavior to its root cause, and offers line-level fixes a builder can accept or reject.

  • Production observability with Parloa Lens: Tracks containment, drop-off, and tool call error rates across every conversation, so teams can see whether the same failure recurs at scale.

  • LLM-as-judge scoring: Uses one model to score another's output against a rubric, paired with human review for nuanced qualities.

These layers form the foundation of a prompt framework that holds up under real call volume, not just in a test harness.

Turn prompt engineering frameworks into governed production practice

The moment an AI agent takes a live call, a prompt stops being a template and becomes production configuration. It needs the same version control, repeatable testing, and continuous monitoring you'd expect from any other piece of production infrastructure, because as models get more capable, the cost of a poorly structured prompt rises with them.

Parloa manages the AI agent lifecycle end to end, from briefing an AI agent in natural language, through simulation and testing, to continuous monitoring and optimization once it's live, with Parloa Lens and Parloa Navigator layered on top for always-on observability and root-cause diagnosis.

Curious how your prompt frameworks would hold up under edge-case conversations? Book a demo and see it in action.

Get in touch with our team

FAQs about prompt engineering frameworks

What is the COSTAR framework in prompt engineering?

COSTAR is a six-field prompt framework covering Context, Objective, Style, Tone, Audience, and Response, developed by data scientist Sheila Teo. Teams reach for it on customer-facing replies where both tone and output format need tight control, since it forces you to define who the response is for and how it should be structured before you write a word of the actual reply.

RTF vs. CRISPE vs. COSTAR: Which should I use?

RTF (Role, Task, Format) is the fastest to write and best for simple internal tasks. CRISPE is built for iterating on tone and brand personality across multiple draft variants. COSTAR is the most complete of the three for customer-facing work, since it's the only one with a dedicated Audience field. Start with RTF, move to COSTAR when tone matters, and use CRISPE when you're testing several personality variants at once.

Is prompt engineering dead now that context engineering exists?

No. Context engineering treats prompt engineering as one of its components: the prompt still governs the instruction the model receives, while context engineering adds retrieval, tool results, and conversation state around it. With reasoning models, prompt wording matters less than it used to for giving clear instructions, but the underlying skill hasn't disappeared. It's been absorbed into a larger discipline.

How is prompt engineering different from fine-tuning?

Prompt engineering changes the instructions and context sent to a model at runtime, with no retraining involved, and changes take effect immediately. Fine-tuning changes the model's underlying weights through additional training, which takes longer, costs more, and is harder to reverse. Most enterprise teams reach for prompt engineering first, and only consider fine-tuning when a prompt-based approach genuinely can't achieve the accuracy or consistency the task requires.