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
Fundamentals
What prompt engineering is, and the techniques every model provider recommends.
Techniques
Each prompting method in depth — what it is, when it helps, and when it does not.
- 2 · BeginnerZero-Shot, One-Shot and Few-Shot PromptingWhat zero-shot, one-shot and few-shot prompting mean, when examples help and when they get in the way, and how to write examples that teach the pattern.8 min read
- 3 · IntermediateChain-of-Thought Prompting, ExplainedHow asking a model to reason step by step improves multi-step answers, the variants built on it, and why reasoning models change the advice.9 min read
- 4 · IntermediatePrompt Chaining and Iterative PromptingSplitting a task into a sequence of focused prompts, refining prompts and outputs over several rounds, and when each beats one big prompt.8 min read
- 5 · IntermediateRole, Negative and Structured-Output PromptingGiving a model a role, telling it what to avoid, and getting output your code can rely on — JSON, schemas and delimiters.8 min read
Frameworks
CO-STAR, CRISPE, RTF, RACE and RISEN — what they stand for, where they came from, and when to use one.
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.