The CO-STAR prompt framework, with examples and an honest comparison

TL;DR: CO-STAR is a prompt framework from GovTech Singapore's Data Science and AI team. It stands for Context, Objective, Style, Tone, Audience and Response. You describe the situation, the goal, how it should read, how it should sound, who it is for and what shape the answer takes. It works best for writing tasks.

What the CO-STAR framework is

CO-STAR is a checklist for writing a prompt. Each letter is one thing to tell the model before it starts. Fill in all six and you have covered the gaps that make AI writing sound generic: no background, a fuzzy goal, and no idea who is reading.

The six parts of CO-STAR
LetterPartThe question it answers
CContextWhat is the situation, and what background does the model need?
OObjectiveWhat exactly should it do?
SStyleHow should it read? Like a memo, a news story, a particular kind of expert?
TToneHow should it feel? Formal, friendly, urgent, reassuring?
AAudienceWho will read it, and what do they know?
RResponseWhat shape: length, format, structure?

Where CO-STAR comes from

CO-STAR comes from the Government Technology Agency of Singapore (GovTech). It appears in GovTech's Prompt Engineering Playbook, produced by its Data Science and AI Division, in a chapter called "The CO-STAR approach to writing your prompts". The public version we checked is Beta v3, last updated 30 August 2023.

The framework reached a wider audience at the end of 2023, when Sheila Teo, the winner of GovTech's Prompt Royale 2023, which she describes as Singapore's first GPT-4 prompt engineering competition, published "How I Won Singapore's GPT-4 Prompt Engineering Competition" on Towards Data Science. She credits CO-STAR to GovTech's Data Science and AI team. A 2025 GovTech article says its officers still follow the framework.

Two details from the original playbook are worth knowing, because many copies drop them:

  • You don't need all six every time. The playbook's own advice is to "mix and match" depending on the task.
  • Style includes persona. The playbook's Style examples ask the AI to answer in the style of an expert, such as a career coach. So CO-STAR has no separate Role part: the role lives inside Style.

The six parts, with an example each

The running task: a 60-person design agency is moving expense claims to a new app, and the operations lead needs to tell everyone.

C: Context

The background the model can't know. The playbook suggests it often helps to put Context above the Objective, so the model reads the situation before the task. It is also where your real facts go, so it is the part worth the most time.

Context example
I run operations at a 60-person design agency. On 1 March we are moving expense claims from email and spreadsheets to a new expense app. Claims sent the old way after 28 February won't be paid.

O: Objective

One clear task, ideally with the outcome you want. "Write an email" is a task. "So that every employee knows the deadline and what to do next" is the outcome that tells the model what matters most.

Objective example
Write the email that announces the change, so that every employee knows the deadline and what to do next.

S: Style

The kind of writing, or the kind of writer. A memo, a press release, a how-to; or "as an experienced HR manager would write it". For when a role helps and when it doesn't, see role prompting.

Style example
Like a clear internal memo: the key fact first, then the details, then where to get help.

T: Tone

The feeling. Style and tone are easy to confuse: style is the structure and voice, tone is the attitude. Naming what to avoid often works better than naming what to aim for.

Tone example
Friendly and matter-of-fact. Not apologetic, not salesy.

A: Audience

Who reads it and what they already know. This changes vocabulary, length and what needs explaining. "All staff" is a start; adding what they feel about the topic is better.

Audience example
All staff, from designers to account managers. Most submit a few claims a month and dislike admin. None have used the app.

R: Response

The shape of the answer: length, format, sections, what to end with. Be concrete. "Under 150 words with the dates in a list" can be checked; "short" can't.

Response example
A subject line, then the email in under 150 words. Put the three dates in a short list. End with who to contact: [name and email].

A full CO-STAR prompt

Put together, with a heading for each part so the model can tell them apart. Headings are optional, but they make long prompts easier for you to edit and for the model to follow.

