Notes

Prompt Engineering

The weights of a model you did not train are fixed, and you cannot touch them. Everything you can still change sits in the text you send — and the gap between a careless request and a well-built one is frequently larger than the gap between two model generations. Prompt engineering is the craft of closing that gap deliberately.

What the work consists of

It is less about magic words than about supplying what the model cannot infer: the role it should adopt, the exact output format, the constraints that matter, and worked examples of the job done right. The recurring moves are zero-shot instruction, few-shot examples, asking for reasoning before the answer, and keeping the stable instructions in a reusable template with the variable parts slotted in. Delimiting user-supplied text and stating what to do when the answer is not available removes most rambling.

Why it is engineering and not writing
  • A prompt is judged on a set of inputs, not the one that inspired it — so it needs a test set and a score, like code.
  • It is version-controlled, because an improvement on one case quietly breaks another.
  • It is model-specific: a prompt tuned on one model loses its edge on the next, and reasoning models need less hand-holding than their predecessors.
Where it stops

Prompting cannot add knowledge the model never saw — that is what retrieval is for — and it cannot reliably install a new skill or a house voice, which is fine-tuning's job. It is the cheapest lever, tried first, and the one to re-check every time the model underneath changes.

Prompt engineering is the practice of designing the input text that steers a frozen model's output — the role, the instructions, the output format, and any worked examples. Because the weights cannot be changed, it is the cheapest and fastest way to improve results, and the first thing tried. Done properly it is tested against a set of inputs and version-controlled, since a prompt tuned for one model or one case fails on another.

A new assistant on their first day can be brilliant or useless depending entirely on how you brief them. "Deal with this" gets you one thing; "reply to this customer in three polite sentences, and say you will check if you are not sure" gets you another. Prompt engineering is the skill of writing that briefing for an AI. You cannot change what the system knows, but you can be precise about what you want, show it an example of a good answer, and tell it what to do when it has no idea. Small changes in wording make a surprisingly large difference to what comes back.