Skip to main content

Prompt Engineering: Techniques and Frameworks

How to get reliable output from a language model. Start with the fundamentals, then work through the individual techniques, and see what the popular prompt frameworks really are.

6 articles · start with the first and read in order, or jump to what you need

Common questions: Prompt Engineering

What is prompt engineering?

Prompt engineering is writing the input to a language model so that it reliably produces the output you need: clear instructions, the relevant context, examples, a defined output format, and complex tasks broken into steps.

What are the main prompt engineering techniques?

Zero-shot, one-shot and few-shot prompting (no examples, one example, several examples); chain-of-thought prompting (working through intermediate steps); prompt chaining and iterative prompting (splitting a task into linked prompts and refining over rounds); and role, negative and structured-output prompting.

What is the CO-STAR prompt framework?

CO-STAR stands for Context, Objective, Style, Tone, Audience and Response. It comes from GovTech Singapore’s prompt engineering playbook (2023). Like the other prompt frameworks — CRISPE, RTF, RACE and RISEN — it is a checklist of what to include, not a different method.

Was the CRISPE framework created by OpenAI?

No. CRISPE (Capacity and role, Insight, Statement, Personality, Experiment) first appeared in a community prompt list on GitHub in February 2023. It is not part of OpenAI’s prompting guidance.