Prompt framework

On this page 7

A prompt framework is a named, reusable structure that specifies which components a prompt should contain and in what order, such as the role of the model, the task, the relevant context, the constraints and the expected output format. In prompting, frameworks serve as checklists for prompt authors: they reduce the chance that an instruction omits information the model needs to produce a useful answer.

Most prompt frameworks are expressed as mnemonic acronyms, for example RTF, RISEN or CO-STAR, with each letter standing for one component. They are not algorithms or model features; they are writing conventions that make prompts more complete, more consistent across a team and easier to review, test and maintain.

How a prompt framework structures an instruction

A prompt framework works by decomposing an instruction into labeled slots that the author fills in before sending the prompt. Language models respond to everything in their input, so a prompt that silently omits the audience, the length or the format forces the model to guess, and guessing produces variable output. A framework makes those decisions explicit.

The slots map onto a fairly stable set of core prompt components that recur across almost every framework. The table below lists them with the failure each one prevents.

ComponentWhat it specifiesFailure it prevents
Role or personaExpertise and perspective the model should adoptGeneric, shallow answers
Task or objectiveThe concrete action to performAnswering a different question
ContextBackground facts, data and situationPlausible but irrelevant output
AudienceWho will read the resultWrong level of detail or jargon
ConstraintsLength, scope, rules and exclusionsOverlong or off-limits content
Output formatStructure such as a list, table or JSONOutput that cannot be parsed or reused
ExamplesSample inputs and desired outputsMisread style or labeling scheme
Core components that prompt frameworks capture

Order matters less than completeness, but many practitioners place stable instructions first and variable input last, and separate sections with prompt delimiters such as headings or XML-style tags. Clear separation helps the model distinguish instructions from data, which also reduces the risk of text inside the data being treated as a command.

Common prompt frameworks and their components

Dozens of prompt frameworks circulate in training materials, and they differ mainly in how many components they require and which ones they emphasize. None of them is a formal standard, and their letters are sometimes expanded differently by different authors. The table summarizes widely cited examples.

FrameworkComponentsTypical use
RTFRole, Task, FormatQuick everyday requests
TAGTask, Action, GoalShort goal-oriented instructions
RACERole, Action, Context, ExpectationBusiness writing and analysis
RISENRole, Instructions, Steps, End goal, NarrowingMulti-step procedures
CO-STARContext, Objective, Style, Tone, Audience, ResponseContent where voice and audience matter
CRISPECapacity, Insight, Statement, Personality, ExperimentExploratory and creative work
Widely cited prompt frameworks

The differences are smaller than the acronyms suggest. Almost every framework combines the role, the task and the shape of the result; the longer ones add audience, tone, steps or explicit exclusions. Choosing a framework is therefore mostly a matter of matching its depth to the task.

A prompt framework is often confused with neighboring concepts in the same field. The key distinction is that a framework describes what a prompt should contain, while a template, a pattern or a reasoning technique describes something more specific.

ConceptLevel of abstractionWhat it fixes
Prompt frameworkChecklist of componentsWhich information must be present
Prompt templateConcrete text with placeholdersExact wording, variables filled at runtime
Prompt patternReusable solution to a recurring problemAn interaction behavior, such as flipped interaction
Reasoning techniqueMethod for eliciting reasoningHow the model thinks, as in chain-of-thought
Context engineeringSystem-level design of model inputWhat enters the context window and when
How a prompt framework differs from related concepts

In practice these layers stack. A team may use a framework to decide the components, encode them in a versioned prompt template, add a reasoning technique inside the task section and manage the whole input through context engineering in an application.

Choosing and applying a prompt framework

The right framework is the simplest one that removes ambiguity for the task at hand. Short factual questions need little structure, while prompts that run thousands of times in production benefit from every component being explicit and tested. The decision table below gives typical choices.

SituationSuitable structureReason
One-off simple questionNo framework or RTFExtra structure adds little value
Marketing or customer contentCO-STAR or RACETone and audience drive quality
Multi-step analytical taskRISENExplicit steps reduce skipped stages
Data extraction for softwareRole, task, format plus examplesStrict output format enables parsing
Shared team prompt libraryOne agreed framework for all promptsConsistency simplifies review
Decision guide for prompt frameworks

Applying a framework well means filling each slot with specific content, not with generic phrases. A role such as “expert” adds little; a role such as “a tax adviser explaining rules to small business owners” constrains vocabulary, depth and assumptions. Every filled slot should then be validated through prompt evaluation on representative inputs.

Limitations and misconceptions about prompt frameworks

The most common misconception is that a named framework guarantees better results. Frameworks improve completeness, but the quality of output still depends on the accuracy of the context, the clarity of the task and the capability of the model. There is little rigorous evidence that one acronym consistently outperforms another.

  • Overstructuring simple requests makes prompts longer, costlier and sometimes less natural without improving answers.
  • Rigid templates can hide missing facts: a filled slot looks complete even when its content is vague or wrong.
  • Model differences matter: a structure tuned for one model may need adjustment after a model update, a problem known as prompt drift.
  • Role statements are not expertise: assigning a persona does not give the model knowledge it lacks.

Experienced practitioners treat a framework as a starting checklist, not a rule, and refine prompts through iterative testing against real inputs.

The short version

A prompt framework is a checklist for asking an AI model for something. Instead of typing a quick request and hoping for the best, the writer goes through a short list: who the model should act as, what exactly it should do, what background it needs, who the answer is for and what the answer should look like.

It works like a good briefing for a new colleague. A clear brief gets a useful result the first time, while a vague one leads to rework. The acronyms are simply memory aids for remembering what a good brief contains.

Where it makes a difference

A customer support team at a software company uses a language model to draft replies to about 1,500 tickets per day. Early prompts were written ad hoc by each agent, and drafts varied widely in tone, length and accuracy, so agents rewrote most of them.

The team adopts a single framework based on CO-STAR. Each prompt now states the context (product version and ticket history), the objective (resolve or escalate), the style and tone (calm, concise, no blame), the audience (non-technical customers) and the response format (greeting, three-step fix, closing line under 150 words). The shared structure becomes a versioned template in the prompt library.

After two weeks of testing against a sample of past tickets, far fewer drafts need substantial rewriting, and reviewers can spot problems faster because every prompt follows the same layout.