Worked example: the full CO-STAR prompt (216 tokens)
# CONTEXT #
I run operations at a 60-person design agency. On 1 March we are moving expense claims from email and spreadsheets to a new expense app. Claims sent the old way after 28 February won't be paid. Everyone gets a login by email on 20 February. There is a 20-minute walkthrough on 22 February at 11am, recorded for anyone who can't attend.

# OBJECTIVE #
Write the email that announces the change, so that every employee knows the deadline and what to do next.

# STYLE #
Like a clear internal memo: the key fact first, then the details, then where to get help.

# TONE #
Friendly and matter-of-fact. Not apologetic, not salesy.

# AUDIENCE #
All staff, from designers to account managers. Most submit a few claims a month and dislike admin. None have used the app.

# RESPONSE #
A subject line, then the email in under 150 words. Put the three dates in a short list. End with who to contact: [name and email].

And the blank version to copy:

CO-STAR template
# CONTEXT #
[The situation and the facts the model can't know: who you are, what happened, numbers, dates.]

# OBJECTIVE #
[The one task, and the outcome you want from it.]

# STYLE #
[The kind of writing or writer, for example: a clear internal memo, a product page, an experienced recruiter.]

# TONE #
[The attitude, and what to avoid, for example: warm and direct, not salesy.]

# AUDIENCE #
[Who will read it, what they know, what they care about.]

# RESPONSE #
[Length, format and structure, for example: under 150 words, three bullet points, end with one question.]

CO-STAR vs RTF, RISEN, TAG and the five-part prompt

CO-STAR is one of several prompt acronyms. RTF, RISEN and TAG circulate widely in prompt guides, but unlike CO-STAR we could not find an original published source for any of them, so we use their common definitions. The five-part structure (role, context, task, format, constraints) is the pattern we use across this blog, explained in how to write a prompt.

To compare them fairly, here is the same task, with the same facts, run through each. Token counts are measured with OpenAI's o200k_base tokenizer.

RTF: Role, Task, Format (97 tokens)
Role: You are an operations manager at a 60-person design agency.
Task: Write an email announcing that expense claims move from email and spreadsheets to a new expense app on 1 March. Claims sent the old way after 28 February won't be paid. Logins arrive on 20 February; a recorded 20-minute walkthrough is on 22 February at 11am.
Format: A subject line and an email under 150 words, with the dates in a short list.
RISEN: Role, Instructions, Steps, End goal, Narrowing (135 tokens)
Role: You are an operations manager at a 60-person design agency.
Instructions: Write an email announcing that expense claims move to a new expense app on 1 March.
Steps: 1. Open with the change and the deadline: claims sent the old way after 28 February won't be paid. 2. List the dates: logins on 20 February, a recorded 20-minute walkthrough on 22 February at 11am. 3. Say who to contact: [name and email].
End goal: Every employee knows the deadline and what to do next.
Narrowing: Under 150 words. Friendly, not salesy. No jargon.
TAG: Task, Action, Goal (77 tokens)
Task: Announce to all staff that expense claims are moving to a new expense app on 1 March.
Action: Write a short email with the deadline (claims sent the old way after 28 February won't be paid), the login date (20 February) and the walkthrough (22 February, 11am, recorded).
Goal: Everyone switches on time and no claim is lost.
Five-part: role, context, task, format, constraints (156 tokens)
Role: You are an operations manager writing to colleagues.
Context: We are a 60-person design agency. On 1 March, expense claims move from email and spreadsheets to a new expense app. Claims sent the old way after 28 February won't be paid. Logins arrive by email on 20 February. A 20-minute walkthrough is on 22 February at 11am, recorded. Staff dislike admin and none have used the app.
Task: Write the email announcing the change.
Format: Subject line, then under 150 words, with the three dates as a short list, ending with who to contact: [name and email].
Constraints: Friendly and matter-of-fact, not apologetic or salesy. Don't add features or dates that aren't listed here.
The same task in five frameworks
FrameworkTokensWhat it makes you sayWhat it lets you skipBest for
CO-STAR216Situation, goal, style, tone, reader, formatExplicit limits; role is folded into StyleWriting for a specific reader: emails, posts, announcements
RTF97Who answers, the task, the formatAudience, tone, goal, limitsQuick, simple tasks where the reader doesn't matter much
RISEN135Role, task, ordered steps, goal, limitsAudience and tone, unless you add them to NarrowingTasks with a set sequence: procedures, multi-part documents
TAG77The task, the action, the goalRole, audience, tone and formatA fast first draft you plan to refine in chat
Five-part156Role, background, task, format, limitsSeparate style and tone (they go in format or constraints)Most work tasks, especially ones where facts must stay exact

What the comparison shows:

  • The frameworks differ less than their names suggest. Every one has a task. Most have a role or a format. The real difference is which gaps each one makes you notice.
  • CO-STAR is the only one that asks about the reader and the tone separately. That is why it suits writing tasks. Its gap is limits: nothing in the six letters prompts you to say what must not happen, such as "don't add dates that aren't listed". Add that line to Response.
  • The shortest prompts leave the most to guess. TAG is a third of the length of CO-STAR here, and it says nothing about who reads the email or how it should sound. The model will fill that in with a safe average.
  • Length follows from content, not from the framework. Every prompt above carries the same core facts. The extra tokens in CO-STAR are the reader and the tone, which is exactly the information the shorter ones leave out.

When to use CO-STAR, and when not to

Use CO-STAR when the output will be read by people and how it lands matters: customer emails, announcements, social posts, speeches, product copy. Those are the tasks where audience and tone change the result most.

Use something lighter for tasks where the reader doesn't change the answer: converting a table, writing a formula, extracting fields from a document. There, Style, Tone and Audience are padding, and the playbook itself says to skip parts you don't need.

CO-STAR also doesn't cover two things that often matter more than any letter in it: examples of what good looks like, and the source material itself. If you have a past email whose tone you liked, paste it under Style; that is few-shot prompting, and one example often beats a paragraph of description.

Common mistakes with CO-STAR

  1. Thin context. "I work at a company" fills the C without giving the model anything. Put the facts here: names, numbers, dates, what happened.
  2. Style and tone saying the same thing. "Professional" in both wastes both. Use Style for the structure (memo, story, list) and Tone for the attitude.
  3. An audience with no detail. "Customers" changes little. "Customers who bought last year and haven't logged in since" changes a lot.
  4. A vague response. Give a number and a structure. You can check "under 150 words, dates in a list". You can't check "concise".
  5. Filling every letter out of habit. If a part doesn't change the answer, leave it out. A shorter, sharper prompt beats a complete one full of filler.

Let the right experts write your prompt

Prompt Expert is an AI prompt generator that brings the right experts to every job. They ask a few questions, read your website and files, and write the prompt for ChatGPT, Claude or Gemini with your real facts, working together when a job needs more than one.

See how it works

Questions

What does CO-STAR stand for in prompting?

Context, Objective, Style, Tone, Audience and Response. Each is one thing to tell the model: the situation, the task, how it should read, how it should sound, who it is for, and the length and format of the answer.

Who created the CO-STAR framework?

GovTech Singapore's Data Science and AI team. It appears in GovTech's Prompt Engineering Playbook from 2023, and spread widely after Sheila Teo, winner of GovTech's GPT-4 prompt engineering competition, wrote about it on Towards Data Science.

Is CO-STAR better than other prompt frameworks?

It is better for writing aimed at a specific reader, because of the frameworks compared here it is the only one that asks for audience and tone separately. For quick or technical tasks, a shorter structure such as role, task and format is enough.

Do I have to use all six parts of CO-STAR?

No. GovTech's own playbook says to mix and match depending on the task. Skip any part that wouldn't change the answer.

Does CO-STAR work with ChatGPT, Claude and Gemini?

Yes. It is a way of organizing plain instructions, not a feature of any one model, so it works in any chat assistant. Headings for each part help with longer prompts.

Sources