Home / Insights / AI in Practice
Prompt Engineering: What Actually Improves Results
Clear instructions, examples and evaluation matter more than clever phrases.
A prompt is the text a model receives. Because a language model continues from its input, what you include strongly affects what you get.
Say what you mean
Vague requests produce generic answers. State the purpose, the reader, the constraints and what to do when information is missing. "Summarise this" is weaker than asking for the three decisions a manager must make, each with the supporting sentence from the document.
Diagram by O&O Consulting.
Show examples
The GPT-3 research demonstrated that a model can pick up a task from a few examples placed in the prompt. Examples are especially helpful for format and for borderline cases. Choose varied ones: a model may copy incidental features of a single example.
Give room to work
For multi-step problems, asking a model to set out its reasoning before the answer has been shown to improve results on arithmetic and logic benchmarks. Splitting a large job into stages, with a check between them, is often more reliable than one long instruction.
Mind long inputs
A study titled "Lost in the Middle" found that models often used information placed at the beginning or end of a long input better than information buried in the middle. Putting key material where it is likely to be used, and removing irrelevant text, can help.
Treat it as engineering
Keep a set of representative cases, including difficult ones, with the expected results. Run it after every change to the prompt or the model. Without this, an improvement for one example may quietly damage others.
Limitations and open questions
Small wording changes can alter outputs in unpredictable ways, and a technique that helps one model may not help another. Prompts cannot supply knowledge a model lacks, and instructions are not a security boundary: content from outside sources may override them. Many popular "magic phrases" have little tested evidence behind them.
References
- Brown, T. et al. (2020). "Language Models are Few-Shot Learners." arxiv.org/abs/2005.14165
- Wei, J. et al. (2022). "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models." arxiv.org/abs/2201.11903
- Liu, N. F. et al. (2023). "Lost in the Middle: How Language Models Use Long Contexts." arxiv.org/abs/2307.03172
This article is general information, not financial, legal or investment advice. AI research and rules change quickly; check the cited sources for the current position.