Skip to content

CONCEPT Cited by 1 source

CO-STAR prompt framework

Definition

CO-STAR is a six-part prompt-authoring framework popularised in 2024:

  • C — Context: the background the LLM needs to reason about the request.
  • O — Objective: the concrete task the LLM must accomplish.
  • S — Style: the writing style or register expected.
  • T — Tone: the emotional register (formal / friendly / clinical).
  • A — Audience: who the output is ultimately for.
  • R — Response format: the expected output shape (prose / JSON / bullet list).

The framework is one of several prompt-authoring conventions that emphasise explicit structuring of system prompts — typically written in Markdown with clearly separated sections — rather than a single-paragraph prose prompt.

Why it matters

Prompt formatting is a measured first-order quality lever, not cosmetic. Instacart's LACE team cites both the CO-STAR framework and prior work (Chen et al. 2024, arXiv:2411.10541) showing "prompt formatting can significantly impact LLM output quality." LACE authors their judge prompts in Markdown following CO-STAR to minimise variability across evaluation runs (Source: sources/2025-06-11-instacart-turbocharging-customer-support-chatbot-development-with-llm).

Relationship to other prompt conventions

Tradeoffs

  • Prescriptive rather than empirical. The framework is a writing convention, not an optimisation. DSPy-style programmatic prompt optimisation typically outperforms hand-written CO-STAR on hard tasks.
  • Section headers inflate token cost. Explicit Markdown headers add tokens on every call; for high-volume real-time paths this matters.
  • Human-readability > model-performance gains in most cases. CO-STAR's real value is often in team collaboration on prompts, not raw accuracy.

Seen in

External references

Last updated · 517 distilled / 1,221 read