O&O ConsultingBook a free call

Home / Insights / AI in Practice

Prompt Engineering: What Actually Improves Results

Clear instructions, examples and evaluation matter more than clever phrases.

O&O Consulting · · 2 min read

An office workspace

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.

Building and testing a promptIllustrative diagram, not data
State the task and audienceSupply the relevant materialShow an example of good outputAsk for a fixed formatTest on many cases and revise
State the task and audienceSupply the relevant materialShow an example of good outputAsk for a fixed formatTest on many cases and revise

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

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.