Two people can ask the same AI tool for the same thing and get very different answers. Part of the gap is luck. Part is how the question was asked, and that part can be learned in an afternoon.
The prompt is the model's whole picture of your task
A language model has no idea who you are, what you are trying to do or what you meant. It sees your words, and it fills every gap with the most likely continuation (How a Language Model Writes a Sentence explains the mechanism). A vague request gets an average answer. Most of prompting is closing the gaps yourself: the goal, the audience, the material and the shape of the result.
Show an example
The paper that introduced GPT-3 found that a model could do many tasks better when the prompt contained a few worked examples, with no retraining at all.1 Researchers call this few-shot prompting. In practice: paste a sample of the tone, layout or format you want and ask for more like it. An example communicates more than a paragraph of description.
For reasoning, ask for the steps
In 2022, Wei and colleagues showed that if the examples in a prompt included the intermediate steps of the reasoning, large models did better on arithmetic, common-sense and symbolic problems. On a set of grade-school maths word problems, one very large model went from solving about 18% with standard prompting to about 57% with step-by-step examples. The gain appeared mainly in very large models.2
Some newer systems are built to reason before they answer, so the effect of adding the phrase "think step by step" may be smaller than it once was. The habit still pays for another reason: a visible chain of steps is much easier for you to check than a bare answer.
Put what matters at the start or the end
Liu and colleagues tested how models use long inputs. Performance was highest when the relevant information sat at the beginning or the end of the input and dropped when it sat in the middle, including in models built for long inputs.3 So put your instructions first or last, keep pasted material relevant and short, and repeat the key requirement at the end if the prompt is long.
A prompt you can reuse
- Goal and audience. "I am a teacher preparing a 10-minute lesson for 14-year-olds."
- Material. Paste the text or notes it should work from.
- An example. Show a sample of the output you would be happy with.
- Format and limits. Length, headings, reading level, what to leave out.
- Permission to say it is unsure. Ask it to mark anything it is guessing.
- Your check. Verify names, numbers and quotations before you use them.
What prompting cannot fix
A better prompt makes an answer more useful. It does not make a wrong answer true, because the model can still produce fluent text that is false (see Why AI Makes Things Up). Match your checking to the stakes.
In the course. Writing clear prompts, giving examples and checking the results are practised step by step in the Neurovia One AI Course, which starts from the basics. See the course.
References
- Brown TB, Mann B, Ryder N, et al. Language models are few-shot learners. In: Advances in Neural Information Processing Systems 33 (NeurIPS 2020). 2020:1877–1901. Find it ↗
- Wei J, Wang X, Schuurmans D, et al. Chain-of-thought prompting elicits reasoning in large language models. In: Advances in Neural Information Processing Systems 35 (NeurIPS 2022). 2022:24824–24837. Find it ↗
- Liu NF, Lin K, Hewitt J, et al. Lost in the middle: how language models use long contexts. Trans Assoc Comput Linguist. 2024;12:157–173. Find it ↗
