COSTAR improves prompt quality by ensuring clarity, relevance, and usability. It’s especially useful in business, content creation, automation, and API integrations where consistency and structure matter.
The COSTAR Framework Explained:
- Context (C): Providing background information for the LLM to understand the specific situation, domain, or environment.
- Objective (O): Clearly defining the clear goal of the final result.
- Style (S): Specifying the desired writing style. (e.g., academic, conversational, technical).
- Tone (T): Setting the emotional or attitudinal tone ensures the response resonates with the required sentiment. (e.g., formal, friendly, urgent)
- Audience (A): Identifying the intended audience who will read or use the output.
- Response (R): Providing the response format to ensures the LLM outputs the exact output format. (e.g., paragraph, bullet points, JSON, table)
Examples of COSTAR vs zero shot
Example 1
Zero shot:
Create a marketing advertising content for headphone
COSTAR
Context: we are a new startup company that design a new headphone
Objective: Create a marketing advertising content on social media
Style: Using Apple iphone marketing style
Tone: teenager tone
Audience: teenager who loves colorful product
Response: a slogan and a short paragraph
Example 2
Zero shot:
Create an ad for ‘The Amazing Burger’.
COSTAR
Context: we are a fast food company that designing a new advertizing for our new ‘amazing burger’
Objective: Create a marketing advertising content on youtube advertizing
Style: Using korean stars with strong music background and dance in video
Tone: family with kids
Audience: kids who loves korean stars like black pink
Response: a script for 30 seconds with slogan and story board
Example 3
Zero shot:
Generate a product update email of AI-powered dashboard.
COSTAR
Context: Our SaaS company has just launched a new AI-powered analytics dashboard. The development team completed the rollout last night.
Objective: Inform existing customers about the new feature and encourage them to try it.
Style: Clear, concise, and professional.
Tone: Excited and customer-focused.
Audience: Current enterprise clients who use our platform daily.
Response: Write a 150-word email with a subject line, greeting, body, and call-to-action. Use markdown format.
Example 4
Zero shot:
Question a suspect in a money laundering case
COSTAR
Context: question a suspect in a money laundering case
Objective: Create questions in a money laundering case but not asking question too direct
Style: from an inspector angel to ask for the reason
Tone: inspector tone
Audience: suspect in this money laundering case
Response: create 20 questions related to money laundering
Other Prompt Engineering Frameworks
There are several well-known prompt engineering frameworks, such as:
CRISPE
(Capacity and Role, Insight, Statement, Personality, Experiment)
CLEAR
(Clear, Logical, Explicit, Accurate, Relevant)
STAR (from interview techniques, sometimes adapted for prompts)
(Situation, Task, Action, Result)
APE
(Action, Purpose, Expectation)
COSTAR is a practical, modern prompt engineering framework that brings structure and precision to working with LLMs. By explicitly defining Context, Objective, Style, Tone, Audience, and Response, it enables users to generate targeted, high-quality, and integration-ready outputs.