AI

Prompt Engineering Basics: A Practical Framework You Can Reuse

Forget prompt tricks and magic words. Learn the five-part prompt structure that works across every AI model, plus fixes for the failures you will actually hit.

·3 min read·677 words
Glowing command bar with branching light paths

Prompt engineering picked up a slightly ridiculous reputation — secret phrases, "you are a world-class expert", threats and bribes. Most of that is folklore. What actually moves quality is unglamorous: being specific about the job, the inputs, the constraints and the output format. Here is a structure you can reuse for almost anything.

The five-part prompt

1. Role and goal. One sentence saying what job is being done and for whom. Not "you are the world's greatest copywriter" but "you are writing onboarding email copy for a self-serve accounting app used by freelancers."

2. Context and source material. The facts the model cannot know. Product details, audience, the current version of the text, the data. This is the single highest-leverage part of any prompt and the one people skip most often.

3. The task. A clear instruction with a verb. Rewrite, summarise, classify, expand, translate, critique, extract. Vague verbs like "improve" or "help with" produce vague results.

4. Constraints. Length, tone, reading level, things to avoid, terminology to use, whether to invent examples. Constraints are also where you protect accuracy: "if a fact is not in the source material above, say you do not know rather than guessing."

5. Output format. Markdown with H2s, a JSON object with named fields, a table with three columns, exactly five bullets of under twelve words. Explicit formats are followed well and make results easy to reuse.

An example, before and after

Before: "Write a product description for my running shoes."

After: "You are writing a product page description for a direct-to-consumer running shoe brand. Product: lightweight road shoe, 218g, 6mm drop, recycled knit upper, aimed at runners doing 30–60km per week who want a daily trainer rather than a race shoe. Write 120–150 words in a confident, plain, unhyped voice. Lead with the feel of the shoe, not the materials list. No exclamation marks, no phrases like 'game-changer' or 'take your running to the next level'. End with one sentence on who it is not for."

The second prompt is longer to write once and produces usable copy immediately. The first one produces something you rewrite from scratch.

Techniques that reliably help

  • Show, don't describe. One or two examples of the output you want ("here are two headlines in the right voice") beat three paragraphs of description of that voice.
  • Ask for reasoning before the answer on analytical tasks. "First list the trade-offs, then give your recommendation." Ordering matters; the model conditions its answer on what it already wrote.
  • Split big jobs. Outline in one call, draft each section in its own call, then a final consistency pass. Long single-shot generations lose structure and drift in tone.
  • Give an escape hatch. "If the input is ambiguous, ask up to three clarifying questions instead of answering." Prevents a lot of confident nonsense.
  • Reuse a template. Save your best prompts. Most of your work is a handful of repeated jobs, and a saved prompt with a blank for the input is worth more than any clever phrasing.

Common failures and their fixes

The output is generic. You gave a topic instead of context. Add audience, specifics and something only you know.

It ignored an instruction. Instructions buried mid-paragraph get lost. Move constraints to a bulleted list at the end — recency and visual separation both help.

It invented facts. Supply the facts and forbid invention explicitly. Then verify anyway.

Tone is wrong. Describing tone rarely works; pasting a sample of the tone almost always does.

It is too long. Word counts are approximate for most models. Ask for a hard structural limit instead: "exactly four bullets, each one sentence."

The mindset that matters most

Treat the prompt as a brief you would hand a competent freelancer who has never met you. If a smart stranger could not do the job from your instructions, neither can the model. That test catches almost every bad prompt before you waste a generation on it — and it keeps improving as your saved prompt library grows.

#prompts#ai#productivity

Keep reading