Good prompting isn’t magic. A few simple techniques, studied by researchers, explain most of the difference between a weak answer and a strong one.
1. Few-shot prompting: show, don’t just tell
With GPT-3 in 2020, researchers showed that a model can figure out a task from a few examples placed in the prompt, with no extra training.
Turn each sentence into a polite request. “Send the file.” → “Could you please send the file?” “Fix the bug.” → “Would you mind fixing the bug?” “Call me later.” →
The model continues the pattern. Use it when you care about format and style.
2. Chain-of-thought: let it think out loud
A 2022 finding: when examples show the reasoning steps before the answer, the model imitates them and gets more complex questions right. You can often trigger the same effect with a simple instruction such as “Let’s think step by step.”
Use it for math, logic, planning and anything with several steps.
3. Prompt chaining: split big jobs
Instead of one giant request, break the task into steps and feed each result into the next:
- “List the main points of this report.”
- “Using those points, write a one-page summary for executives.”
- “Turn the summary into three bullet points for a slide.”
You can check each step, and you don’t need to be an expert to do it.
4. System prompts and retrieval
- A system prompt is a hidden instruction at the start of a chat that sets role and rules.
- Retrieval-augmented generation (RAG) first looks up relevant documents and gives them to the model along with your question, so answers rest on real text rather than memory.
Reasoning models
Since late 2024, some models are trained to produce a step-by-step analysis themselves before giving a final answer. On a set of math olympiad qualifying problems, one such model scored 83% where GPT-4o scored 13%. The cost: they use more computing power per question, so they’re slower and pricier.
Which technique when?
- Need a specific style or format → few-shot.
- Need accuracy on a multi-step problem → chain-of-thought, or a reasoning model.
- Need to handle a big task → prompt chaining.
- Need answers based on your documents → RAG.
Further reading: the Wikipedia article on large language models.