CO-STAR framework

Also known as: CO-STAR

On this page 7

The CO-STAR framework is a structured prompt template that divides an instruction for a language model into six labeled parts: Context, Objective, Style, Tone, Audience and Response. Prompting with CO-STAR replaces a single loose request with a checklist that forces the writer to state the background, the task, the voice, the reader and the expected output format before the model generates anything.

The framework became widely known in 2023 after it won a prompt engineering competition organized by the Government Technology Agency of Singapore, and it has since spread through corporate training and prompt libraries. It belongs to the family of prompt frameworks that trade a little extra writing effort for more predictable, reviewable output.

The six components of CO-STAR

Each letter of CO-STAR names one independent dimension of the request, and each dimension removes a specific kind of ambiguity that would otherwise be filled by the model’s defaults. The table below defines the components and the question each one answers.

ComponentQuestion it answersExample content
ContextWhat background does the model need?Company, product, situation, constraints
ObjectiveWhat exactly must be done?Write a launch announcement of 150 words
StyleWhat writing manner should it imitate?Concise like a technical release note
ToneWhat attitude should the text convey?Confident, friendly, not promotional
AudienceWho will read the result?Hospital IT managers with no data science training
ResponseWhat form must the output take?Markdown with a title and three bullet points
CO-STAR components and their purpose

The distinction between Style and Tone is the one users most often blur. Style describes the form of the writing, such as the genre, sentence length or the voice of a known type of author, while Tone describes the emotional attitude, such as reassuring, urgent or neutral.

How CO-STAR improves model output

CO-STAR works because a language model predicts text conditioned on everything in its input, so explicit constraints narrow the space of likely completions. Without them, the model falls back on generic defaults: a neutral corporate voice, a medium length and an audience assumed to be a general reader.

Labeling each part with a clear section header has a second effect. Delimited sections, written for example as # CONTEXT # or as XML-style tags, help the model separate background from instructions, which reduces the risk that a detail from the context is mistaken for the task. This connects CO-STAR to the related techniques of prompt delimiters and output format instructions.

The Response component is often the most valuable in automated systems. Specifying a strict output format, such as JSON with named fields, makes results machine-readable and allows a downstream program to validate them, while a vague format request forces fragile post-processing.

How CO-STAR compares with other prompt frameworks

CO-STAR is one of several mnemonic prompt frameworks, and they differ mainly in how many dimensions they cover and which ones they emphasize. CO-STAR is notable for treating audience and tone as first-class elements, which makes it especially suited to communication tasks.

FrameworkComponentsMain strengthMain gap
CO-STARContext, Objective, Style, Tone, Audience, ResponseAudience-aware writing tasksNo explicit role or examples
RTFRole, Task, FormatVery fast to writeLittle background or audience
RISENRole, Instructions, Steps, End goal, NarrowingMulti-step proceduresWeaker on voice and tone
CRISPECapacity, Insight, Statement, Personality, ExperimentExploring several variantsLonger and harder to teach
Role prompting aloneA persona assignmentSets expertise level quicklyLeaves task and format open
CO-STAR compared with related prompt frameworks

These frameworks are not mutually exclusive. A common practical pattern adds a role line and one or two few-shot examples to a CO-STAR prompt, combining its structure with the strengths of role prompting and example-based prompting.

Writing an effective CO-STAR prompt

An effective CO-STAR prompt is specific in every section but brief overall; each component should contain only information that changes the output. The guidance below shows how weak and strong entries differ for each part.

ComponentWeak entryStrong entry
ContextWe are a companyA regional bank launching a mobile savings feature
ObjectiveWrite something about itDraft a 120-word in-app announcement
StyleGood writingShort sentences, active voice, no jargon
ToneNiceWarm and trustworthy, without urgency
AudienceCustomersRetail customers aged 50 and over
ResponseTextPlain text, one headline and two paragraphs
Weak and strong entries for each component
  1. Start with the Objective, because every other component should serve it.
  2. Add only relevant Context; long background dilutes attention and raises token cost.
  3. Define the Audience concretely, including prior knowledge, not only demographics.
  4. Make the Response testable, with length limits, sections or a schema.
  5. Iterate one component at a time so that the effect of each change can be seen.

Limitations and common mistakes

CO-STAR improves clarity of intent, but it does not improve reasoning ability or factual accuracy. For multi-step logic, techniques such as chain-of-thought or plan-and-solve prompting matter more, and for factual tasks the model still needs reliable source material in its context.

  • Over-filling every section: forcing content into all six parts for a trivial request adds noise without benefit.
  • Conflicting instructions: a casual tone paired with a formal style or a strict word limit paired with exhaustive coverage produces inconsistent output.
  • Treating the template as a guarantee: a well-structured prompt still requires evaluation on real cases, because model behavior varies across versions.
  • Ignoring prompt drift: a CO-STAR prompt tuned for one model may behave differently after a model update and should be retested.

The framework is best understood as a thinking aid for the prompt writer. Its main value lies in making omissions visible, so that a missing audience or an undefined output format is noticed before the model responds.

A plain-language summary

The CO-STAR framework is a simple checklist for asking an AI assistant for help. Instead of typing one quick sentence, the writer explains the situation, the goal, the writing manner, the mood, the readers and the shape of the answer.

It works like briefing a new colleague. A colleague who knows who will read the text and what it must look like delivers something usable on the first try. The more clearly the request is described, the less rewriting is needed afterward.

An example from practice

A communications officer at a city water utility must inform residents about a planned six-hour supply interruption. A first attempt, simply asking the assistant to write a notice about the outage, returns a long, formal text full of technical terms.

The officer rewrites the request with CO-STAR: the context names the district and the pipe replacement work, the objective asks for an SMS of at most 300 characters plus a web notice, the style requires plain words, the tone is calm and apologetic, the audience is all residents including older people, and the response asks for two clearly labeled versions. The outcome is two ready-to-send texts after one revision, and the officer saves the prompt as a template for future service notices.