Prompt engineering is the practice of writing prompts so a language model performs a task reliably: clear instructions, the right context, worked examples of the desired output, and tests against real cases before you trust it.
No jargon, no math
Since a model continues the text you give it, prompt engineering means writing the text worth continuing. Working prompts tend to share four moves. First, the task in one sentence: what goes in, what must come out. Second, the role: who the model is and who it works for, because a quality engineer and a marketer frame the same answer differently. Third, examples, the so-called few-shot: two or three input-to-output pairs teach format and judgement faster than any paragraph of rules. Fourth, constraints: the output format, length limits, and explicit instructions for missing data, such as 'if a price is absent, say missing_price, never guess'. Then you iterate: run real cases, find where it fails, adjust one variable at a time. Where it breaks: piling instructions until they contradict each other, examples that drift away from real cases, and trusting a prompt that only ever saw three cheerful test inputs.
Define the task. One sentence: what goes in, what must come out.
Set the role. Tell the model who it is and who it works for.
Give examples. Show 2 to 3 input-to-output pairs; the format is learned from them.
Constrain the output. Format, length, fields, and what to do when data is missing.
Test and tighten. Run real cases, find the failure, adjust one variable at a time.
A prompt is everything you hand to a language model in one call: instructions, context and the question itself. The model answers by continuing exactly that text, and nothing else.
ReadThe system prompt is the standing instruction a language model receives before any user message: it defines the model's role, tone, limits, output format and the tools it may use, and it shapes every answer in the conversation.
ReadStructured output is a mode where the model is forced to answer in a machine-readable format (JSON, a table, a fixed schema) instead of free text, so its answer can be validated, stored and passed to other software without a human retyping it.
Read§ 04
We design and ship AI systems with permissions, logs and human approval. It starts with a 30-minute scoping call.