Prompting: from beginner to dangerous
The complete arc: zero-shot, few-shot, chain-of-thought, and when each one earns its keep.
A language model only knows what you tell it in the prompt, plus whatever it absorbed during training. It cannot see your screen, read your mind or guess the standard you have in your head. Most disappointing AI output is not a model failure - it is an information failure.
This guide walks through prompting techniques in the order you should learn them. Each one solves a specific problem, and each has a cost. The goal is not to use every technique every time, but to know which one to reach for.
Level 0: the anatomy of a good prompt
Before any named technique, almost every strong prompt contains the same ingredients. Think of them as a briefing you would give a capable new colleague on their first day.
The six ingredients of a well-briefed prompt.
Compare "Write a product description for our headphones" with: "Write a 60-word product description for noise-cancelling headphones aimed at students who study in cafés. Emphasise battery life (30 hours) and comfort. Plain, confident tone - no superlatives like 'best ever'. Return only the description." The second version is longer, but it removes guesswork. The model no longer has to invent your audience, length, key facts or tone.
Rule of thumb: If a smart person with no context would need to ask you a clarifying question, put the answer in the prompt.
Level 1: zero-shot prompting
Zero-shot means asking for a task without giving any examples. Modern models are trained on so many tasks that zero-shot works remarkably well for common requests: summarising, translating, classifying, rewriting, explaining.
Use it when the task is standard and the output format is obvious. It struggles when you need a very specific style, an unusual format, or a judgement that depends on your private standards.
Level 2: few-shot prompting
Few-shot prompting includes a handful of worked examples of input and desired output before the real task. The model picks up the pattern - format, tone, level of detail, labelling scheme - from the examples rather than from your description of it.
A few-shot prompt for classifying customer messages, written as a Python string.
Three to five examples is usually enough. Choose them deliberately: cover the tricky cases, not just the easy ones, and vary them so the model does not copy surface details. If all your examples are short, the model will assume short is correct.
Use it when "show, don't tell" is easier than describing what you want - brand voice, data extraction formats, labelling rules. The cost is longer prompts, and examples that accidentally teach the wrong pattern.
Level 3: chain-of-thought
Language models generate one token at a time, and each token is computed with a fixed amount of processing. Asking for an answer immediately forces the model to commit before it has "worked anything out". Chain-of-thought (CoT) prompting asks the model to reason step by step before giving its final answer, which gives it room to work through the problem in writing.
A 2022 study by Google researchers showed that adding worked reasoning steps substantially improved performance on maths word problems and multi-step logic. Even the simple instruction "Think step by step" produced gains on many tasks.
The same question, answered directly vs. with reasoning first.
An important update: many current models are built to reason internally before answering, sometimes called "thinking" or "reasoning" modes. With those, explicitly writing "think step by step" adds less. What still helps is telling the model what to reason about: "First list the constraints, then check each option against them, then recommend one."
Use it for maths, logic, planning, debugging and any decision with several factors. Skip it for simple lookups and creative writing, where it adds cost and length without improving quality.
Level 4: structure and decomposition
Past a certain complexity, one prompt is the wrong tool. The more you ask for at once, the more likely something gets dropped. Professional prompting increasingly looks like light software design.
Separate instructions from data. Wrap pasted material in clear delimiters such as XML-style tags - <article>...</article> - so the model never confuses your instructions with the content it is processing.
Ask for structured output. Request JSON or a fixed template when the result feeds another program. Many APIs can enforce a schema directly.
Chain prompts. Break a big job into steps - extract, then analyse, then write - and pass each output to the next prompt. Each step is easier to check and improve.
Self-critique. Ask the model to review its own draft against your criteria, then revise. A second pass catches a surprising number of problems.
A prompt chain for turning a long report into a reviewed summary. Each step is small, testable and replaceable.
Which technique, when?
A practical decision guide.
Habits that separate good from dangerous
Iterate, do not restart. When an answer is close, say precisely what to change. The conversation history is useful context.
Say what to do, not only what to avoid. "Write in short, plain sentences" works better than "don't be wordy".
Give the model an exit. Add "If the document doesn't contain the answer, say so." It sharply reduces invented answers.
Ask for sources and verify them. Models can produce convincing but fabricated citations. Check anything that matters.
Build a prompt library. When a prompt works, save it with a note on why. Your best prompts are reusable assets.
Test on hard cases. Judge a prompt by its worst output across ten varied inputs, not its best output on one.
The real skill: Prompting is mostly clear thinking written down. If you can explain a task precisely to a person, you can explain it to a model - and the act of writing it out usually improves your own understanding of what you want.