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¶
- concepts/few-shot-prompt-template — few-shot exemplars fit inside the Response format section; CO-STAR is the outer structure, few-shot is an inner mechanism.
- patterns/system-prompt-role-plus-output-format-constraint — CO-STAR's Style + Tone + Audience overlap with role assignment; its Response format overlaps with output constraints.
- patterns/instruction-library-prompt-composition — CO-STAR sections can be parameterised and composed programmatically from reusable fragments.
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¶
- sources/2025-06-11-instacart-turbocharging-customer-support-chatbot-development-with-llm — Instacart LACE authors evaluator prompts in Markdown with CO-STAR-style sections; cited as industry best practice for minimising prompt-formatting-induced performance variability.
External references¶
- AI Advisory Boards (2024). The CO-STAR framework. aiadvisoryboards.wordpress.com.
- Chen et al. (2024). Prompt formatting sensitivity in LLM output quality. arXiv:2411.10541.